dynamic base url
This commit is contained in:
@@ -162,7 +162,7 @@ impl SxyprnProvider {
|
||||
};
|
||||
// Pass a reference to options if needed, or reconstruct as needed
|
||||
let video_items = match self
|
||||
.get_video_items_from_html(text.clone(), pool, requester)
|
||||
.get_video_items_from_html(text.clone(), pool, requester, &options)
|
||||
.await
|
||||
{
|
||||
Ok(items) => items,
|
||||
@@ -247,7 +247,7 @@ impl SxyprnProvider {
|
||||
};
|
||||
|
||||
let video_items = match self
|
||||
.get_video_items_from_html(text.clone(), pool, requester)
|
||||
.get_video_items_from_html(text.clone(), pool, requester, &options)
|
||||
.await
|
||||
{
|
||||
Ok(items) => items,
|
||||
@@ -284,6 +284,7 @@ impl SxyprnProvider {
|
||||
html: String,
|
||||
_pool: DbPool,
|
||||
_requester: Requester,
|
||||
options: &ServerOptions,
|
||||
) -> Result<Vec<VideoItem>> {
|
||||
if html.is_empty() {
|
||||
return Ok(vec![]);
|
||||
@@ -313,7 +314,8 @@ impl SxyprnProvider {
|
||||
.ok_or_else(|| ErrorKind::Parse("failed to extract /post/ url".into()))?
|
||||
.to_string();
|
||||
|
||||
let video_url = format!("https://hottub.spacemoehre.de/proxy/sxyprn/post/{}", url);
|
||||
let video_url =
|
||||
crate::providers::build_proxy_url(options, "sxyprn", &format!("post/{}", url));
|
||||
|
||||
// title parts
|
||||
let title_parts = video_segment
|
||||
@@ -421,7 +423,7 @@ impl SxyprnProvider {
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
let video_item_url = stream_urls.first().cloned().unwrap_or_else(|| {
|
||||
format!("https://hottub.spacemoehre.de/proxy/sxyprn/post/{}", id)
|
||||
crate::providers::build_proxy_url(options, "sxyprn", &format!("post/{}", id))
|
||||
});
|
||||
|
||||
let mut video_item = VideoItem::new(
|
||||
|
||||
Reference in New Issue
Block a user