Skip to content

Instantly share code, notes, and snippets.

View WeatherGod's full-sized avatar

Benjamin Root WeatherGod

View GitHub Profile
@ema
ema / vlc-download-subs.diff
Created October 12, 2011 11:12
Lua VLC extension to download subtitles: dirty hack to wget the subtitles file
--- /home/ema/.local/share/vlc/lua/extensions/141787-subtitles-mod.lua 2011-09-09 18:13:22.000000000 +0200
+++ 141787-subtitles-mod.lua 2011-10-12 13:06:35.470947422 +0200
@@ -430,6 +430,12 @@
end
--vlc.msg.dbg("[Subtitles] Subtitle data: "..dataBuffer)
+ local subsfilename = "/tmp/\""..vlc.input.item():name()..".srt.zip\""
+
+ -- http://www.opensubtitles.org/en/subtitleserve/sub/3476865
+ vlc.msg.info("[Subtitles] Downloading this subs from: "..url.." to "..subsfilename)