[import_src] Fixed bug where SOURCE would get overriden by DISCID. DISCID from EAC is now extracted from CUE file

This commit is contained in:
ayakael 2018-07-16 04:59:31 -08:00
parent eaf7fb4389
commit 37266463ce
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -35,8 +35,10 @@ import_src() {
# Generates IMAGEID
echo "Generating IMAGEID"
[[ "${SOURCE}" == "CUETOOLS" ]] && local SOURCE=$(grep "CTDB TOCID:" ${TRACK_DIR}/accurip)
local IMAGEID="SHA256-${SOURCE}--$(sha256sum "${TRACK_DIR}/flac" | cut -d' ' -f1)"
local DISCID="${SOURCE}"
[[ "${SOURCE}" == "CUETOOLS" ]] && local DISCID=$(grep "CTDB TOCID:" ${TRACK_DIR}/accurip | cut -d' ' -f3 | sed 's|-]||')
[[ "${SOURCE}" == "EAC" ]] && local DISCID="$(grep "REM DISCID" ${TRACK_DIR}/cue | cut -d' ' -f3)"
local IMAGEID="SHA256-${DISCID}--$(sha256sum "${TRACK_DIR}/flac" | cut -d' ' -f1)"
# Generate metadata_trackList
echo "Generating metadata"