2023-08-30, 14:51
This has been frustrating me for days. I'm writing a CBC Radio plugin and want to update the currently playing item since it is a stream and not individual tracks. I have not been able to figure this out on v19 however after updating my dev instance to v20, I fixed it in like 20 min. Since my main box is v19, I'd rather have this working for both versions.
The following is after the stream has started playing. I have no problem setting the initial info (i.e., what is currently playing when the stream starts), the problem is updating said info when the track changes, and only in v19.
This works (v20):
I cannot get this to work (v19):
I'm following the docs here: https://alwinesch.github.io/group__pytho...33afd6ff14
As well as several forum posts which all say basically the same thing.
What am I missing here?
Thanks.
The following is after the stream has started playing. I have no problem setting the initial info (i.e., what is currently playing when the stream starts), the problem is updating said info when the track changes, and only in v19.
This works (v20):
Code:
player = xbmc.Player()
play_item = player.getPlayingItem()
tag = play_item.getMusicInfoTag()
tag.setAlbum(album)
tag.setArtist(artist)
tag.setTitle(song)
tag.setComment(f"{show} with {host}")
player.updateInfoTag(play_item)
I cannot get this to work (v19):
Code:
player = xbmc.Player()
play_item = xbmcgui.ListItem()
play_item.setPath(player.getPlayingFile())
play_item.setInfo('music', {'album': album, 'artist': artist, 'title': song, 'comment': f"{show} with {host}"})
player.updateInfoTag(play_item)
I'm following the docs here: https://alwinesch.github.io/group__pytho...33afd6ff14
As well as several forum posts which all say basically the same thing.
What am I missing here?
Thanks.