projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3c88a2
)
Fix output of --youtube-print-sig-code when counting down to 0
author
Philipp Hagemeister
<phihag@phihag.de>
Tue, 24 Sep 2013 19:18:03 +0000
(21:18 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Tue, 24 Sep 2013 19:18:03 +0000
(21:18 +0200)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index a6eefdf4ee1521611a0486a861a461a5acb3d763..148b2016073c5cbdee8e39e986310da909cee03c 100644
(file)
--- 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