"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: #11
Thanks, spiff!
find quote
nmirza Offline
Senior Member
Posts: 291
Joined: Mar 2008
Reputation: 0
Post: #12
Hi Spiff, i just installed r35744 and xbmc still doesn't play the next song automatically when the current one i selected ends. i made sure the option to play next song automatically is also selected in options.
could you pleaselook into this thanks.

spiff Wrote:fixed in r35433
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,187
Joined: Nov 2003
Reputation: 82
Post: #13
works fine for me in all add-ons. must be your end.

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: #14
I've also had no luck with this. During play, I'll see "Next:" pop up over the currently playing song title with nothing next to it.

Is there something specific I have to do to set the next song?

Code:
def addLinks(elem):
        ok=True
        li=[]
        for node in elem:
            liz=xbmcgui.ListItem(node.findtext("title").encode("utf-8"), iconImage=node.findtext("art"), thumbnailImage=node.findtext("art"))
            liz.setInfo( type="Music", infoLabels={ "Title": node.findtext("title").encode("utf-8"), "Artist": node.findtext("artist"), "Album": node.findtext("album"), "ReleaseDate": str(node.findtext("year")) } )
            tu= (node.findtext("url"),liz)
            li.append(tu)
        ok=xbmcplugin.addDirectoryItems(handle=int(sys.argv[1]),items=li,totalItems=len(elem))
        return ok
find quote
mbetter Offline
Member
Posts: 62
Joined: Nov 2010
Reputation: 0
Post: #15
I got it working by using SetResolvedURL.

I would like to know if it's possible to do it without SetResolvedURL as my current plugin doesn't really need it (AFAIK) and it introduces a redundant plugin call in between songs.
find quote
mbetter Offline
Member
Posts: 62
Joined: Nov 2010
Reputation: 0
Post: #16
mbetter Wrote:I got it working by using SetResolvedURL.

I would like to know if it's possible to do it without SetResolvedURL as my current plugin doesn't really need it (AFAIK) and it introduces a redundant plugin call in between songs.

Can I bump this? SetResolvedURL adds like five seconds to the gap between songs and it's really starting to bother me.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #17
Do a debug log - you should not require SetResolvedUrl at all.

Cheers,
Jonathan

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
divingmule Offline
Posting Freak
Posts: 1,269
Joined: Oct 2008
Reputation: 54
Post: #18
Hi, I'm working on the internet archive add-on and I can't seem to get this to work either.

Here is the current code I'm working with ->http://code.google.com/p/audio-archive-x...default.py

Here is a log ->http://pastebin.com/W3vMnnDN

Any help is much appreciated.
find quote
SniperCharlie Offline
Junior Member
Posts: 23
Joined: Mar 2008
Reputation: 0
Post: #19
I'm also having trouble auto-playing the next track in a plugin I'm developing.

The URL gets redirected to the media file - perhaps that is the error we are getting, and the reason setresolvedurl is a workaround.

I'm using the following to add the links:

Code:
def addLink(name,url,iconimage):
    ok=True
    liz=xbmcgui.ListItem(label=name,thumbnailImage=iconimage)
    liz.setProperty("mimetype", 'audio/mpeg')
    liz.setInfo("music", {"title": name,})
    liz.setProperty("IsPlayable", "true")
    xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=liz)
    return ok
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #20
It works only for audio plugins. That is, plugins that set their provides attribute to include "audio".

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