• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 11
v18 Implemented feature request for Music library extended artwork support
#16
Yeah, I'm usually not very good at clear and concise -- I either ramble or leave out all the context. I think I just got lucky with the opener.

The trouble now is in the getters, when Kodi pulls already set artwork from the database/library and presents them for API and skin consumption. The list Kodi presents is missing some artwork in some cases. One, "AudioLibrary.GetSongs" and other song info getters excludes all album artwork "album.*" if the song has any of its own artwork.

This is the result from a song that does not have any of its own artwork, note that "album.thumb" is included in "art".
Code:
{
  "art": {
    "album.thumb": "image://smb%3a%2f%2fCUBER%2fMusic%2fMusic%2f30%20Seconds%20to%20Mars%2f30%20Seconds%20to%20Mars%20-%2030%20Seconds%20to%20Mars%20%5b2002%5d%2ffolder.jpg/",
    "artist.fanart": "image://http%3a%2f%2fassets.fanart.tv%2ffanart%2fmusic%2fd8354b38-e942-4c89-ba93-29323432abc3%2fartistbackground%2f30-seconds-to-mars-4e9ae7e66e8fc.jpg/"
  },
  "label": "Fallen",
  "songid": 49497
}

This one is from a song that I've set a 'clearart' image to directly, note that 'album.thumb' is missing. A contrived example, but all album artwork should always be included if it exists.
Code:
{
  "art": {
    "artist.fanart": "image://http%3a%2f%2fassets.fanart.tv%2ffanart%2fmusic%2fd8354b38-e942-4c89-ba93-29323432abc3%2fartistbackground%2f30-seconds-to-mars-4e9ae7e66e8fc.jpg/",
    "clearart": "image://http%3a%2f%2fassets.fanart.tv%2ffanart%2fmusic%2fd8354b38-e942-4c89-ba93-29323432abc3%2fartistbackground%2f30-seconds-to-mars-4e9ae7e66e8fc.jpg/"
  },
  "label": "Edge of the Earth",
  "songid": 49496
}

Two, "AudioLibrary.GetSongs" and "AudioLibrary.GetAlbums" and friends are missing all artist artwork except 'fanart'. In this case there should be an "artist.thumb" in the previous examples, but the code specifically only picks 'fanart'. I don't want artwork for all roles, API consumers just have to work a bit harder if they really need them all.

That comment was about the specific code causing the trouble, rather than the desired end result. I had started to work on a fix myself, but ran into a situation I don't know how to resolve.
Reply
#17
Doing fine Ryan, also happy for you to work on fixes Smile
Think I am clearer now too. If I appear slow on this it is because it is not feature of Kodi that I actually use myself, so spelling out what you want to achieve helps.

a) AudioLibrary.GetSongs and GetSongDetails "art"  field to return all the song art, and all the album art and all the (song or album ?) artist art.
b) AudioLibrary.GetAlbums and GetAlbumDetails "art"  field to return all the album art, and all the album artist art.

The way Thumbloader works is historically based on finding a thumbnail and some fanart (for screen background) for the item, not all possible art. Hence if the song has thumb of its own it does not fetch album art, and only getting artist fanart. Also for albums we actually fetch song art (but don't call it that) if the only art is embedded in the song file. Thumbloader is used in various places, not just to provide JSON results, and so I need to look at if all those places would benefit from getting all the art, or needs to continue as it is.
Reply
#18
a) include song artist artwork as "artist.*" and only if none is found include album artist as "albumartist.*", as it currently does for just fanart.
b) spot on

Skins also need all this artwork, through "ListItem.Art" and "Player.Art"; both currently behave the same as the API.
Reply
#19
For songs just wondering while returning all the art why not return both song artist ("artist.*") and album artist ("albumartist.*")  art if they are different artists?

For JSON this is just about returning form strings in the array, so happy to return the lot. What I am being more catious with is what the background loader does, and trying to ensure that a load of actual images don't get loaded from cache unless they are being used. Oh and checking where "thumb" and "fanart" are hard coded, and if that needs modifying too.
Reply
#20
Returning artwork for both artists is a good idea.
Reply
#21
OK, then even more expansively what about multiple artists e.g. collaboration albums (lots classical music has composer + conductor + orchestra etc.) or songs with featured artist?

The current design depends on there being no more than one of each type of art work, hence "thumb" and "artist.thumb", but would "artist2.thumb", "albumartist2.fanart" etc. be workable?

Not sure how far to go with the art explosion Smile
But if people want to cycle through images of an artist, then why not have images of all the song artists on say a duet?
Reply
#22
I'm always one for Keeping it simple Smile

