v1.3 - Improve lyric extraction when tag is a different case...
This commit is contained in:
parent
d483eb859d
commit
3c75baaa6c
1 changed files with 13 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
scriptVersion="1.2"
|
||||
scriptVersion="1.3"
|
||||
scriptName="LyricExtractor"
|
||||
|
||||
#### Import Settings
|
||||
|
@ -56,11 +56,23 @@ find "$getFolderPath" -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" -print0 |
|
|||
if [ "$fileExt" == "flac" ]; then
|
||||
log "Processing :: $getAlbumFolderName :: $fileName :: Getting Lyrics from embedded metadata"
|
||||
getLyrics="$(ffprobe -loglevel 0 -print_format json -show_format -show_streams "$file" | jq -r ".format.tags.LYRICS" 2>/dev/null | sed "s/null//g" | sed "/^$/d")"
|
||||
if [ ! -z "$getLyrics" ]; then
|
||||
getLyrics="$(ffprobe -loglevel 0 -print_format json -show_format -show_streams "$file" | jq -r ".format.tags.Lyrics" 2>/dev/null | sed "s/null//g" | sed "/^$/d")"
|
||||
fi
|
||||
if [ ! -z "$getLyrics" ]; then
|
||||
getLyrics="$(ffprobe -loglevel 0 -print_format json -show_format -show_streams "$file" | jq -r ".format.tags.lyrics" 2>/dev/null | sed "s/null//g" | sed "/^$/d")"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$fileExt" == "opus" ]; then
|
||||
log "Processing :: $getAlbumFolderName :: $fileName :: Getting Lyrics from embedded metadata"
|
||||
getLyrics="$(ffprobe -loglevel 0 -print_format json -show_format -show_streams "$file" | jq -r ".streams[].tags.LYRICS" 2>/dev/null | sed "s/null//g" | sed "/^$/d")"
|
||||
if [ ! -z "$getLyrics" ]; then
|
||||
getLyrics="$(ffprobe -loglevel 0 -print_format json -show_format -show_streams "$file" | jq -r ".streams[].tags.Lyrics" 2>/dev/null | sed "s/null//g" | sed "/^$/d")"
|
||||
fi
|
||||
if [ ! -z "$getLyrics" ]; then
|
||||
getLyrics="$(ffprobe -loglevel 0 -print_format json -show_format -show_streams "$file" | jq -r ".streams[].tags.lyrics" 2>/dev/null | sed "s/null//g" | sed "/^$/d")"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -z "$getLyrics" ]; then
|
||||
|
|
Loading…
Reference in a new issue