Merge pull request #211 from utf8please/patch-1

Limit result to one line when parsing cover size.
This commit is contained in:
Krumpet Pirate 2023-01-29 11:29:36 -06:00 committed by GitHub
commit e66c51dbfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -807,7 +807,7 @@ do
fi fi
extra_crop_cover='' extra_crop_cover=''
cover_width=$(ffprobe -i "${cover_file}" 2>&1 | $GREP -Po "[0-9]+(?=x[0-9]+)") cover_width=$(ffprobe -i "${cover_file}" 2>&1 | $GREP -Po "[0-9]+(?=x[0-9]+)" | tail -n 1)
if (( ${cover_width} % 2 == 1 )); then if (( ${cover_width} % 2 == 1 )); then
if [ "$((${loglevel} > 1))" == "1" ]; then if [ "$((${loglevel} > 1))" == "1" ]; then
log "Cover ${cover_file} has odd width ${cover_width}, setting extra_crop_cover to make even." log "Cover ${cover_file} has odd width ${cover_width}, setting extra_crop_cover to make even."