It looks like it stays in memory to me. A similar plugin that just downloads the subtitles file from opensubtitles is probably going to be your answer by using some of that code and modifying around line:
--vlc.msg.dbg("[Subtitles] File found in the archive: " .. srturl .. extension)
The one line edit below is BAD, but gets it not broken for unix-like OS-es only. For the script to be cross platform it needs OS detection logic:
if(item ~= nil) then
local name = item:uri()
vlc.msg.info("NAME: "..name)
name = vlc.strings.decode_uri(string.gsub(name, "file:///", ""))
name = "/"..name
vlc.msg.info(""..name.."."..language.."."..extension)
vlc.msg.info("[Subtitle-download] saving subtitle to: "..name.."."..language.."."..extension)
local fsout = assert(io.open(name.."."..language.."."..extension, "w"))
fsout:write(dataBuffer)
assert(fsout:close())
end
If someone running Windows VLC is interested in testing a patch that gets saving working on both Linux and Windows, check this pull request.
Evidently someone has tacked on some enhancements including the patch here.
This version here works in Linux (as well as in Windows) to save subtitles.