load album cover when multi-jpg files in album's directory

Asked by alexxtasi

Hi all,
In many of my album directories there are more than one .jpg files representing the album's cover (also back cover, inside etc)
The pattern is that the cover (front cover) has the same filename as the directory and all other jpg a similar one, like:

directory-name -> {artist - title - year}
cover - name -> {artist - title - year}.jpg
other cover -> {artist - title - year}_back.jpg
... etc ...

When only the cover file exists ({artist - title - year}.jpg), Noise is reading it as the album's cover correctly.
When the are more than one jpg file, Noise is reading an other one (as far as I can inspect in my library)

What method is Noise following to choose the album cover file ?
Is this a kind of shorting method (eg the first jpg file inside the directory) ?
Or I am missing something here ?

thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Noise Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Best Manfred Hampl (m-hampl) said :
#1

I am no developer, so what I am saying might completely wrong.

It seems that the logic to identify the correct image is at http://bazaar.launchpad.net/~elementary-apps/noise/trunk/view/head:/src/Objects/CoverartCache.vala#L193

Apparently the selection criteria are the occurrence of "folder", "cover", "album" and/or "front" in the image name.

If you rename the cover files into "{artist - title - year}_cover.jpg" they should be selected.

You could also make an suggestion to the developers, that the "{artist - title - year}.jpg" file be selected as next priority if no "cover" file is found. I do not know how the search algorithm would have to be formulated for this.

Revision history for this message
alexxtasi (alexxtasi) said :
#2

It seems you are right!
Looks like this method is choosing which image file to load as album's cover

Since I also have no Vala knowledge, I will make a feature request and wait for answers (https://bugs.launchpad.net/noise/+bug/1500480)

many thanks Manfred

Revision history for this message
alexxtasi (alexxtasi) said :
#3

Thanks Manfred Hampl, that solved my question.