aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/postprocessor
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2017-04-12 20:38:43 +0100
committerRemita Amine <remitamine@gmail.com>2017-04-12 20:38:43 +0100
commit40fcba5edb0f54f09e33a193a0ffefb5668ca694 (patch)
tree28f40ca64f30e71cbce96cbf069ce5121afd715c /youtube_dl/postprocessor
parente4d74e2778ca283330460d893a0923820a74df66 (diff)
improve coding style
Diffstat (limited to 'youtube_dl/postprocessor')
-rw-r--r--youtube_dl/postprocessor/ffmpeg.py2
-rw-r--r--youtube_dl/postprocessor/metadatafromtitle.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py
index 7c162d92a..665109558 100644
--- a/youtube_dl/postprocessor/ffmpeg.py
+++ b/youtube_dl/postprocessor/ffmpeg.py
@@ -552,7 +552,7 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor):
sub_filenames.append(old_file)
new_file = subtitles_filename(filename, lang, new_ext)
- if ext == 'dfxp' or ext == 'ttml' or ext == 'tt':
+ if ext in ('dfxp', 'ttml', 'tt'):
self._downloader.report_warning(
'You have requested to convert dfxp (TTML) subtitles into another format, '
'which results in style information loss')
diff --git a/youtube_dl/postprocessor/metadatafromtitle.py b/youtube_dl/postprocessor/metadatafromtitle.py
index 164edd3a8..a7d637a3c 100644
--- a/youtube_dl/postprocessor/metadatafromtitle.py
+++ b/youtube_dl/postprocessor/metadatafromtitle.py
@@ -26,7 +26,7 @@ class MetadataFromTitlePP(PostProcessor):
regex += r'(?P<' + match.group(1) + '>.+)'
lastpos = match.end()
if lastpos < len(fmt):
- regex += re.escape(fmt[lastpos:len(fmt)])
+ regex += re.escape(fmt[lastpos:])
return regex
def run(self, info):