#!/bin/bash
DOWNLOAD_FOLDER="/Volumes/Server Media/Music/Library/Songs"

# Loop through new .ogg files and run Picard to tag them
for file in "$DOWNLOAD_FOLDER"/*.ogg; do
  # Check if the file exists and is a .ogg file
  if [ -f "$file" ]; then
    echo "Tagging: $file"
    # Run MusicBrainz Picard in batch mode to organize metadata
    /Applications/MusicBrainz\ Picard.app/Contents/MacOS/picard --batch --save --rename "$file"
  fi
done
