[db_set] Fixed value comparison because of now non-existent extra character from print_meta_mtag

This commit is contained in:
ayakael 2018-12-30 09:17:31 -05:00
parent cfcd9fb697
commit a1be609425
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -53,10 +53,10 @@ db_set() {
local COUNT=1
while [[ ${COUNT} -le ${TOTALTRACKS} ]]; do
local TRACK_VALUE=$(print_meta_mtag "${GIT_DIR}/${imageid}.tags" ${COUNT} ${FIELD} | cut -d'=' -f2 | sed 's|.$||' | tr '[:lower:]' '[:upper:]')
local TRACK_VALUE=$(print_meta_mtag "${GIT_DIR}/${imageid}.tags" ${COUNT} ${FIELD} | cut -d'=' -f2 | awk '{print toupper($0)}')
# If print_meta_mtag extract the same VALUE from FIELD as the CONDITION, the TRACKID of this TRACK is added into trackidList
if [[ "${TRACK_VALUE}" == "${VALUE}" ]]; then
local TRACKID=$(print_meta_mtag "${GIT_DIR}/${imageid}.tags" ${COUNT} TRACKID | cut -d'=' -f2 | sed 's|.$||')
local TRACKID=$(print_meta_mtag "${GIT_DIR}/${imageid}.tags" ${COUNT} TRACKID | cut -d'=' -f2 )
_msg ECHO "Track ${COUNT} of ${imageid} matches condition. Adding to trackidList"
local trackidList[${COUNT}]="${TRACKID}"
fi