Fix tag script mp3 issue (#1182)
* Fix tag script mp3 issue When you don't manually specify $total and $date with an mp3 file the eyeD3 command tries tagging with an empty variable, which causes it to error. This fixes it by only passing the parameter to the command if the variable is set. This pull request also adds support for the $genre and $comment variable. * Remove double backslash
This commit is contained in:
parent
5ff7f70b64
commit
41b729acd3
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,11 @@ Total=$total
|
||||||
Date=$date
|
Date=$date
|
||||||
Genre=$genre
|
Genre=$genre
|
||||||
Comment=$comment" | opustags -i -S "$file" ;;
|
Comment=$comment" | opustags -i -S "$file" ;;
|
||||||
*.mp3) eyeD3 -Q --remove-all -a "$artist" -A "$album" -t "$title" -n "$track" -N "$total" -Y "$date" "$file" ;;
|
*.mp3) eyeD3 -Q --remove-all -a "$artist" -t "$title" -A "$album" -n "$track" \
|
||||||
|
${total:+-N "$total"} \
|
||||||
|
${date:+-Y "$date"} \
|
||||||
|
${genre:+-G "$genre"} \
|
||||||
|
${comment:+-c "$comment"} "$file" ;;
|
||||||
*.flac) echo "TITLE=$title
|
*.flac) echo "TITLE=$title
|
||||||
ARTIST=$artist
|
ARTIST=$artist
|
||||||
ALBUM=$album
|
ALBUM=$album
|
||||||
|
|
Loading…
Reference in a new issue