"Play next song automatically" in plugin - doable?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
mbetter Offline
Member
Posts: 62
Joined: Nov 2010
Reputation: 0
Post: #1
I made a music plugin, is there any way to get the next song in the directory to play automatically when a song ends?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #2
XBMC will do that automatically assuming you have the option enabled.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
mbetter Offline
Member
Posts: 62
Joined: Nov 2010
Reputation: 0
Post: #3
jmarshall Wrote:XBMC will do that automatically assuming you have the option enabled.

It doesn't seem to be working for me. I can queue the entire directory, but for some reason I can't get album art to show up when I do it that way.

I add my directories with:

Code:
def addDir(name,object_id,token,mode,iconimage):
        xbmc.log(name,xbmc.LOGNOTICE)
        u=sys.argv[0]+"?object_id="+str(object_id)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&token="+token
        ok=True
        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
        liz.setInfo( type="Music", infoLabels={ "Title": name } )
        ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
        return ok

and my links with:

Code:
def addLink(name,url,iconimage,node):
        ok=True
        liz=xbmcgui.ListItem(name, iconImage=iconimage, thumbnailImage=iconimage)
        liz.setInfo( type="Music", infoLabels={ "Title": node.findtext("title"), "Artist": node.findtext("artist"), "Album": node.findtext("album"), "TrackNumber": str(node.findtext("track")) } )
        ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
        return ok

Where url is of the type: http: //ampache-server.com/a/play.php?song=1000...

I think I'm missing something here.
find quote
NordishByNature Offline
Junior Member
Posts: 24
Joined: Nov 2010
Reputation: 0
Post: #4
Hello,

Maybe you have to set the Music.AlbumArt since you're using InfoLabels?

Just an Idea not tested.

cu Nordish
find quote
mbetter Offline
Member
Posts: 62
Joined: Nov 2010
Reputation: 0
Post: #5
NordishByNature Wrote:Hello,

Maybe you have to set the Music.AlbumArt since you're using InfoLabels?

Just an Idea not tested.

cu Nordish

I can't find any reference to this in the documentation, can you clarify?
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,180
Joined: Nov 2003
Reputation: 82
Post: #6
actually jmarshall it doesn't auto-advance for plugins. the viewstate does not return autoplay...

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
mbetter Offline
Member
Posts: 62
Joined: Nov 2010
Reputation: 0
Post: #7
Thanks, spiff, I feel like slightly less of an idiot now Smile

While you're around, any clue about my thumbnail issue, i.e. thumbnails showing up when i open a (plugin) directory and play a link by itself but not when I queue the whole directory?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #8
In what cases would we not want autoplay? I can't think of any (for a music plugin).

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,180
Joined: Nov 2003
Reputation: 82
Post: #9
none what so ever. it's a bug in my view

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,180
Joined: Nov 2003
Reputation: 82
Post: #10
fixed in r35433

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Post Reply