07-30-2023, 04:18 PM
(07-30-2023, 03:13 PM)Tim Curtis Wrote:(07-30-2023, 01:14 PM)Nutul Wrote:(07-30-2023, 12:03 PM)Tim Curtis Wrote: (...) the thumbnail generator will eventually end up hashing the last one. At least I think thats what might be happening.
It sounds logical, but isn't the thumbnail generator create the image ONLY if it isn't already there... that should prevent it to overwrite an already existing one...
Look at how the logic in the while loop would handle the case where there could be multiple same album dirs in the song file list as would only be the case when the Prefs setting was set to one of the + options.
For example in the list below the directory album2 would only trigger a hash check / thumb creation when the loop advanced to album3 ($dirA != $dirB). When that happens tim.jpg is used as the cover instead of cover.jpg.
album1 cover.jpg
album2 cover.jpg
album2 kent.jpg
album2 tim.jpg
album3 albert.jpg
Yes, now that I see it... this also explains why the folder file priority works, as it specifically looks for Cover, cover, Folder, folder... and voilà...
Perhaps we should do a refactoring of the image-detection scheme, based on priority, with cascading fallbacks...
Example:
PRIORITY EMBEDDED:
1. look into the embedded art
2. if not found, look for specific names (again Cover / Folder, as it is now for the folder file)
3. if not found, look for any image (if "+" present)
PRIORITY FILE
1. look for specific names (again Cover / Folder, as it is now for the folder file)
2. if not found, look for EMBEDDED
3. if not found, look for any image (again, if "+" present)
In the latter, maybe 2 and 3 can be swapped, but I'd leave them in this order.
The step 2 of the EMBEDDED case above should fix the OP issue.
What do you think?
P.S.
Today I was testing a file without album-art, and noticed it took the image file I have in the root folder (/USB/Music) of my external drive instead of the "not-found" one...
Now, it is true that I still test my "Hybrid" priority, but there is no image in the file folder to justify it... could it be related, despite the fact I had the thumb scan option on "Default"?