mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-13 12:47:30 +01:00
Fix splice to handle float
Needed for new youtube js player f1ca6900
Add 57dbe8077f (diff-729b57caa8d006426f6a8960c061f519a8b6658682284015e069745af52ffb07)
This commit is contained in:
parent
e1eae16b56
commit
1ca673bd98
@ -416,7 +416,7 @@ class JSInterpreter(object):
|
||||
elif member == 'splice':
|
||||
assertion(isinstance(obj, list), 'must be applied on a list')
|
||||
assertion(argvals, 'takes one or more arguments')
|
||||
index, howMany = (argvals + [len(obj)])[:2]
|
||||
index, howMany = map(int, (argvals + [len(obj)])[:2])
|
||||
if index < 0:
|
||||
index += len(obj)
|
||||
add_items = argvals[2:]
|
||||
|
Loading…
Reference in New Issue
Block a user