Artist Fanart in the music library
#1
Hi,

I am trying to get something in my skin, I cannot figure out if it possible or not.

The idea is that when browsing the music library, when I go to a path such as musicdb://artists/5 (thus selecting all the media from artist 5), I would like do display the fanart corresponding to artist 5.

I tried using $INFO[ListItem.Art(fanart)] but it returns the fanart for the currently selected media in the the main panel of MyMusicNav (which is a logical behavior). However I cannot find a way to display the fanart for the current artist from the db path.

Anyone knows if this is supported?
Reply
#2
Are you sure you've got fanart scraped because $INFO[ListItem.Art(fanart)] definitely works?

Press i on the artist and choose fanart to check.
Reply
#3
Hi,
It works when the path is:

musicdb://artists/

then $INFO[ListItem.Art(fanart)] will return fanart for the currently selected artist.

But when the path is:

musicdb://artists/5/

Then it will return fanart for the currently selected album of artist 5. The problem is that an item is not always selected, and moreover you have situations where the albums from a request such as musicdb://artists/5/ are from various artists (i.e. featurings). My idea was to display the fanart for artist #5 regardless of the currently selected item...

I hope this is clear, but I think this is actually not supported....
Reply
#4
Misunderstood, sorry.

Try Container.Art(artist.fanart).
Reply
#5
Well I would say it is half working Smile

When the path is something like:

musicdb://artists/5/4/

(So album number 4, from artist number 5), Container.Art(artist.fanart) will return the right fanart for the album's artist. But when the path is something like:

musicdb://artists/5/

It seems this returns nothing, which is in line with the manual that says:
Quote:Container.Art(artist.fanart) : Fanart Image of the parent album artist
Reply
#6
ok I have investigated this further, and I believe there are some issues with the current Container.Art property implementation.

The art is attached to the item list in CGUIWindowMusicBase::GetDirectory(), and currently it will only do something is the container contains an Album, with this code:
Code:
if (params.GetAlbumId())
  {
    map<string, string> artistArt;
    if (m_musicdatabase.GetArtistArtForItem(params.GetAlbumId(), MediaTypeAlbum, artistArt))
      items.AppendArt(artistArt, MediaTypeArtist);

    map<string, string> albumArt;
    if (m_musicdatabase.GetArtForItem(params.GetAlbumId(), MediaTypeAlbum, albumArt))
      items.AppendArt(albumArt, MediaTypeAlbum);
  }

The first issue is that GetAlbumId() returns -1 if the content is not an album (not 0), I believe the test should be if (params.GetAlbumId() > 0).

The second issue is that nothing is done when the content is an artist, which prevented me from getting the result I wanted.

I have added a CMusicDatabase::GetArtistArtForArtist() method, to do the job in such cases, I am going to submit a pull request for this.
Reply
#7
(2015-08-16, 13:37)pbureau Wrote: Well I would say it is half working Smile

When the path is something like:

musicdb://artists/5/4/

(So album number 4, from artist number 5), Container.Art(artist.fanart) will return the right fanart for the album's artist. But when the path is something like:

musicdb://artists/5/

It seems this returns nothing, which is in line with the manual that says:
Quote:Container.Art(artist.fanart) : Fanart Image of the parent album artist
Container.Art(artist.fanart) shouldn't work at musicdb://artists/5/ because the container is the artists folder which has no art.
Reply

Logout Mark Read Team Forum Stats Members Help
Artist Fanart in the music library0