uploaders

This commit is contained in:
Simon
2026-03-31 13:39:11 +00:00
parent 80207efa73
commit bdc7d61121
8 changed files with 913 additions and 4 deletions

View File

@@ -474,6 +474,19 @@ impl NoodlemagazineProvider {
if normalized.is_empty() || !self.is_allowed_thumb_url(&normalized) {
return String::new();
}
let Some(url) = Url::parse(&normalized).ok() else {
return String::new();
};
if url
.host_str()
.is_some_and(|host| host.eq_ignore_ascii_case("img.pvvstream.pro"))
{
return crate::providers::build_proxy_url(
_options,
"noodlemagazine-thumb",
&crate::providers::strip_url_scheme(&normalized),
);
}
normalized
}
@@ -707,7 +720,7 @@ mod tests {
assert_eq!(items.len(), 1);
assert_eq!(
items[0].thumb,
"https://img.pvvstream.pro/preview/abc/-111_222/240/iv.okcdn.ru/getVideoPreview?id=1&type=39&fn=vid_l"
"https://example.com/proxy/noodlemagazine-thumb/img.pvvstream.pro/preview/abc/-111_222/240/iv.okcdn.ru/getVideoPreview?id=1&type=39&fn=vid_l"
);
}