Bug 37 - Album art is converted unnecessarily if the album art file name contains space characters
Summary: Album art is converted unnecessarily if the album art file name contains spac...
Status: CONFIRMED
Alias: None
Product: abcde
Classification: Unclassified
Component: Album art (show other bugs)
Version: unspecified
Hardware: All All
: Normal minor
Assignee: Andrew Strong
URL:
Depends on:
Blocks:
 
Reported: 2016-07-19 08:53 BST by Peter Hülstede
Modified: 2016-07-19 08:53 BST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hülstede 2016-07-19 08:53:29 BST
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)