Kodi Community Forum
Req Add resume point support for external players - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Req Add resume point support for external players (/showthread.php?tid=371536)



Add resume point support for external players - gzpr - 2023-01-23

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?


RE: Add resume point support for external players - izprtxqkft - 2023-01-23

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


RE: Add resume point support for external players - jjd-uk - 2023-01-23

Don't believe it's possible in any universal way as there is no standard way to pass such information between players.


RE: Add resume point support for external players - gzpr - 2023-01-24

(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.


RE: Add resume point support for external players - izprtxqkft - 2023-01-24

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


RE: Add resume point support for external players - gzpr - 2023-01-24

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.


RE: Add resume point support for external players - PatK - 2023-01-24

(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.


RE: Add resume point support for external players - gzpr - 2023-01-25

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.


RE: Add resume point support for external players - scott967 - 2023-01-25

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.
.