Skip to content

Commit a1f4125

Browse files
committed
subit: add option to force download
1 parent ef6f82e commit a1f4125

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: subit.lua

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ o = {
2121
path = "subliminal", -- absolute path to subliminal if not on PATH
2222
languages = "en,pt-PT", -- list of IETF languages to search
2323
forceutf8 = true, -- Force subtitles to be saved as utf-8
24+
forcedownload = false, -- Force download of all languages requested
2425

2526
-- Some providers need credentials to be used.
2627
-- This isn't necessary unless you want these providers.
@@ -98,6 +99,12 @@ function main()
9899
table.insert(t.args, "utf-8")
99100
end
100101

102+
if o.forcedownload then
103+
-- (if false, won't download English subs if subtitles
104+
-- are already embedded in the container or present in the dir)
105+
table.insert(t.args, "-f")
106+
end
107+
101108
table.insert(t.args, path)
102109
msg.debug(string.format("Running: \"%s\"", table.concat(t.args,'" "')))
103110
local res = utils.subprocess(t)

0 commit comments

Comments
 (0)