mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-10 18:59:39 +00:00
[jsinterp] Fix splice to handle float
Needed for new youtube js player f1ca6900 Closes #1767
This commit is contained in:
@@ -397,7 +397,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:]
|
||||
|
Reference in New Issue
Block a user