devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 187 forks source link

Improve album art search. #427

Open vext01 opened 10 years ago

vext01 commented 10 years ago

Hi again,

Sorry for raising a bug a day ;)

The album art fetching could be improved. I think that perhaps the layout of my collection is outside the norm. My music directory has two sub-folders OGG and MP3. Under each we then have $artist/$album/ and in here the tracks of that album.

My OGG folder looks a bit like this: 1

Note the same "default" album art on many of the entries. Let's look why this could be. I'll click the spanner on the chimaira entry:

2

So here cherrymusic searched for "OGG/chimaira" and found nothing (not sure where the "default" art comes from). Let's try removing the OGG prefix:

3

Ah ha! Any of those would do.

So I wonder if automatic detection of album art can be improved -- perhaps by using tags?

Cheers

Suika commented 10 years ago

And if you want to use google to search for images, change albumartfetcher.py on L78 from amazon to google.

devsnd commented 10 years ago

Hi Edd!

Thanks to you i discovered a flaw in the search term sanitation process. All characters which aren't a-z were replaced by an empty string. So boards_of_canada becomes boardsofcanada and yields no results. I just changed the behavior to replace any of those characters by spaces so it becomes boards of canada.

The default way the albumartfetcher works is to take the current folder and it's parent folder's name and to search for them. Maybe we should just change it to the folder name only.

vext01 commented 10 years ago

Great. Glad to be of help!

So here is the view with the latest code:

4

Searching for the folder name only may give better results. If in doubt, you could make this configurable in the config file, although it would be yet another knob.

Same time tomorrow, yeh?

devsnd commented 10 years ago

I've now changed the album art search to only use the folder name alone, I hope it helps :jack_o_lantern:

devsnd commented 10 years ago

How's the situation here, are the results now satisfiying? Can we close this issue?

vext01 commented 10 years ago

I'll try again a bit later.

vext01 commented 10 years ago

At least we don't see that amazon "look inside" image any more.

See #441 for an example of some "not so great" album art hits.

devsnd commented 10 years ago

I think the results got worse, after @Lord-Simon activated google images as default image search engine (sorry simon!). The amazon images were limited to cd covers, so that many of the images were correct. With the google images, we've got a whole lot of other stuff.

In your example in #441 you seem to have a band called "decapitated"... I'm quite glad to see that the google image search seems to have the family filter on by default! ;)

Maybe we should switch back to amazon images. @Lord-Simon, any objections?

Suika commented 10 years ago

I have no objections, but the easiest way would be to have a dropdown in the search modal that would send the search engine to the album fetcher to use. These can be hard coded(not nice) as there are only 3 engines. You can also try to remove &imgsz=medium as that limits the image search to the smaller images. Which are most of the time square images.

About the #441 and that band, safe=off might do the trick, but it'd be questionable what will pop up.