[LUA] Insert multi tree subnodes in Playlist

Discuss your Lua playlist, album art and interface scripts.
diegofn
Blank Cone
Blank Cone
Posts: 48
Joined: 06 Mar 2008 17:34

[LUA] Insert multi tree subnodes in Playlist

Postby diegofn » 20 Aug 2012 20:22

Hi to all,

Currently I'm working in a TuneIn Radio Service Discovery, as part of this implementation, I'm writing a playlist parser function to parse the radiotime.com links and RadioStations, i.e. "By Location Link".

Its runs, but I want that VLC create a tree with children that deploy it everytime that the user make one click in one menu.

I explain you:
In this moment the user see the "By Location" menu, in the following way

Image
That parse the following link http://opml.radiotime.com//Browse.ashx? ... d=password

When the user make a click in the "South America" the API return the following tree:
http://opml.radiotime.com/Browse.ashx?i ... rname=user
The user see the tree but not organized
Image

Is there any way to show in Playlist a subnode under "South America" and a subnode called "Most popular" under "Colombia", for example? I'm trying with the table.insert function but it doesn't work.

Can you help me? The script is in https://github.com/diegofn/TuneIn-Radio ... iotime.lua

Best regards,


Diego Fernando Nieto
@diegofn

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: [LUA] Insert multi tree subnodes in Playlist

Postby ivoire » 28 Aug 2012 10:28

Hello,

If I understand correctly your question, you should have a look at the SD and playlist parser for metachannels.

In fact the SD for metachannels (http://git.videolan.org/?p=vlc.git;a=bl ... 13;hb=HEAD) fetchs a list of categories from the metachannels website. It adds this list as a list of sd nodes.

When the user double-click on one item in this list, vlc will look for a playlist parser corresponding to this item (in fact the url for this item is an url to a webpage like "http://www.metachannels.com/meta_channe ... e,it,other").
The playlist parse which is selected is then obviously the one for metachannels (http://git.videolan.org/?p=vlc.git;a=bl ... 33;hb=HEAD) then fetch the list of item to play.

You can do this recursively (the playlist parser adding urls that will be seen and expended by the same playlist parser when the user double-click on it).

Rgs.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 4 guests