mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Fixed minor bug with manual mappings options for ffmpeg
also a tiny cleanup
This commit is contained in:
parent
c5eea95c3f
commit
91cc1a18a2
@ -13,9 +13,7 @@ class postprocess(object):
|
|||||||
self.stream = stream
|
self.stream = stream
|
||||||
self.merge_subtitle = options.merge_subtitle
|
self.merge_subtitle = options.merge_subtitle
|
||||||
self.external_subtitle = options.subtitle
|
self.external_subtitle = options.subtitle
|
||||||
self.require_subtitle = options.require_subtitle
|
|
||||||
self.get_all_subtitles = options.get_all_subtitles
|
self.get_all_subtitles = options.get_all_subtitles
|
||||||
self.output = options.output
|
|
||||||
self.subfixes = subfixes
|
self.subfixes = subfixes
|
||||||
self.detect = None
|
self.detect = None
|
||||||
for i in ["ffmpeg", "avconv"]:
|
for i in ["ffmpeg", "avconv"]:
|
||||||
@ -157,10 +155,8 @@ class postprocess(object):
|
|||||||
|
|
||||||
if self.merge_subtitle:
|
if self.merge_subtitle:
|
||||||
langs = self.sublanguage()
|
langs = self.sublanguage()
|
||||||
stream = -1
|
for stream_num, language in enumerate(langs, start = 2):
|
||||||
for language in langs:
|
arguments += ["-map", "0", "-map", "1", "-map", str(stream_num), "-c:s:" + str(stream_num - 2), "mov_text", "-metadata:s:s:" + str(stream_num - 2), "language=" + language]
|
||||||
stream += 1
|
|
||||||
arguments += ["-map", str(stream + 1), "-c:s:" + str(stream), "mov_text", "-metadata:s:s:" + str(stream), "language=" + language]
|
|
||||||
if len(self.subfixes) >= 2:
|
if len(self.subfixes) >= 2:
|
||||||
for subfix in self.subfixes:
|
for subfix in self.subfixes:
|
||||||
subfile = "{}.srt".format(name + subfix)
|
subfile = "{}.srt".format(name + subfix)
|
||||||
|
Loading…
Reference in New Issue
Block a user