Req Add resume point support for external players
#1
How feasible would this be? As far as I know, the resume data is stored in kodi's database when using the default player, right? How hard would it be to pass off the resume timestamp from the kodi's db to an external player and vice versa?
Reply
#2
the resume data stored in kodis database is only there when the internal player is used, kodi isnt able to see the timestamp of an external player as its an external process so it wont save a restore point
if you can work out every possible external player, work with their developers to establish a 2-way rpc communication that updates x times per second to report back to kodi where a specific video playback timestamp is
then its completely feasible
otherwise it doesnt sound so feasible or really "simple" at all
Reply
#3
Don't believe it's possible in any universal way as there is no standard way to pass such information between players.
Reply
#4
(2023-01-23, 22:43)jepsizofye Wrote: the resume data stored in kodis database is only there when the internal player is used, kodi isnt able to see the timestamp of an external player as its an external process so it wont save a restore point
if you can work out every possible external player, work with their developers to establish a 2-way rpc communication that updates x times per second to report back to kodi where a specific video playback timestamp is
then its completely feasible
otherwise it doesnt sound so feasible or really "simple" at all
(2023-01-23, 23:10)jjd-uk Wrote: Don't believe it's possible in any universal way as there is no standard way to pass such information between players.

Well I didn't really mean for kodi to support literally every player under the sun, what I actually meant to ask is how technically hard would it be to set it up to work for one specific player, say, mpv.

Using playercorefactory.xml one can already pass command line arguments to the player, and mpv can accept start time parameters and supports saving timestamps on exit.
Reply
#5
in that limited use case, maybe you can put a bash script in between?
kodi starts the script which can lookup a last resume state then start mpv via commandline with the timestamp, when mpv exits it can save the time to wherever the script will find it next time
Reply
#6
Well, this isn't really necessary, since mpv already does this on its own already (resuming the video at the point one exited the player), but what I really want is to pass this resume data to the kodi database.
Reply
#7
(2023-01-23, 11:50)gzpr Wrote: the resume data is stored in kodi's database when using the default player, right?
Yup, what's wrong with the default player that you're looking for alternatives? Best to help improve said default might make more sense.
Reply
#8
Well, nothing's really inherently wrong with the default kodi player I'm sure it's perfectly fine for most users, but mpv is simply my preferred media player since it's just so extremely customizable and extendable in functionality via various scripts.
Reply
#9
What IMO is needed is a way to query the bookmarks table via json_rpc to get
sql:
'SELECT timeInSeconds FROM bookmarks WHERE idFile = ' + str(movie(idFile)) + ' and type = 0 ORDERED BY timeInSeconds'

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Matrix release thread
Nexus see: Aeon MQ5 Mod Nexus release thread
Aeon MQ 5 skin and addon repo 11.1.0
Reply

Logout Mark Read Team Forum Stats Members Help
Add resume point support for external players0