Page 1 of 1
User input with lua script
Posted: 10 Nov 2013 17:57
by joelones
I have a script that I place in the ..share/lua/sd.. directory, I'm assuming these are referred to as interface scripts, no? In any case, I would simply like this script to prompt the user to enter a specific date.
Is this at all possible? Googling around suggests that this is not possible but only with extension scripts, can someone please confirm?
Re: User input with lua script
Posted: 10 Nov 2013 18:13
by mederi
"/lua/sd/" directory is for VLC Lua servives discovery scripts. Interface scripts are in "/lua/intf/". Dialog box is available in extension scripts stored in "/lua/extensions/".
Re: User input with lua script
Posted: 10 Nov 2013 18:46
by joelones
I would like the extension to populate the playlist view, like how I have an SD script doing now. Is that possible?
Re: User input with lua script
Posted: 10 Nov 2013 19:09
by mederi
Try to run sd script as an extension script. SD Lua module is probably available also in extensions. Just add activate() and deactivate() functions and call main() sd function in activate() one:
Code: Select all
function activate()
main()
end
function deactivate()
end
Re: User input with lua script
Posted: 10 Nov 2013 20:47
by joelones
Thanks for the reply mederi,
my sd segfaults when I try to convert it to an extension script:
Code: Select all
[0x10399da50] main access debug: using access module "access_http"
[0x1002bf070] main stream debug: Using stream method for AStream*
[0x1002bf070] main stream debug: starting pre-buffering
[0x1002bf070] main stream debug: received first data after 0 ms
[0x1002bf070] main stream debug: pre-buffering done 1024 bytes in 0s - 83333 KiB/s
[0x1002e2ff0] main xml debug: looking for xml module matching "any": 1 candidates
[0x1002e2ff0] main xml debug: using xml module "xml"
[0x1002e80d0] main xml reader debug: looking for xml reader module matching "any": 1 candidates
[0x1002e80d0] main xml reader debug: using xml reader module "xml"
Segmentation fault: 11
http://pastebin.com/TahZMhw6
Re: User input with lua script
Posted: 11 Nov 2013 16:13
by joelones
I guess the reason why it's dumping is cause I need to use "vlc.sd.add_node" but that method is not available with an extension?
Re: User input with lua script
Posted: 12 Nov 2013 12:44
by mederi
I haven't worked with sd script yet. I've just briefly had a look at the sd structure. If the simple conversion of sd script to extension is not possible, then it is possible to parse xml in an extension to feed a list widget with particular entries in a custom dialog box and to have a button to expand/collapse/play selected items in the "tree structure" there. Playlist is also capable of tree structure, but I am not too sure about it, because it is all about folders and files, isn't it? Perhaps you could file a feature request (
https://trac.videolan.org/vlc) to ask developers to enable dialog boxes for sd scripts if it makes sense.