Bug 9360 - Artwork scanner doesn't find arbitrarily-named cover art
: Artwork scanner doesn't find arbitrarily-named cover art
Status: RESOLVED DUPLICATE of bug 601
Product: Logitech Media Server
Classification: Unclassified
Component: Artwork
: 7.3.0
: Other Other
: -- minor (vote)
: ---
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-01 15:51 UTC by Jeremy Kerr
Modified: 2008-09-17 09:00 UTC (History)
0 users

See Also:
Category: ---


Attachments
Add glob fallback for artwork scanner (1.47 KB, patch)
2008-09-01 15:51 UTC, Jeremy Kerr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Kerr 2008-09-01 15:51:09 UTC
Created attachment 3922 [details]
Add glob fallback for artwork scanner

I have my album artwork in a file named after the album. For example:

Underworld/dubnobasswithmyheadman/dubnobasswithmyheadman.jpg

The %ALBUM.jpg pattern nearly works for my needs, but breaks in a couple
of situations:

* where the image isn't a specific extension - if I have a .png or
.jpeg cover art file, there's doesn't seem a way to handle this. If I
don't specify an extension, the scanner assumes '.jpg':

Underworld/AHundredDaysOff/AHundredDaysOff.jpg
Underworld/Beaucoup Fish/Beaucoup Fish.png

 - won't work, as the extension varies

* where the filename needs to differ from the album name. For example,
the album has a '/' in the name:

Underworld/Dirty Epic-Cowgirl/Dirty Epic-Cowgirl.jpg

 - won't work, as the album name is actually "Dirty Epic/Cowgirl", but
   the slash has been replaced, as it can't appear in a filename

The attached patch fixes this, by falling back to a glob pattern for artwork in the parent directory. The glob pattern is *.ext, where ext
is any of the items in the existing list of acceptable extensions. If
there are multiple matches, we just use the first.

Tested on Linux. File::Glob is in the Perl core, so should work on Mac
and Windows too, but testing would be great.
Comment 1 KDF 2008-09-02 12:41:32 UTC
see also bug 601
Comment 2 James Richardson 2008-09-17 09:00:56 UTC

*** This bug has been marked as a duplicate of bug 601 ***