Resuming STRM Files
#1
I have noticed that media with resume points in my movie library that end with the file extension ".strm" do not prompt the resume menu or display resume in the context menu. I have manually changed a movies file extension in the database file from ".strm" to ".mp4". When this is performed, the resume menu will display when the movie is selected. Would love to see this changed so that strm files aren't ignored from resume functionality.
Reply
#2
https://github.com/xbmc/xbmc/pull/18677

I managed to solve this, however, it was in vain as strm videos will play from the beginning of the video even when resume is selected. I thought it may work as this was my experience before making the edit: when I playbacked a strm file and stopped it and then selected the movie again, the resume menu would appear and after selecting the resume option, the movie would start from the resume point. However, returning to the main Kodi menu and then re-entering my movie library to play the movie would cause the resume menu to disappear.
Reply
#3
https://github.com/xbmc/xbmc/pull/16076

Came across this pull request. Compiled it and strm files can now be resumed.
Reply
#4
@SEIKT

Can you comment on your findings in that PR. It may bring it back to the attention of the developers.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
(2020-11-08, 01:57)Karellen Wrote: @SEIKT

Can you comment on your findings in that PR. It may bring it back to the attention of the developers.
Will do. And if anyone's interested in a workaround for the time being, this is what I came up with.

python:

dbID = xbmc.getInfoLabel('Container.ListItem.DBID')
videoType = xbmc.getInfoLabel('Container.ListItem.DBTYPE')

if videoType == 'movie':
    jsonQuery = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovieDetails", "params": {"movieid": %s, "properties": ["resume"]}, "id": "1"}' % dbID)
    jsonKey = 'moviedetails'
elif videoType == 'episode':
    jsonQuery = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodeDetails", "params": {"episodeid": %s, "properties": ["resume"]}, "id": "1"}' % dbID)
    jsonKey = 'episodedetails'

jsonQuery = unicode(jsonQuery, 'utf-8', errors='ignore')
jsonQuery = json.loads(jsonQuery)

resumePosition = jsonQuery['result'][jsonKey]['resume']['position']
resume = False

if resumePosition > 0:
    options = []
    options.append('Resume from ' + str(time.strftime("%H:%M:%S", time.gmtime(resumePosition))))
    options.append('Play from beginning')

    selection = xbmcgui.Dialog().contextmenu(options)

    if selection == 0:
        resume = True
    elif selection == -1:
        xbmcplugin.endOfDirectory(self.plugin_handle)
        return

item = xbmcgui.ListItem(path='http://localhost:' + str(service.settings.streamPort) + '/play')

if resume:
    item.setProperty('totaltime', '1')
else:
    item.setProperty('StartPercent', '0')

xbmcplugin.setResolvedUrl(self.plugin_handle, True, item)
Reply
#6
Thanks for this very interesting option!!
Without compile again Kodi and with code that you posted, is possible to integrate in CoreElec?
Thanks
Reply
#7
@atomizasser it sure is if your strm files are managed by a plugin. If they are, let me know the plugins github and I'll update the code for you. If not, you will need to compile CoreElec with the code changes from: https://github.com/xbmc/xbmc/pull/16076
Reply
#8
(2020-11-08, 10:36)SEIKT Wrote: @atomizasser it sure is if your strm files are managed by a plugin. If they are, let me know the plugins github and I'll update the code for you. If not, you will need to compile CoreElec with the code changes from: https://github.com/xbmc/xbmc/pull/16076

Thanks.
the plugin is called Alfa

mod edit - link removed
Reply
#9
@atomizasser - that addon is a banned addon (wiki) here, and neither it nor any device with it installed is eligible for any support here.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#10
Hi! How about this plugin for Jellyfin, I recently made an issue about this and today found this thread.
Jellyfin plugin at
https://github.com/jellyfin/jellyfin-kodi/issues/420
Reply
#11
(2020-11-09, 12:54)trixeo Wrote: Hi! How about this plugin for Jellyfin, I recently made an issue about this and today found this thread.
Jellyfin plugin at
https://github.com/jellyfin/jellyfin-kodi/issues/420

If you want to try your luck, test this code change to actions.py found in jellfin_kodi\objects. Refer to lines 68, 75, 81.

https://paste.kodi.tv/okuqejumuh

I didn't add the code to prompt a resume menu but I added the code that should play the video at the resume point if there is one. Let me know if it does.
Reply
#12
(2020-11-10, 09:58)SEIKT Wrote:
(2020-11-09, 12:54)trixeo Wrote: Hi! How about this plugin for Jellyfin, I recently made an issue about this and today found this thread.
Jellyfin plugin at
https://github.com/jellyfin/jellyfin-kodi/issues/420

If you want to try your luck, test this code change to actions.py found in jellfin_kodi\objects. Refer to lines 68, 75, 81.

https://paste.kodi.tv/okuqejumuh

I didn't add the code to prompt a resume menu but I added the code that should play the video at the resume point if there is one. Let me know if it does.
Thank you for trying but that did not change anything :/ The episode gets marked as watched 10 seconds after I stop it, no matter where in the ep I stop it. Before those 10 seconds come to pass, it shows the resume symbol on it, _and_, here's a strange thing; it shows the real name of the file instead of the scraped information, and on the 11:th second it gets marked as watched and get the scraped name back. And IF I start the ep before those 10 seconds have passed, during which time it shows the real name of the mkv-file, I get the option to resume the ep, and it works! But I checked, that is also the exact same behavior as without the mod on lines 68, 75 and 81. I guess this is a clue for someone knowing what is happening during those 10 seconds.
Reply
#13
@trixeo,
If you can, could you give MediaImport a go and report if it has a similar problem. Instructions are here.
Reply
#14
I use MX Player (Android), as an External Player, and all strm files played, will have the resume points stored in MX Player itself.
Works quite well.
Reply
#15
(2020-11-10, 19:38)trixeo Wrote:
(2020-11-10, 09:58)SEIKT Wrote:
(2020-11-09, 12:54)trixeo Wrote: Hi! How about this plugin for Jellyfin, I recently made an issue about this and today found this thread.
Jellyfin plugin at
https://github.com/jellyfin/jellyfin-kodi/issues/420

If you want to try your luck, test this code change to actions.py found in jellfin_kodi\objects. Refer to lines 68, 75, 81.

https://paste.kodi.tv/okuqejumuh

I didn't add the code to prompt a resume menu but I added the code that should play the video at the resume point if there is one. Let me know if it does.
Thank you for trying but that did not change anything :/ The episode gets marked as watched 10 seconds after I stop it, no matter where in the ep I stop it. Before those 10 seconds come to pass, it shows the resume symbol on it, _and_, here's a strange thing; it shows the real name of the file instead of the scraped information, and on the 11:th second it gets marked as watched and get the scraped name back. And IF I start the ep before those 10 seconds have passed, during which time it shows the real name of the mkv-file, I get the option to resume the ep, and it works! But I checked, that is also the exact same behavior as without the mod on lines 68, 75 and 81. I guess this is a clue for someone knowing what is happening during those 10 seconds.
The if statement on line 445 may be causing interference. In the code block are setproperty commands that modify the videos start time/resume time. I commented out the code that may interfere.

https://paste.kodi.tv/awifemukiq

After updating your code, when you've played a video can you refer to your Kodi log file and search for the following text:
SEIKT 1
SEIKT 2
SEIKT 3
SEIKT 4
SEIKT 5
SEIKT 6

It would help me understand which code is being executed if any.
Reply

Logout Mark Read Team Forum Stats Members Help
Resuming STRM Files0