Page 1 of 1

[LUA] Insert multi tree subnodes in Playlist

Posted: 20 Aug 2012 20:22
by diegofn
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

Re: [LUA] Insert multi tree subnodes in Playlist

Posted: 28 Aug 2012 10:28
by ivoire
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.