Adding a SD from an extension

Discuss your Lua playlist, album art and interface scripts.
spark90
Blank Cone
Blank Cone
Posts: 23
Joined: 31 Mar 2021 03:00

Adding a SD from an extension

Postby spark90 » 08 Apr 2021 22:03

Hello !

I need to add rtsp streams on a custom SD on the left panel under "Podcasts", "Jamendo Selections", "Icecast Radio Directory" from an extension (not a sd script !)

I've tried :

Code: Select all

t = vlc.sd.add('Test') vlc.msg.dbg(t)
But il fails :evil:

logs :
main debug: looking for services_discovery module matching "Test": 9 candidates
main debug: no services_discovery modules matched
main error: no suitable services discovery module
lua debug: -2

Any Ideas ?

Thx

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: Adding a SD from an extension

Postby mederi » 09 Apr 2021 14:55

Probably not.

Code: Select all

local services=vlc.sd.get_services_names() for name,title in pairs(services) do vlc.msg.info(name.." "..title) end vlc.msg.info(tostring(vlc.sd.is_loaded("lua{sd='jamendo'}"))) vlc.sd.add("lua{sd='jamendo'}") vlc.msg.info(tostring(vlc.sd.is_loaded("lua{sd='jamendo'}")))
You can feed the Playlist from extensions.

spark90
Blank Cone
Blank Cone
Posts: 23
Joined: 31 Mar 2021 03:00

Postby spark90 » 10 Apr 2021 08:42

Code: Select all

vlc.sd.add("lua{sd='TTTTT'}")
main debug: looking for services_discovery module matching "lua": 9 candidates
main debug: set config option: lua-sd to TTTTT
lua error: Couldn't find lua services discovery script "TTTTT".
main debug: no services_discovery modules matched
main error: no suitable services discovery module

It doesn't works :evil:

Ant Idea ?

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: Adding a SD from an extension

Postby mederi » 11 Apr 2021 16:13

It seems you can only load/activate already available SD. It is quite useless and it is not even available in current master VLC 4 anymore. I think Objects (undocumented Sleeping Beauty :)) can provide some more control over VLC. Some related topic https://forum.videolan.org/viewtopic.php?f=29&t=155525

spark90
Blank Cone
Blank Cone
Posts: 23
Joined: 31 Mar 2021 03:00

Re: Adding a SD from an extension

Postby spark90 » 06 May 2021 07:09

Thank's for your reply.

I'm going to be mad :D

Whith a little dump function on the vlc object, I've the following results:

from SD:

Code: Select all

["sd"] = Table(4)= { ["add_node"] = function: 000001BD5353E430, ["add_item"] = function: 000001BD5353E610, ["remove_item"] = function: 000001BD5353DCB0, ["remove_node"] = function: 000001BD5353DF20 },
from extensions :

Code: Select all

["sd"] = Table(4)= { ["is_loaded"] = function: 00000203C4E77D10, ["remove"] = function: 00000203C4E775F0, ["get_services_names"] = function: 00000203C4E774D0, ["add"] = function: 00000203C4E77AD0 },
As vlc.stream() is broken in SD, I should make an extension to access vlc.net to make my own http:get() client, since vlc.net is not available from SD.
BUT with extensions, I can't add a SD item in the left menu and add my retrieved rstp streams link's (and icons). So I need an existing SD .... infinite loop... :roll:

So:

2 solutions :

Solution 1:
Make 2 scripts : 1 SD et 1 Extension. The Extension creates the files downloaded by the available vlc.net object. And the SD use the content of these files to add rstp to the SD playlist.

Solution 2:
Wait for VLC4 and see if situation looks better :-|


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 7 guests