mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Fix typo in '/videoplayback'
This commit is contained in:
parent
ebfd7d2153
commit
9d2982fcd7
1 changed files with 1 additions and 2 deletions
|
@ -4651,11 +4651,10 @@ get "/videoplayback" do |env|
|
|||
|
||||
begin
|
||||
range_begin, range_end = parse_range(env.request.headers["Range"]?)
|
||||
|
||||
client = make_client(URI.parse(host), proxies, region)
|
||||
(range_begin...range_end).each_slice(HTTP_CHUNK_SIZE) do |slice|
|
||||
headers["Range"] = "bytes=#{slice[0]}-#{slice[-1]}"
|
||||
begin
|
||||
client = make_client(URI.parse(host), proxies, region)
|
||||
client.get(url, headers) do |response|
|
||||
content_range = response.headers["Content-Range"].lchop("bytes ")
|
||||
content_size = content_range.split("/")[-1].to_i
|
||||
|
|
Loading…
Reference in a new issue