To determine the album art file type the output of identify is split with the cut command at space characters and the second field is interpreted as the image type:
ALBUMARTURLTYPE=$($IDENTIFY "$ABCDETEMPDIR/$ALBUMARTFILE" | cut -d' ' -f2)
This fails, if the album art name contains space characters.
If the file name is first removed from the identify output, the type determination works also in this (exotic) case:
ALBUMARTURLTYPE=$($IDENTIFY "$ABCDETEMPDIR/$ALBUMARTFILE" | sed -e "s|$ABCDETEMPDIR/$ALBUMARTFILE||" | cut -d' ' -f2)