Personally even with collaboration artists TADB does not distinguish between them and takes the lead artist for artwork.
Reply
#23
Kodi has the multiple artist data, and it is simple to fetch it, limiting to just primary artist is unnecessary. I am looking to improve the query efficiency so there will be no overheads in doing it either.  But whether skins and addons can or want to make use of it is another matter. 

The truely simple approach is just to show a thumb for every item, but people clearly want more than that for visual richness. My feeling is it is really up to them, and personally I listen with TV off so other than seeing the album cover during selection I don't use art much. But as I said if users  like to cycle through different artist images during playback  then why not have images of all the song artists on say a duet rather than just the primary, or both composer, conductor and orchestra when listening to classical muisc?

The real question is whether a clean and obvious way of making all the art data available to skin and addons can be found.
Reply
#24
(2017-12-06, 11:57)DaveBlake Wrote: The real question is whether a clean and obvious way of making all the art data available to skin and addons can be found.
Yep exactly!
Reply
#25
Haha yeah, that's why my first suggestion was just to expand on the "one or the other" artist that it already worked with.

"artist2.thumb", "albumartist2.thumb", and such should work fine; I've been using "fanart", "fanart1", "fanart2", and so on for multiple fanart and it's turned out well, and it fits nicely with the existing rules. Even "composer.thumb", "orchestra.fanart", and a couple of other primary roles could work here. For all roles, though, this will get cumbersome.

Skins have to specify the exact arttype to access artwork directly from an item, so it would be a nightmare to grab all contributors this way ("guestguitar.thumb", "organs.thumb", "harmoniumandpiano.thumb", so on and so on and so on), but they can build a secondary list that includes all contributors with a path like "musicdb://artists/?albumartistsonly=false&role=-1000&songid=$INFO[ListItem.DBID]", then pull any info from artists in that list, including art.
API clients, including add-ons, can make one more request to "AudioLibrary.GetArtists" with similar params, and can even provide multiple songids to load a list of songs. The resulting list of artists with artwork directly attached is easier to reason about than comparing a song's "art" map with items in the "contributors" list to pair the artwork with a name.
Reply
#26
Sorry but I can't understand completely all that is being discussed, but I would love to have an easy way to retrieve and update thumbbacks and spines for albums from theaudiodb since I use them in my mod (Aeon Nox Spin) and I would like to prepare a version for Leia too... will it be possible with these changes? Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#27
(2017-12-07, 17:59)manfeed Wrote: Sorry but I can't understand completely all that is being discussed, but I would love to have an easy way to retrieve and update thumbbacks and spines for albums from theaudiodb since I use them in my mod (Aeon Nox Spin) and I would like to prepare a version for Leia too... will it be possible with these changes? Thanks!
 It will be possible for addons to be written that access TADB and then store the backs and spines in Kodi, and for skins to then fetch and show them. But I am only working on the Kodi core/db parts, totally up to others to write addons and make use of it in skins.
Reply
#28
(2017-12-07, 17:59)manfeed Wrote: Sorry but I can't understand completely all that is being discussed, but I would love to have an easy way to retrieve and update thumbbacks and spines for albums from theaudiodb since I use them in my mod (Aeon Nox Spin) and I would like to prepare a version for Leia too... will it be possible with these changes? Thanks!
 
I will update Artwork Beef to populate and manage the selected images in Kodi's library. Skins will be able to use "ListItem.Art(spine)" to display them, just like extended artwork in the video library.
Reply
#29
(2017-12-07, 23:27)rmrector Wrote:
(2017-12-07, 17:59)manfeed Wrote: Sorry but I can't understand completely all that is being discussed, but I would love to have an easy way to retrieve and update thumbbacks and spines for albums from theaudiodb since I use them in my mod (Aeon Nox Spin) and I would like to prepare a version for Leia too... will it be possible with these changes? Thanks!
 
I will update Artwork Beef to populate and manage the selected images in Kodi's library. Skins will be able to use "ListItem.Art(spine)" to display them, just like extended artwork in the video library. 
Great! Thank you!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#30
The PR adding "art" parameter to JSON API audio library Get and Set methods https://github.com/xbmc/xbmc/pull/13101 has now merged.

I'm plodding along Ryan. After the holidays I will finish off the Thumbloader changes to core that will return the location of all album and artist art for songs (not just as a fall back when the song art is missing). That will be another PR.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 11

Logout Mark Read Team Forum Stats Members Help
Implemented feature request for Music library extended artwork support0