diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-09-24 21:18:03 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-09-24 21:18:03 +0200 |
commit | e35e4ddc9a4605a63a06c5bb12055bfceacb50b8 (patch) | |
tree | 188e175bfbfb74a686947697e16c477bd2e9d872 /youtube_dl/extractor/youtube.py | |
parent | c3c88a2664595fd62898e44f8fc93c84e6d3c5a4 (diff) |
Fix output of --youtube-print-sig-code when counting down to 0
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index a6eefdf4e..148b20160 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -488,8 +488,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): def gen_sig_code(idxs): def _genslice(start, end, step): starts = u'' if start == 0 else str(start) - ends = u':%d' % (end+step) - steps = u'' if step == 1 else (':%d' % step) + ends = (u':%d' % (end+step)) if end + step >= 0 else u':' + steps = u'' if step == 1 else (u':%d' % step) return u's[%s%s%s]' % (starts, ends, steps) step = None |