Page 1 of 1

[Extension] Progress: Auto-Restore, -Start, -Resume

Posted: 15 May 2014 00:01
by roland1
Check out my new Extension:

http://addons.videolan.org/content/show ... ent=165230

After activation, the Extension
*restores the playlist of the last session
*starts last played track of the last session
*resumes playback positions.

Suggestions, Cookies and Bug Reports are welcome.

Re: [Extension] Progress: Auto-Restore, -Start, -Resume

Posted: 06 May 2018 17:49
by roland1
A user reports this extension doesn't work on vlc release 3.0.2.
Are there any major changes?
There is up to no diff between the README.txt files.
Here are the occuring calls if it helps helping me:
  • vlc.config.userdatadir()
    vlc.input.item()
    vlc.input.item():duration()
    vlc.input.item():uri()
    vlc.object.input()
    vlc.playlist.enqueue(plitems)
    vlc.playlist.get("normal", false)
    vlc.playlist.gotoitem or vlc.playlist["goto"])(item.id)
    vlc.playlist.pause()
    vlc.var.get(INPUT, "time"))
    vlc.var.set(INPUT, "time", t)
I would like to use a code tag, but it ignores line breaks.

Re: [Extension] Progress: Auto-Restore, -Start, -Resume

Posted: 07 May 2018 17:17
by mederi
vlc.var.get/set time in microseconds in VLC 3 instead of seconds in older VLC versions.
Then there is new vlc.io implemented in VLC 3.0.2 (introduced by included VLSub Extension). I recommend to you to use it if it is available instead of Lua's standard io functions. It solves the issue with non-ASCII characters in the path on some systems. This script and similar ones can work properly on all systems from now.

Re: [Extension] Progress: Auto-Restore, -Start, -Resume

Posted: 10 Jun 2018 23:08
by roland1
Thanks mederi.
Btw, having different units for duration and, say, time is suboptimal.