From c71a676edf4ccc583652e1f31c571f3cd898d60e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 8 Jun 2025 02:13:00 +0200 Subject: Fix youtube for schizo proxy users --- video_player/src/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'video_player/src') diff --git a/video_player/src/main.cpp b/video_player/src/main.cpp index 54b5bb4..e2a8629 100644 --- a/video_player/src/main.cpp +++ b/video_player/src/main.cpp @@ -473,8 +473,14 @@ static int64_t size_fn(void *cookie) { if(res == 0) { size_t header_start = str_find_case_insensitive(buffer, 0, "200 OK", 6); if(header_start == std::string::npos) { - res = MPV_ERROR_UNSUPPORTED; - goto end; + header_start = str_find_case_insensitive(buffer, 0, "HTTP/3 200", 10); + if(header_start == std::string::npos) + header_start = str_find_case_insensitive(buffer, 0, "HTTP/2 200", 10); + + if(header_start == std::string::npos) { + res = MPV_ERROR_UNSUPPORTED; + goto end; + } } header_start += 6; -- cgit v1.2.3-70-g09d2