artemanufrij / playmymusic

An elementary OS app
http://anufrij.org/melody
97 stars 26 forks source link

Artist image fetching not always successful #34

Open dmanlfc opened 6 years ago

dmanlfc commented 6 years ago

@artemanufrij I have noticed well known artist images are not always downloaded for the Artist view. i.e. Some quick examples... AC/DC, Alicia Keys

AC/DC - https://musicbrainz.org/artist/66c662b6-6e2f-4930-8610-912e24c63ed1 Image link - https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/ACDC_In_Tacoma_2009.jpg/250px-ACDC_In_Tacoma_2009.jpg

Alicia Keys - https://musicbrainz.org/artist/8ef1df30-ae4f-4dbd-9351-1a32b208a01e Image link - https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/AliciaKeys2013.jpg/250px-AliciaKeys2013.jpg

Log example which just repeats every start:

ARTIST ID: 05071a7e-e71c-4306-a509-591cd3686893 (We Don't Need To Whisper / Angels & Airwaves) ARTIST ID: 05071a7e-e71c-4306-a509-591cd3686893 (I-Empire / Angels & Airwaves) ARTIST ID: 05071a7e-e71c-4306-a509-591cd3686893 (Love / Angels & Airwaves) ARTIST ID: 8ef1df30-ae4f-4dbd-9351-1a32b208a01e (Songs in A Minor / Alicia Keys) ARTIST ID: 8ef1df30-ae4f-4dbd-9351-1a32b208a01e (Songs in A minor / Alicia Keys) ARTIST ID: 060e47de-6ce8-4954-808a-689ac685c28d (Blast Off! - Part 1 / Bolt Action) ARTIST ID: ba853904-ae25-4ebb-89d6-c44cfbd71bd2 (The Best Of Blur / Blur)

Dan

dmanlfc commented 6 years ago

Note: If I manually grab the image & update using the GUI it works and those ARTIST ID's are ignored on the next start.

artemanufrij commented 6 years ago

@dmanlfc test it again with master branch please. I improved fetching images from wikipedia.

dmanlfc commented 6 years ago

@artemanufrij OK will test tonight - thanks!

dmanlfc commented 6 years ago

@artemanufrij OK a bit better but still missing covers for well known Artists such as:

AC/DC, Blur, Chris Brown, De La Soul, Eagle-Eye Cherry, George Thorogood & The Destroyers :-)

Also if the Artist name is 'Various Artist' you shouldn't do a look-up. Currently when importing the Library etc the MusicBrainz is in a constant cycle looking for Various Artists. I have a lot of Compilation Albums which will have the Album Artist as Various Artists. Maybe include a generic Artist Artwork to use in the software? Alternatively fallback to the Track Artist tag? ^ Probably better to give a stronger reflection of all Artists in the Library...

artemanufrij commented 6 years ago

Eagle-Eye Cherry hasn't an image on wikipedia https://en.wikipedia.org/wiki/Eagle-Eye_Cherry De La Soul and George Thorogood & The Destroyers haven't a relationship to wikipedia or other images AD/DC should work... :confused: I will test it...

artemanufrij commented 6 years ago

Maybe include a generic Artist Artwork to use in the software?

it's already posible: you need just an image named ['artist.jpg', 'Artist.jpg', 'artist.png', 'Artist.png', 'interpreter.jpg', 'Interpreter.jpg', 'interpreter.png', 'Interpreter.png', 'band.jpg', 'Band.jpg', 'band.png', 'Band.png']

artemanufrij commented 6 years ago

Excluded 'Various Artist'

dmanlfc commented 6 years ago

In TagManager.vala we should grab the Artist name from the Artist tag field first rather than the Album Artist field.

This allows Albums with 'Various Artists' to show independently under the Artists view. Therefore you can see under the Artists view a true reflection of all the songs across all of the Library albums etc.

                    // ARTIST REGION
                    var artist = new PlayMyMusic.Objects.Artist ();
                    if (tags.get_string (Gst.Tags.ARTIST, out o)) {        
                        artist.name = o;
                    } else if (tags.get_string (Gst.Tags.ALBUM_ARTIST, out o)) {
                        artist.name = o;
                    }

Bugger!!! That makes the Album View show various Albums with each Artist if they're part of a compilation. We need more robust code than that dirty hack switch :-)

dmanlfc commented 6 years ago

Also what about using Last.fm for grabbing the artist artwork as a primary method or fallback? https://www.last.fm/api/show/artist.getInfo

artemanufrij commented 6 years ago

hey @dmanlfc I bought an AC/DC album yesterday for testing this issue. I could fix it. Could you test current master branch please?

dmanlfc commented 6 years ago

@artemanufrij yes AC/DC is fixed but there are many popular Artists without thumbnails.

As per above there are two issues:

  1. If there is no artist artwork with your default scraping method there is not another fallback method.

    • Hence suggesting to look at the Last.fm methods as they're more robust & populated with more artwork
  2. The Artists view is based off the 'Album Artist' tag & therefore does not give a true reflection of the artists in the library.

    • Hence is you have compilation albums the Album Artist will likely be 'Various Artists' but each track has the songs appropriate Artist name. These Artists are not shown currently.

It should be:

I hope that helps. I understand this is a database change & requires modifications to the Tag reading code. There's a few coffee's in it for you ;-)

dmanlfc commented 6 years ago

Artist artwok is incorrect - see screenshot

screenshot from 2018-01-16 20-48-00

DanyGee commented 5 years ago

A good fallback option of not finding a cover online would be simply reading it from the local file. For example, all my mp3's have their covers arts already added.

artemanufrij commented 5 years ago

@DanyGee as first I look local ['artist.jpg','Artist.jpg','artist.png','Artist.png','interpreter.jpg','Interpreter.jpg','interpreter.png','Interpreter.png','band.jpg','Band.jpg','band.png','Band.png']

Only if files doesn't exist I try to load it from musicbrainz

DanyGee commented 5 years ago

Thx! That was the info I needed. Now, after all my music got checked on musicbrainz for covers, I just dropped a default artist.png to my music folder and this way all songs that didn't get any covers online, now have my default one set as the background - just didn't want to have blank, white BG on the title :tada: screenshot from 2018-10-23 10 40 11 2x