From e03139645967fb3f7fd2c4b2522d24c33340dea8 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 29 Mar 2026 17:06:23 +0000 Subject: [PATCH] missav fix --- src/providers/missav.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/providers/missav.rs b/src/providers/missav.rs index 3d22f62..18470ee 100644 --- a/src/providers/missav.rs +++ b/src/providers/missav.rs @@ -6,6 +6,7 @@ use crate::status::*; use crate::util::cache::VideoCache; use crate::util::discord::{format_error_chain, send_discord_error_report}; use crate::util::requester::Requester; +use crate::videos::VideoFormat; use crate::videos::ServerOptions; use crate::videos::VideoItem; use async_trait::async_trait; @@ -422,13 +423,15 @@ impl MissavProvider { })() .ok_or_else(|| ErrorKind::ParsingError(format!("video_url\n{:?}", vid).to_string()))?; - let video_item = - VideoItem::new(id, title, video_url, "missav".to_string(), thumb, duration) - .tags(tags) - .preview(format!( - "https://fourhoi.com/{}/preview.mp4", - url_str.split('/').last().unwrap_or_default() - )); + let mut format = VideoFormat::new(video_url.clone(), "auto".to_string(), "m3u8".to_string()); + format.add_http_header("Referer".to_string(), "https://missav.ws/".to_string()); + let video_item = VideoItem::new(id, title, video_url, "missav".to_string(), thumb, duration) + .formats(vec![format]) + .tags(tags) + .preview(format!( + "https://fourhoi.com/{}/preview.mp4", + url_str.split('/').last().unwrap_or_default() + )); // 5. Cache to DB if let Ok(mut conn) = pool.get() {