Next media item playing automatically?!
#1
All,

I have a strange problem.

All of this happens within my plugin (not the XBMC library)...

If "Play the next song automatically" is set with the system settings - then not only are subsequent tracks played automatically but episodes and movies are too!

Disable it, and only the selected item is played. Obviously I want to be able to enable automatical playback of an entire album - but not a while library of movies.

I'm not sure what areas to look at - the correct content type is being set for each section. I'm not sure what flag sets this to work and whether i've accidently set something in a listitem...
Reply
#2
Any ideas? Looks like a bug to me, but can't believe I'm the first to see it. Although perhaps there aren't too many combined music and video plugins.
Reply
#3
Looks like the issue is the addon.xml provides tag. If this is set to audio then it picks up the "play next" attribute:

This will play music and video files automatically
Code:
<provides>video audio image</provides>

Whereas this doesn'tm even with automatically play next turned on
Code:
<provides>video image</provides>

Any way to fix this, or pointers to the code in Git?
Reply
#4
See CGUIMediaWindow::OnClick - we specifically look for audio and if available turn on automatically plan next.
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
Reply
#5
jmarshall Wrote:See CGUIMediaWindow::OnClick - we specifically look for audio and if available turn on automatically plan next.

Thanks i'll check it out.

I have managed to workaround it though, by using xbmc.player().play()..

Code:
start = setResolvedURL(pluginhandle, listitem, true)
xbmc.Player().play(listitem=listitem)

Although it doesn't really seem the best way of doing it...
Reply
#6
Ok, I see what happens. If we are running a plugin and it has a provider type of "audio", then we get the setting from the gui and set next playback accordingly.

So, simple way to fix is to check if the item is actually an audio item (pItem->IsAudio()).
Added, built, tested, working.

So, I suppose the question is whether this is desired operation or not? Should we be able to built combined video and audio addons?

I'll put together a pull request for this - if you think this needs fixing and my fix is acceptable..

EDIT: Here is my change: https://github.com/hippojay/xbmc/commit/...75a5219eef
Reply
#7
The fix seems sane given the current setup, yeah.
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
Reply

Logout Mark Read Team Forum Stats Members Help
Next media item playing automatically?!0