Using StartOffset in a plugin (with XBMCSwift)
#1
Hi all,

I'm creating a plugin for a new VOD service in France, and I'm having difficulties using the StartOffset property. As their API provides this it would be possible to stop watching a video on the website and resume it on XBMC, that would be pretty cool.

I'm using XBMCSwift2, and according to their doc :
http://www.xbmcswift.com/en/latest/item.html#properties
Quote:A dict of properties, similar to info-labels. See http://mirrors.xbmc.org/docs/python-docs...etProperty for more information.

(The link is dead here, but the interesting part is here : http://mirrors.xbmc.org/docs/python-docs...etProperty )

So according to this, I should be able to set the start time with :
self.list.getSelectedItem().setProperty('StartOffset', '256.4')

Or with xbmcswitft, by defining a dict of properties, and adding it like I do for infolabels.

It seems that the property is not just ignored, as if I set a value with the wrong type I get a message saying unicode or srt is expected for StartOffset.
But still, when I go in a section with videos with a value set for startoffset, even when I force it to a certain value, I don't get the "resume play" popup.

Am I missing somethin ?

I put the code in a temporary repository if needed : https://dev.gormotte.info/noco_tmp/

Thanks !
Reply
#2
Yup Smile

startoffset is used for music - it doesn't actually apply to video. If you want to specify the start point to resume from then you'll want to set resumetime (and ideally also totaltime if you know it).

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
Reply
#3
Hello,

OK, thanks. That explains all Smile
I set resumetime and totaltime, and resume works Smile

Is there a reference of all these vars ? There is for setInfos but not for properties on the help page.

Thanks

Additionally, now I can get the resume time from the website, is there a way to update the website ?
I can POST the resume time, but I don't know where in the plugin... Is there a special event like "stop" where I can put code ?
Reply
#4
You'll need a service addon for that that uses the Monitor class to push stuff up to your website.
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
Using StartOffset in a plugin (with XBMCSwift)0