From da3b555e6c36d4cc31cf1f62781ff7dfe1458afe Mon Sep 17 00:00:00 2001 From: Sem Date: Mon, 20 Jul 2026 13:48:10 +0200 Subject: [PATCH] Add printing help --- fix_unknown_album_and_artist_flac_file.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/fix_unknown_album_and_artist_flac_file.sh b/fix_unknown_album_and_artist_flac_file.sh index f2af6ff..9ef3ca0 100755 --- a/fix_unknown_album_and_artist_flac_file.sh +++ b/fix_unknown_album_and_artist_flac_file.sh @@ -21,11 +21,26 @@ function fix_flac_file() mv "fixed.flac" "$1" } +function print_help() +{ + echo "script to fix where flac tags are set correctly but navidrome still sees them as having [Unknown album] and [Unknown artist]" + echo "usage: fix_unknown_album_and_artist_flac_file.sh FILENAME [LOCATION] [-l]" + echo "parameters:" + echo "\tFILENAME: file to fix. Can be a relative or absolute path" + echo "\tLOCATION: optional, location of the file, if the script is run from a different directory than where the file to fix is." + echo "\t-l LISTFILE: optional, location of file containing multiple files to fix, each starting with a new line. " + echo "\tThis is the same as running the script for each single file in the list" +} + if [ -z "$2" ] then echo "staying in current directory" else - if [ "$1" = "-l" ] + if [ "$1" = "-h" ] + then + print_help + exit 0 + elif [ "$1" = "-l" ] then echo "Looping through $2" while read flacfile; do