diff --git a/src/api.rs b/src/api.rs index 18f68f0..dc7a700 100644 --- a/src/api.rs +++ b/src/api.rs @@ -654,6 +654,12 @@ async fn videos_post( video_items.len() ); + + for video in video_items.iter_mut() { + video.id = format!("{}:{}", channel, video.id); + println!("Video ID set to: {}", video.id); + } + // There is a bug in Hottub38 that makes the client error for a 403-url even though formats work fine if clientversion == ClientVersion::new(38, 0, "Hot%20Tub".to_string()) { // filter out videos without preview for old clients diff --git a/src/providers/javtiful.rs b/src/providers/javtiful.rs index 444597a..e06ffdf 100644 --- a/src/providers/javtiful.rs +++ b/src/providers/javtiful.rs @@ -121,6 +121,7 @@ impl JavtifulProvider { _ => "", }; let video_url = format!("{}/videos?{}page={}", self.url, sort_string, page); + println!("Fetching URL: {}", video_url); let old_items = match cache.get(&video_url) { Some((time, items)) => { if time.elapsed().unwrap_or_default().as_secs() < 60 * 5 { @@ -343,10 +344,9 @@ impl JavtifulProvider { .unwrap_or(title) .titlecase(); let id = video_url - .split('/') + .split("/video/") .filter(|s| !s.is_empty()) - .nth(2) - .and_then(|s| s.split('.').next()) + .nth(1) .ok_or_else(|| ErrorKind::Parse(format!("video id\n\n{seg}")))? .to_string(); let thumb_block = seg.split(" String { #[allow(dead_code)] pub fn build_proxy_url(options: &ServerOptions, proxy: &str, target: &str) -> String { - println!("Building proxy URL with options={:?}, proxy={}, target={}", options, proxy, target); let target = target.trim_start_matches('/'); let base = options .public_url_base