vlc-titlovi - help needed

Discuss your Lua playlist, album art and interface scripts.
sbrbot
New Cone
New Cone
Posts: 9
Joined: 06 Aug 2021 20:15

vlc-titlovi - help needed

Postby sbrbot » 07 Aug 2021 10:00

My VLC extension searches (not usual OpenSubtitles.org) but our regional subtitles site called Titlovi.com. The site is not prepared for better interaction with my extension (it does not return query results in XML, does not have RPC etc.) but it does not mean that I cannot use its content to fetch subtitles.

My VLC extension creates query string according to selected parameters, fetches data from site using this query, and fulfills the list box with results of subtitles available for requested video content. Data is parsed from HTML content that sites returns as result of query. So I do have all subtitle names, additional data and IDs. So I got to the point where one can choose subtitle from a list and I have the full URL for downloading this subtitle in form of https://titlovi.com/download/?type=1&mediaid=324028

What is missing!? The final part - how to download zipped subtitle file, save it decompressed and run in VLC player along the video content. I need some help how to download, decompress and save file.

If ZIP decompression is not easy achievable (maybe some LUA extension is needed not available to ordinary VLC user), then I could arrange with site master to allow download of subtitles in plain format but the problem with download and saving stays.

One can find my it on GitHub https://github.com/sbrbot/vlc-titlovi

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: vlc-titlovi - help needed

Postby mederi » 07 Aug 2021 12:39


sbrbot
New Cone
New Cone
Posts: 9
Joined: 06 Aug 2021 20:15

Re: vlc-titlovi - help needed

Postby sbrbot » 07 Aug 2021 12:56

Thx man, that was the first extension I looked at, but seems to me overcomplicated. I will need more time to study it thoroughly. On the other hand, this script does not work on my machine (WIndows 10).

sbrbot
New Cone
New Cone
Posts: 9
Joined: 06 Aug 2021 20:15

Re: vlc-titlovi - help needed

Postby sbrbot » 09 Aug 2021 09:15

Finally I succeeded to develop my first VLC extension (huh, started to develop in LUA exactly three days ago). However one interesting weekend.

Challenge with ZIP compression format solved with some external libraries (zzlib.lua (for ZIP structure management), inflate-bit32.lua (for decompression) and numberlua.lua (for bit operations)). I had to tailor them a little bit (zzlib) according to my needs but finally succeeded to assemble them into one functional VLC extension. Unfortunately I did not have enough time to test it on Linux environment.

Image

https://github.com/sbrbot/vlc-titlovi

sbrbot
New Cone
New Cone
Posts: 9
Joined: 06 Aug 2021 20:15

Re: vlc-titlovi

Postby sbrbot » 11 Aug 2021 02:32

Addon in VLC' repository:

https://addons.videolan.org/p/1572365


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 12 guests