[import_images] Fixed bug where DISCID could not be determines for change in print_meta_cue function

This commit is contained in:
ayakael 2018-07-23 06:12:04 -08:00
parent 7f3a05c6ba
commit 90d3716842
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -45,7 +45,7 @@ import_images() {
if [[ -z "${ACCURIP}" ]] && [[ "${SOURCE}" == "CUETOOLS" ]]; then return 2; fi if [[ -z "${ACCURIP}" ]] && [[ "${SOURCE}" == "CUETOOLS" ]]; then return 2; fi
# Parses cue file for DISCID # Parses cue file for DISCID
local METADATA=$(print_meta_cue "${CUE}") local METADATA=$(print_meta_cue "${CUE}" | tr '\n' ';')
local discidList=($(awk 'BEGIN{FS="=";RS=";"}{if($1=="DISCID"){print $2}}' <<<${METADATA} | awk '!seen[$0]++')) local discidList=($(awk 'BEGIN{FS="=";RS=";"}{if($1=="DISCID"){print $2}}' <<<${METADATA} | awk '!seen[$0]++'))
[[ ${#discidList[@]} -ne 1 ]] && return 3 [[ ${#discidList[@]} -ne 1 ]] && return 3