Rockbox

Tasklist

FS#10201 - Fix album art file search priority

Attached to Project: Rockbox
Opened by Akio Idehara (idak) - Monday, 11 May 2009, 15:45 GMT
Last edited by Andrew Mahone (Unhelpful) - Friday, 15 May 2009, 23:27 GMT
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Album Art file search order of priority is described as the following:
---
1. ./ filename . ext - same filename as currently playing music file
2. ./ albumtitle . ext - name of the album, found in metadata of the music file
3. ./cover. ext
4. ./folder.jpg
5. /.rockbox/albumart/ artist-albumtitle . ext
6. ../ albumtitle . ext
7. ../cover. ext
---
But, "./folder.jpg" priority is higher than "./cover.bmp".
This patch fixes this issue.
This task depends upon

Closed by  Andrew Mahone (Unhelpful)
Friday, 15 May 2009, 23:27 GMT
Reason for closing:  Accepted
Additional comments about closing:  Suggested fix of skipping folder.jpg with size_string committed as r20951.
Comment by Akio Idehara (idak) - Wednesday, 13 May 2009, 10:38 GMT
To be exact, above issue is WPS behaviour.
And pictureflow's Album Art file search order of priority is different from WPS.
#pictureflow priority is as wiki.

So I'm confused.
Which priority is correct?
Or different priority is intentioned?
Comment by Jonas Häggqvist (rasher) - Wednesday, 13 May 2009, 17:27 GMT
I don't understand how your patch changes the search order?

Also, both PictureFlow and the WPS use the same function when searching for AA, so I find it hard to believe that they use different priority.
Comment by Akio Idehara (idak) - Thursday, 14 May 2009, 14:32 GMT
WPS calls search function(search_albumart_files()) twice.

First one is with size_strings (like ".100x100") and
Second one is without size_strings (like "").
So WPS exact search order is the following.
--
o First call
1. ./filename.100x100.bmp
2. ./albumtitle.100x100.bmp
3. ./cover.100x100.bmp
4. ./folder.jpg <<< without size_string!
5. /.rockbox/albumart/artist-albumtitle.100x100.bmp
6. ../albumtitle.100x100.bmp
7. ../cover.100x100.bmp

o Second call
8. ./filename.bmp
9. ./albumtitle.bmp
10. ./cover.bmp
11. ./folder.jpg << never select because above 4. priority is high
12. /.rockbox/albumart/artist-albumtitle.bmp
13. ../albumtitle.bmp
14. ../cover.bmp
--

And PictureFlow calls search function(search_albumart_files()) once
without size_string.
So PictureFlow search order is above "Second call"(8. - 14.).

As the result, WPS loads "folder.jpg", but PictureFlow loads "cover.bmp".
This patch is that if size_string is "" then "folder.jpg" search is skipped.
Comment by Magnus Holmgren (learman) - Thursday, 14 May 2009, 14:34 GMT
WPS album art first looks for files with a specific size in their name (e.g., "cover100x100.bmp"), then without. The patch makes the search skip the generic "folder.jpg" (always is without size) when looking for files with a specific size. This also explains why PictureFlow behaves differently, as it doesn't look for files with a specific size.

The patch looks correct to me.

(Edit: Darn, too late. :) )
Comment by Steve Bavin (pondlife) - Thursday, 14 May 2009, 15:11 GMT
>> both PictureFlow and the WPS use the same function when searching for AA, so I find it hard to believe that they use different priority

This might not be true at the moment, but it ought to be MADE true,...!
Comment by Akio Idehara (idak) - Thursday, 14 May 2009, 15:14 GMT
>> This patch is that if size_string is "" then "folder.jpg" search is skipped
This patch is that if size_string is _not_ "" then "folder.jpg" search is skipped

Loading...