Resume does not work for favorites
#1
Resume does not work for favorites. The resume question appears, but the program starts at 0:00 anyway.
I noticed that a year ago @scott967 wrote about the same issue that I'm experiencing (https://forum.kodi.tv/showthread.php?tid=369537), but he got no relevant answers. He also has a link to Imugr that shows a video describing the exact same issue.

I asked one of the pluing developers about it, but he answered that he has no control over favourites:
Quote:Favorites is a native Kodi feature. The addon doesn't pass any data actively to Kodi for this, nor am I aware of any way of doing so. The issue you referred to seemed to speculate mostly about what could be the cause (?). I'd recommend you to post an issue in the Kodi forums as it might be a more general issue?
Quoted from https://github.com/kodi-svtplay/xbmc-svtplay/issues/289

Can anyone else understand what's going on with "favorites"?

Thanks,
Andreas Jansson
Reply
#2
Your question is a bit vague.  Are you interested in a specific addon not saving resume point information when launched as a favorite ?  If so, that can be addressed with the specific addon owner.  Addon authors have the option of managing their own bookmarks / resume pointers.  If they don't pass information to the Kodi player then Kodi has no way of setting a resume point.  For my addon which leverages the Kodi player I set a resume point every 30 seconds or every time that playback is paused , just in case something happens to Kodi (i.e. crash, lose power etc...).


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#3
Just tested with the Disney+ addon and it resumed perfectly from Favourites. Please provide a full debug log.

The instructions are here... debug log (wiki)

If you are using the Basic Method, then ensure the following is applied...
1.Enable debugging in Settings>System Settings>Logging,
2.Restart Kodi
3.Replicate the problem.
4.Upload the log to Kodi Paste Site manually or use the Kodi Logfile Uploader. (wiki) With either method post the link to the log back here.

If you are using the Advanced Method ensure you have correctly created and applied the advancedsettings.xml file (wiki)

In both instances, you should see the word DEBUG throughout the log.

Note: Full logs only. No partial or redacted logs
Do NOT post your logs directly into the forum. Use the Kodi Paste Site. Post the link to your pasted log in the forum
Reply
#4
Quote:Kodi version: 18.9

Platform: LibreElec 9.2.8

Plugin version: 5.1.20

is it possible that this simply doesn't work in Kodi 18.9 which is unsupported?

have you tried in a current supported version of Kodi 20.1+ or 21.x?
Reply
#5
As you can see in the discussion with the plugin developer (github link as referenced above), he was able to reproduce the problem on Kodi 19.

My Raspberry hardware does not allow me to upgrade beyond Leia (18.9), but the developer confirms he can repeat the error and says he does not know of any way he could control this. He says it's up to Kodi to start at the saved resume point, but it doesn't. As I already wrote, the resume popup does show up, and it shows the correct time where I stopped the program earlier, but it starts at 0:00.

Now I installed Kodi 20.2.0 on my PC, and added the same plugin (svtplay by Nilzen). I get the same issue on Kodi 20.2.0.

Please test this with a show that is accessible from outside Sweden. For example, search for Ekonomibyr (to find Ekonomibyrån), and start the first program in the list. Drag the time slider to 8 minutes or so, and stop. You will now have a resume point. Add the show to favourites. Start the show from favourites, and select to start from the resumepoint (8:00 minutes or whatever time you dragged the slider to).

I believe this is not a hard thing to repeat for anyone.
I'll learn how to make a log if it is really necessary.
Reply
#6
(2023-09-21, 18:05)Andreas1974 Wrote: He says it's up to Kodi to start at the saved resume point, but it doesn't.

from what i know in general about addons, this is not an entirely accurate statement regarding addons

when kodi calls an addon to resume it will send "resume:true" in sys.argv[3] and it is up to the addon to respect it

you can see that behavior from the slyguy common module (which the above post mentioning Disney+ uses) - https://github.com/matthuisman/slyguy.ad...ter.py#L46

i am not familiar with the addon in question but in my own opinion based on my experience it would be best to find out what the resume mechanism is in that addon
- determine whether or not it is being called
- determine whether or not kodi is requesting the resume
- determine whether or not there is a resume point set in the kodi database for the path requested

this all falls to the developer or someone capable of determining these factors

-----

there is also a playback call from kodi that requires adding a flag ",resume" to a path when requesting playback, the skin is *usually in charge of this
- as an example you can see where Estuary is setting ",resume" here https://github.com/xbmc/xbmc/blob/master...s.xml#L214


-----

all of these factors need to be figured in before simply stating "favorites will not resume under any condition"
Reply
#7
Quote:Hi again!

I sent the question to the Kodi add-ons forum. Would you have a look at https://forum.kodi.tv/showthread.php?tid...pid3166838 (have a look at jepsizofye at 18:05)

