1
0
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:
qnorsten 2016-04-27 19:37:32 +02:00
parent 617f519977
commit e2093c9a4d
2 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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):