mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-14 09:16:32 +00:00
Fix output of --youtube-print-sig-code when counting down to 0
This commit is contained in:
parent
c3c88a2664
commit
e35e4ddc9a
@ -488,8 +488,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
|||||||
def gen_sig_code(idxs):
|
def gen_sig_code(idxs):
|
||||||
def _genslice(start, end, step):
|
def _genslice(start, end, step):
|
||||||
starts = u'' if start == 0 else str(start)
|
starts = u'' if start == 0 else str(start)
|
||||||
ends = u':%d' % (end+step)
|
ends = (u':%d' % (end+step)) if end + step >= 0 else u':'
|
||||||
steps = u'' if step == 1 else (':%d' % step)
|
steps = u'' if step == 1 else (u':%d' % step)
|
||||||
return u's[%s%s%s]' % (starts, ends, steps)
|
return u's[%s%s%s]' % (starts, ends, steps)
|
||||||
|
|
||||||
step = None
|
step = None
|
||||||
|
Loading…
Reference in New Issue
Block a user