I'm not sure if the ones who answer realize that the resume time is showing up correctly (I've pointed it out at least twice). Perhaps there is more to it.

I don't understand all of it.

Andreas

yes, the resume time showing up and asking to resume indicates kodi requested it but the addon did not do it - the steps i listed above should find the failing link in the chain
Reply
#8
@Andreas1974 please take this information to the developer

i had some spare time so i looked into this for them

first, the addon makes no use of sys.argv[3] where resume is sent - https://github.com/kodi-svtplay/xbmc-svt...default.py

second, the addon does not set a resume time when playing back a video, the function is here - https://github.com/kodi-svtplay/xbmc-svt...ack.py#L16

if that function is changed to this then it will resume, all the time including from a bookmark

setting properties total time and resume time are Required

the developer will need to rework their addon to facilitate this functionality, the example only sets an arbitrary total time of 4 minutes and an arbitrary resume time of 1 minute

python:
    def play_video(self, video_url, subtitle_url, show_subtitles):
        player = xbmc.Player()
        start_time = time.time()
        liz = xbmcgui.ListItem(path=video_url)
        liz.setProperty("TotalTime", "240.0")
        liz.setProperty("ResumeTime", "60.0")
        xbmcplugin.setResolvedUrl(self.plugin_handle, True, liz)
        if subtitle_url:
            while not player.isPlaying() and time.time() - start_time < 10:
                time.sleep(1.)
                player.setSubtitles(subtitle_url)
            if not show_subtitles:
                player.showSubtitles(False)
Reply
#9
(2023-09-22, 00:49)jepsizofye Wrote: if that function is changed to this then it will resume, all the time including from a bookmark

setting properties total time and resume time are Required

the developer will need to rework their addon to facilitate this functionality, the example only sets an arbitrary total time of 4 minutes and an arbitrary resume time of 1 minute

Yeah, that is totally broken in the addon.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#10
Thanks! I'm sure this will be helpful!
I'll leave it to the plugin developer to ask more questions!
(In this case I'm just a user.)

Jepsizofye, thank you so much!
Andreas
Reply
#11
you're welcome Andreas
Reply
#12
@jepsizofye
Your slightly in-correct in your responses.
We should NOT set resume time when kodi is doing resume: true
If we do, we overwrite its resume time its using

Think of it like this
Kodi sets a resume_time property to 30
Then plays the plugin path
If we then set the resume_time property to 0, we overwrite it

When Kodi is resuming - we should not set resume_time at all.
The code you pointed to in slyguy common is simply to give all my routes a kwarg that they can check for to detect if kodi is resuming.
They then skip any custom "resume from" logic.

I even have some code in my common layer to pop out any resume_time property if sys.argv is set to resume
See here: https://github.com/matthuisman/slyguy.ad...ui.py#L359
So even if an addon does it wrong - this will catch it and remove it.


In regards to my add-on, and possibly the issue in the other.
I believe it may be a Kodi bug.

If you dont call li.setInfo({}) on the item: resume from favourites does not work
Thats the only difference between a favourite resume working and not working.
Resume inside the addon itself works regardless.
I think this is a Kodi bug....?

Ill push update to slyguy common to always call setInfo Smile
Even if its an empty dict

UPDATE:
actually, i was testing with kodi 20 which doesnt use setInfo()
Traced it down to li.getVideoInfoTag() call only which "fixes it"
That just happens to be called in in init of ListItemInfoTag() wrapper

So maybe kodi internal is just looking for any "indicator" that the item is a video
Trying more methods that indicated its a video

Any of these fix resume from favourites:
li.getVideoInfoTag()
li.addStreamInfo('video', {})
li.addStreamInfo('audio', {})
li.setInfo('video', {})
Reply
#13
a very well laid out explanation thanks for that

the lack of information 'video' on an li would probably be the result of favorites not being a video window rather than a bug
- there are multiple examples of people having so called 'issues' because of this, lack of context items f.e. as well as the resume
Reply
#14
reference of 'missing' context items
https://forum.kodi.tv/showthread.php?tid=374329
https://forum.kodi.tv/showthread.php?tid=373434

an addon to overcome lack of functionality (i dont know this addon - it was a google search result that's all)
https://kodi.wiki/view/Add-on:Super_Favourites


(2023-09-30, 00:59)matthuisman Wrote: So maybe kodi internal is just looking for any "indicator" that the item is a video

i concur with this assessment
Reply
#15
(2023-09-30, 01:02)jepsizofye Wrote: an addon to overcome lack of functionality (i dont know this addon - it was a google search result that's all)
Add-on:Super_Favourites (wiki)

I think there are some questions as to whether this addon is still being supported.

https://forum.kodi.tv/showthread.php?tid...pid3167168


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply

Logout Mark Read Team Forum Stats Members Help
Resume does not work for favorites0