2015-11-17, 16:02
Hi,
note: the solution as mentioned does not set the art. It probably works but I did not need it actually set. Just the url transfered.
I need to modify the information in my music-playlist when I add items to the list.
Using my humble attempt below, I can add/play the playlist, but the values I want to change are not changed at all. Instead the values I do see in the skin using $Info[mediaplayer....] originates from somewhere else!? And definily not added by me! F.ex. I have set the "Album" tag to show the ID, but it gets changed back to show an Album name - even though I never added that - wooooot!?! Actually it appears the url passed is being processed by another process that overrides my decisions.
Please help!
The "title" seems to be "reset" to the song title, and so it goes for the other values also.
If the "listitem" is passed together with "player.play", the information is showing nicely - so I assumed it would "just work" when the listitem was added to the playlist.
I found some info and inspiration here:
http://mirrors.xbmc.org/docs/python-docs...ayList-add
http://mirrors.kodi.tv/docs/python-docs/...l#ListItem
Kodi (16.0-BETA2 Git:20151115-07f691e)
note: the solution as mentioned does not set the art. It probably works but I did not need it actually set. Just the url transfered.
I need to modify the information in my music-playlist when I add items to the list.
Using my humble attempt below, I can add/play the playlist, but the values I want to change are not changed at all. Instead the values I do see in the skin using $Info[mediaplayer....] originates from somewhere else!? And definily not added by me! F.ex. I have set the "Album" tag to show the ID, but it gets changed back to show an Album name - even though I never added that - wooooot!?! Actually it appears the url passed is being processed by another process that overrides my decisions.
Please help!
Code:
playlist =xbmc.PlayList(xbmc.PLAYLIST_MUSIC)
listitem = xbmcgui.ListItem(songID, thumbnailImage=thumb)
listitem.setInfo('music', {'Title': title, 'Album': albumID})
listitem.setArt({'thumbnailImage': thumb})
playlist.add(url=url, listitem=listitem, index=-1)
xbmc.Player().play()
The "title" seems to be "reset" to the song title, and so it goes for the other values also.
If the "listitem" is passed together with "player.play", the information is showing nicely - so I assumed it would "just work" when the listitem was added to the playlist.
I found some info and inspiration here:
http://mirrors.xbmc.org/docs/python-docs...ayList-add
http://mirrors.kodi.tv/docs/python-docs/...l#ListItem
Kodi (16.0-BETA2 Git:20151115-07f691e)