Vlsub 0.10.2 not working on "vlc-nightly" [Linux]
Dssdiego opened this issue · 6 comments
It can search for a subtitle, but when trying to download the app stops responding.
Tested on
4.9.60-1-MANJARO #1 SMP PREEMPT Thu Nov 2 13:08:20 UTC 2017 x86_64 GNU/Linux
Package:
vlc-nightly 3.0.0v20171022-1
Sadly vlsub does not work "well" with other releases than the stable/current
i can use properly Version 2.2.4 Weatherwax (Intel 64bit)
on my Macbook Pro High Sierra 10.13.1 Beta.
The nightly and github build of vlc seems to be missing the unzip "tool", based on other issues.¨
Also this might help you #179.
I'm having troubles too.
Using with VLC 3.0.0
, Debian Buster, VLsub 0.10.2
, HTTP/1.0
or 1.1
, perl 5.26.1
...
After some digging I found out that my problem was files downloaded have the gz
extension although they are apparently zip
files ! Any idea why ? Problem with opensubtitles api maybe ?
I think this is the cause of the issues everyone is having.
function dump_zip(url, dir, subfileName)
-- Dump zipped data in a temporary file
setMessage(openSub.actionLabel..": "..progressBarContent(0))
local resp = get(url)
if not resp then
setError(lang["mess_no_response"])
return false
end
local tmpFileName = dir..slash..subfileName..".gz"
if not file_touch(tmpFileName) then
vlc.msg.dbg("[VLsub] Cant touch:"..tmpFileName)
if openSub.conf.os == "win" then
-- todo for windows
return false
else
-- using tmp dir to download
tmpFileName = "/tmp/"..subfileName..".gz"
vlc.msg.dbg("[VLsub] Fixing to:"..tmpFileName)
end
end
local tmpFile = assert(io.open(tmpFileName, "wb"))
tmpFile:write(resp)
tmpFile:flush()
tmpFile:close()
tmpFile = nil
collectgarbage()
return "zip://"..make_uri(tmpFileName)
.."!/"..subfileName, tmpFileName
end
Right, is it normal the file extension is hardcoded ? (I don't know the api (EDIT: apparently we can keep that hardcoded as it uses ZipDownloadLink
, to get the gz file instead it would be SubDownloadLink
)
Alhtough if I change it to zip
the uncompressed srt
is 0 byte
. Don't know if there are any logs, it works manually though.
EDIT
Ok there's a problem with zip still, seems related to #180 , weird
main debug: creating access: zip://file:///home/user/movie.srt
main debug: looking for access module matching "zip": 28 candidates
main debug: no access modules matched
main error: no suitable access module for `zip://file:///home/user/movie.srt'
lua warning: Error while running script /usr/share/vlc/lua/extensions/vlsub.lua, function (null)(): /usr/share/vlc/lua/extensions/vlsub.lua:1830: attempt to index local 'stream' (a nil value)