Fix script for flac files

This commit is contained in:
2026-05-21 11:38:41 +00:00
parent d8a4ca6aa1
commit d85eda79bc

View File

@@ -1,13 +1,25 @@
#!/bin/bash #!/bin/bash
# script to fix where flac tags are set correctly but navidrome still sees them as having [Unknown album] and [Unknown artist] # script to fix where flac tags are set correctly but navidrome still sees them as having [Unknown album] and [Unknown artist]
# usage: fix_unknown_album_and_artist_flac_file.sh FILENAME [LOCATION]
# parameters:
# FILENAME: file to fix
# LOCATION: optional, location of the file, if the script is run from a different directory than where the file to fix is.
if [ -z "$2" ]
then
echo "staying in current directory"
else
echo "moving to $2"
cd "$2"
fi
echo "Fixing flac file $1" echo "Fixing flac file $1"
echo "running command ffmpeg -i $1 -c:a flac -map_metadata 0 "fixed.flac"" echo "running command ffmpeg -i $1 -c:a flac -map_metadata 0 fixed.flac"
ffmpeg -i $1 -c:a flac -map_metadata 0 "fixed.flac" ffmpeg -i "$1" -c:a flac -map_metadata 0 "fixed.flac"
echo "moving fixed.flac to $1" echo "moving fixed.flac to $1"
mv "fixed.flac" $1 mv "fixed.flac" "$1"