From e223e1e22e34db2de4ecc2f4245bc83a3c819ce5 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:48:01 +0100 Subject: [PATCH] Only do UMP handling on web client. --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5ad870a..d2b51dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -277,6 +277,7 @@ async fn index(req: HttpRequest) -> Result> { let video_playback = req.path().eq("/videoplayback"); let is_android = video_playback && query.get("c").unwrap_or("").eq("ANDROID"); + let is_web = video_playback && query.get("c").unwrap_or("").eq("WEB"); let is_ump = video_playback && query.get("ump").is_some(); @@ -327,7 +328,7 @@ async fn index(req: HttpRequest) -> Result> { url.set_query(Some(qs.to_string().as_str())); let method = { - if !is_android && video_playback { + if is_web && video_playback { Method::POST } else { req.method().clone() @@ -336,7 +337,7 @@ async fn index(req: HttpRequest) -> Result> { let mut request = Request::new(method, url); - if !is_android && video_playback { + if is_web && video_playback { request.body_mut().replace(Body::from("x\0")); }