Remote zipped data

Discuss your Lua playlist, album art and interface scripts.
exebetche
Blank Cone
Blank Cone
Posts: 12
Joined: 04 Mar 2012 05:32

Remote zipped data

Postby exebetche » 16 Mar 2012 20:23

Hi

I want to use vlc.stream to download data contained in a file in an remote zipped file, but it return an error if the file name containe a dash:
- it seems

Code: Select all

--That works local url = "zip://http://www.example.com/download/somearchive!/somefile.txt" local stream = vlc.stream(url) local data = stream:read(65536) vlc.msg.dbg(data) --That return an error local url = "zip://http://www.example.com/download/somearchive!/some-file.txt" local stream = vlc.stream(url) local data = stream:read(65536) vlc.msg.dbg(data)
Is that a way to encode the file name to be recognized by vlc.stream?
Last edited by exebetche on 17 Mar 2012 05:39, edited 1 time in total.

exebetche
Blank Cone
Blank Cone
Posts: 12
Joined: 04 Mar 2012 05:32

Re: Remote zipped data

Postby exebetche » 16 Mar 2012 20:31

BTW, that dosen't works neither:

Code: Select all

local archive_url = "http://www.website.org/download/somearchive.zip" local zipped_data = get_data(archive_url) local stream = vlc.memory_stream(zipped_data) stream:addfilter("zip")
Right now I dump the zipped data in a temporary file, then use vlc.stream on it. But I don't like it because that way I can acces the data but then I'm unable to remove the file under windows (it says the file is locked by Vlc).
Maybe a close() method to vlc.stream would be welcome.
OR a workaround to dash filename problem
OR the possibility to use zip filter with memory_stream (unless I'm doing it wrong)

Thanks


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 3 guests