mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-31 14:11:54 +05:30
Improve URL replacement regex in HLS manifest logic
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
@@ -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/")
|
||||
|
Reference in New Issue
Block a user