mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
subtile: minor code improvments
This commit is contained in:
parent
617f519977
commit
e2093c9a4d
@ -222,7 +222,7 @@ def get_one_media(stream, options):
|
||||
|
||||
if options.subtitle and options.get_url:
|
||||
if options.get_all_subtitles:
|
||||
for sub in subs[:]:
|
||||
for sub in subs:
|
||||
print(sub.url)
|
||||
else:
|
||||
print(subs[0].url)
|
||||
@ -232,7 +232,7 @@ def get_one_media(stream, options):
|
||||
if options.subtitle and options.output != "-" and not options.get_url:
|
||||
if subs:
|
||||
if options.get_all_subtitles:
|
||||
for sub in subs[:]:
|
||||
for sub in subs:
|
||||
sub.download()
|
||||
else:
|
||||
subs[0].download()
|
||||
|
@ -11,7 +11,7 @@ import platform
|
||||
|
||||
|
||||
class subtitle(object):
|
||||
def __init__(self, options, subtype, url, subfix = ""):
|
||||
def __init__(self, options, subtype, url, subfix = None):
|
||||
self.url = url
|
||||
self.subtitle = None
|
||||
self.options = options
|
||||
@ -37,7 +37,7 @@ class subtitle(object):
|
||||
if self.subtype == "raw":
|
||||
data = self.raw(subdata)
|
||||
|
||||
if(self.subfix != ""):
|
||||
ifself.subfix:
|
||||
self.options.output = self.options.output + self.subfix
|
||||
|
||||
if(self.options.get_raw_subtitles):
|
||||
|
Loading…
Reference in New Issue
Block a user