|
|
@ -485,6 +485,9 @@ class FileDownloader(object):
|
|
|
|
subtitle = info_dict['subtitles'][0]
|
|
|
|
subtitle = info_dict['subtitles'][0]
|
|
|
|
(sub_error, sub_lang, sub) = subtitle
|
|
|
|
(sub_error, sub_lang, sub) = subtitle
|
|
|
|
sub_format = self.params.get('subtitlesformat')
|
|
|
|
sub_format = self.params.get('subtitlesformat')
|
|
|
|
|
|
|
|
if sub_error:
|
|
|
|
|
|
|
|
self.report_warning("Some error while getting the subtitles")
|
|
|
|
|
|
|
|
else:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_format
|
|
|
|
sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_format
|
|
|
|
self.report_writesubtitles(sub_filename)
|
|
|
|
self.report_writesubtitles(sub_filename)
|
|
|
@ -501,6 +504,9 @@ class FileDownloader(object):
|
|
|
|
sub_format = self.params.get('subtitlesformat')
|
|
|
|
sub_format = self.params.get('subtitlesformat')
|
|
|
|
for subtitle in subtitles:
|
|
|
|
for subtitle in subtitles:
|
|
|
|
(sub_error, sub_lang, sub) = subtitle
|
|
|
|
(sub_error, sub_lang, sub) = subtitle
|
|
|
|
|
|
|
|
if sub_error:
|
|
|
|
|
|
|
|
self.report_warning("Some error while getting the subtitles")
|
|
|
|
|
|
|
|
else:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_format
|
|
|
|
sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_format
|
|
|
|
self.report_writesubtitles(sub_filename)
|
|
|
|
self.report_writesubtitles(sub_filename)
|
|
|
|