Set playlist item title based on the xml file?

Discuss your Lua playlist, album art and interface scripts.
phinoppix
New Cone
New Cone
Posts: 4
Joined: 12 Apr 2012 11:40

Set playlist item title based on the xml file?

Postby phinoppix » 17 Apr 2012 11:19

I have an app which generates a playlist to play certain parts of a single video (thanks to VLC start/stop parameters). So imagine having 5 playlist items but all referring to a single video, only different parts are played.

However, on VLC playlist window, only the video file name is being displayed, not the title defined in the xml file. Is it possible to customize this part thru scripting? if possible, anyone care to share a sample script?

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: Set playlist item title based on the xml file?

Postby mederi » 17 Apr 2012 20:52

Hi! If you alter my Playlist randomizer a bit, you can have playlist generator that you want and then save a new playlist from VLC as .xspf or .m3u file. For example:

Code: Select all

function descriptor() return { title = "Playlist sampler"; } end function activate() actual_playlist=vlc.playlist.get("playlist",false).children new_playlist={} for i, v in pairs(actual_playlist) do for j=120,v.duration,600 do new_title=v.name.."-"..j table.insert(new_playlist, {path=v.path, title=new_title, name=new_title, duration=v.duration, options={"start-time="..j, "stop-time="..(j+10)}}) end end vlc.playlist.clear() vlc.playlist.enqueue(new_playlist) vlc.deactivate() end function deactivate() end
As you can see, you can set new title for new playlist items. Have you tried VLC Extension: Sampler? Perhaps you will find something useful there.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 6 guests