2010-01-06, 01:49
I have a plugin with a list of music that is remotely located on remote webserver (http://).
I create the directory list and then click on an item
If I leave out the setInfo, it treats it as unknown and uses the dvdplayer/mplayer to playback which plays fine but there is no useful meta data for the file playing. if I use setinfo, it defaults to PAPLAYER which cannot play the files over http so it fails.
My workaround was to set the URL to point back to my plugin, and then I manually played the file forcing the player XBMC uses by making a new instance of player with and then creating a list item and meta data and sending it to the player. this works fine, but then unfortunately XBMC does not know where it is in the list or which file is playing.
Is there any way to force the default player, from a listitem/directory itself?
Also if PAPLAYER does not work with music files over http://, then surely it should decide it will be the default in this case?
any help/ideas ? many thanks.
I create the directory list and then click on an item
Code:
li = xbmcgui.ListItem( label )
li.setInfo( type = 'music', infoLabels = { 'title': label, 'genre': format, 'artist': artist } )
ok = xbmcplugin.addDirectoryItem(handle, url = stream_url, listitem = li, isFolder = False, totalItems = count)
If I leave out the setInfo, it treats it as unknown and uses the dvdplayer/mplayer to playback which plays fine but there is no useful meta data for the file playing. if I use setinfo, it defaults to PAPLAYER which cannot play the files over http so it fails.
My workaround was to set the URL to point back to my plugin, and then I manually played the file forcing the player XBMC uses by making a new instance of player with
Code:
player = xbmc.Player(xbmc.PLAYER_CORE_MPLAYER)
Is there any way to force the default player, from a listitem/directory itself?
Also if PAPLAYER does not work with music files over http://, then surely it should decide it will be the default in this case?
any help/ideas ? many thanks.