2017-11-28, 06:02
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".
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.
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.
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.