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

Discuss your Lua playlist, album art and interface scripts.
roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

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

Postby roland1 » 15 May 2014 00:01

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.

roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

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

Postby roland1 » 06 May 2018 17:49

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.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

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

Postby mederi » 07 May 2018 17:17

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.

roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

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

Postby roland1 » 10 Jun 2018 23:08

Thanks mederi.
Btw, having different units for duration and, say, time is suboptimal.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 3 guests