Bug 167158

Summary: Scanner doesn't set album cover when a non-empty subfolder is present
Product: [Applications] amarok Reporter: Mikko C. <mikko.cal>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: dmeltzer.devel, hydrogen, mitchell
Priority: NOR    
Version: 2.3-GIT   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: output of the command
screenshot of the problem

Description Mikko C. 2008-07-21 18:35:01 UTC
Version:           2.0-SVN (using 4.1.60 (KDE 4.1.60 (KDE 4.2 >= 20080709)), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.26

Example:

/Artist/Album/Track.mp3
/Artist/Album/cover.jpg
/Artist/Album/Subdir/foo.jpg

No cover image is set for the album: cover.jpg should have instead.

I haven't tested if the files in the subfolder must be image files to trigger this bug.

The most common situation I can see in my collection is when the album dir has a subdir "Artwork", "art", "scans", etc, which contain several images. Then, even if the folder has a cover.jpg, it is not picked up by the scanner.
Comment 1 Dan Meltzer 2008-08-20 17:27:40 UTC
Well, right.

And I don't think it should...

What if I had one directory with a number of albums, and one of them (with a cover) was in a subdirectory.... then this cover would be assigned to all of the albums in the parent directory.
Comment 2 Lydia Pintscher 2008-08-20 17:31:37 UTC
Dan: The problem is that it doesn't use the image in the parent folder apparently for those files if there are any subfolders.
Comment 3 Mikko C. 2008-08-20 17:33:43 UTC
I think you mis-understood.
Amarok should assign "cover.jpg" to the album, not "Subdir/foo.jpg".

If you didn't, can you please make an example?

What do you mean by "one directory with a number of albums"? Many tracks from different albums in a single directory? That would be like a compilation?
Comment 4 Dan Meltzer 2008-08-24 04:34:44 UTC
Sorry, I misunderstood what you said, I thought you meant the inverse... Lets investigate this...
Comment 5 Dan Meltzer 2008-08-24 04:43:22 UTC
Could you post the output of amarokcollectionscanner -r /path/to/directory/where/this/occurs ?  It would be helpful.
Comment 6 Mikko C. 2008-08-24 11:01:40 UTC
Created attachment 27013 [details]
output of the command

This is the output you asked, only for one directory, but it happens on all those that have a subdirectory with some image files.
Comment 7 Mikko C. 2008-12-19 19:06:25 UTC
Created attachment 29454 [details]
screenshot of the problem

This is still valid and I think it's a bug.
Here's a screenshot that explains the problem.
Why is the cover not set for the album?
Comment 8 Mark Kretschmann 2008-12-19 19:50:41 UTC
Confirming based on Mikko's observation.
Comment 9 Myriam Schweingruber 2009-05-31 10:40:15 UTC
Any news on this?
Comment 10 Mikko C. 2009-05-31 10:44:53 UTC
still present in 2.1.
Comment 11 Mikko C. 2009-07-07 13:12:29 UTC
Some more info: the file in the sub-folder doesn't have to be an image, it can be any file.

Some relevant output from amarokcollectionscanner -r .

<image path="/mnt/mybook/Eminem - Relapse/Bonus/cover.jpg" list="EminemAMAROK_MAGICRelapse [Bonus Disc]" />

<compilation path="/mnt/mybook/Eminem - Relapse/Bonus" />

<dud/>/mnt/mybook/Eminem - Relapse/cover.jpg

<image path="/mnt/mybook/Eminem - Relapse/cover.jpg" list="" />

<compilation path="/mnt/mybook/Eminem - Relapse" />



As you can see:
<image path="/mnt/mybook/Eminem - Relapse/cover.jpg" list="" />

should be:
<image path="/mnt/mybook/Eminem - Relapse/cover.jpg" list="EminemAMAROK_MAGICRelapse" />
Comment 12 Myriam Schweingruber 2009-08-09 15:50:54 UTC
Could somebody have a look at this?
Comment 13 Jeff Mitchell 2009-08-20 17:59:25 UTC
Fixed in eb32c05a38c901a7709f794366363bca218c458b (pre-2.2).