mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-14 17:38:29 +00:00
Improve URL replacement regex in HLS manifest logic
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
parent
2d1617a46a
commit
2b1a940298
@ -177,7 +177,7 @@ module Invidious::Routes::API::Manifest
|
||||
manifest = response.body
|
||||
|
||||
if local
|
||||
manifest = manifest.gsub(/^(https:\/\/\w+---.{11}\.c\.youtube\.com[^\n]*)|(https:\/\/\w+---.{11}\.googlevideo\.com[^\n]*)/m) do |match|
|
||||
manifest = manifest.gsub(/https:\/\/\w+---.{11}(\.c\.youtube\.com|\.googlevideo\.com)[^\n]*/m) do |match|
|
||||
path = URI.parse(match).path
|
||||
|
||||
path = path.lchop("/videoplayback/")
|
||||
|
Loading…
Reference in New Issue
Block a user