mirror of
https://github.com/TeamPiped/piped-proxy.git
synced 2024-12-12 21:30:35 +05:30
Only do UMP handling on web client.
This commit is contained in:
parent
b0381834f6
commit
e223e1e22e
@ -277,6 +277,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
|
||||
|
||||
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<HttpResponse, Box<dyn Error>> {
|
||||
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<HttpResponse, Box<dyn Error>> {
|
||||
|
||||
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"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user