Controlling plugin bookmark (CSaveFileStateJob)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
hippojay Offline
Fan
Posts: 301
Joined: Mar 2008
Reputation: 13
Location: Sheffield, UK
Post: #11
(2012-07-04 17:02)spiff Wrote:  i still think what i did is what you need

I've just tried this and, yes, for my plugin this has removed the bookmark generated resume dialog. However, I think that this change is also going to alter the bookmark resume for all plugins.

If I set startOffset property, then the dialog isn't displayed, and the media starts from the offset
My plugin doesn't set the startOffset property - yet it still doesn't display the bookmark resume

This means that all plugins will now bypass the bookmark resume dialog and restart from startOffset (which is probably going to be from tge beginning). I've checked with youtube and I cannot get the plugin to resume an item.

I'm not a selfish guy, so I don't want to globally remove a feature that people (like yourself) are using/expecting.
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,185
Joined: Nov 2003
Reputation: 82
Post: #12
right then it's missing an initializer somewhere, probably in the python listitem class.

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
hippojay Offline
Fan
Posts: 301
Joined: Mar 2008
Reputation: 13
Location: Sheffield, UK
Post: #13
(2012-07-05 16:18)spiff Wrote:  right then it's missing an initializer somewhere, probably in the python listitem class.

yeah, you were right, initialising m_lStartOffset to STARTOFFSET_RESUME in listItem.cpp fixed it. Having some github issues at the moment, so i'll generate a commit when I sort them out.

EDIT: https://github.com/hippojay/xbmc/commit/...2c8d592223

This reverts behaviour back to pre-Eden if startoffset is set. If it's not specifically set, then it acts as it does now.

Now I've just got to find out how to modify it and use it directly in player.play and setresolvedurl.
(This post was last modified: 2012-07-05 18:03 by hippojay.)
find quote
hippojay Offline
Fan
Posts: 301
Joined: Mar 2008
Reputation: 13
Location: Sheffield, UK
Post: #14
Been spending some time looking into getting setResolvedUrl to accept a 'startoffset' - mainly through the existing listItem property startOffset, as the mechanism and interface is already there.

Looks like the problem is that startoffset isn;t store as a listItemn property but directly within the FileItem - this means that the existing functions to update the listItem with the data passed in by setResolvedURL weren't updating startoffset, so it was ignored. This patch changes that:

From the listitem passed into AddDirectoryItem:
* if startoffset isn;t explicitly set, it is let at -1. This will allow bookmarks to be checked as a resume dialog to be shown
* if startoffset is set to any other number, then the media will start from this point. (there a 0 will remove dialog and always start from the beginning)

These items are set when the user clicks on the link. If you want to change the value after this point, i.e. feed directly into setResolvedUrl. Then you simply set the property again into the listItem passed into setResolvedURL.
* if startoffset isn't set, it will remain as the initalised -1 value. This will be ignored by setResolvedURL and teh previous value not updated
* If startoffset is set to any other value, then this is regarded as being explictly set by the user and will override the previous startoffset value. Media will resume from this new value instead.

https://github.com/hippojay/xbmc/commit/...2bea86534b
find quote
Post Reply