aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM.K <mk-pmb@users.noreply.github.com>2017-10-03 22:50:27 +0200
committerSergey M <dstftw@gmail.com>2017-10-04 03:50:27 +0700
commitc110944fa2f21af733b4f3168764e1b008e11514 (patch)
tree6fe5a534168bf55272eb6fe7711a6b1e7fbbffbd
parent9524dca3accc1e60cddd141f06924ed7404db9bd (diff)
downloadyoutube-dl-c110944fa2f21af733b4f3168764e1b008e11514.tar.xz
[extractor/common] Fix typo in _parse_mpd_formats
-rw-r--r--youtube_dl/extractor/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 2bbbf8f4d..a878550c2 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1920,7 +1920,7 @@ class InfoExtractor(object):
# can't be used at the same time
if '%(Number' in media_template and 's' not in representation_ms_info:
segment_duration = None
- if 'total_number' not in representation_ms_info and 'segment_duration':
+ if 'total_number' not in representation_ms_info and 'segment_duration' in representation_ms_info:
segment_duration = float_or_none(representation_ms_info['segment_duration'], representation_ms_info['timescale'])
representation_ms_info['total_number'] = int(math.ceil(float(period_duration) / segment_duration))
representation_ms_info['fragments'] = [{