remove embed
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::status::*;
|
|||||||
use crate::util::cache::VideoCache;
|
use crate::util::cache::VideoCache;
|
||||||
use crate::util::parse_abbreviated_number;
|
use crate::util::parse_abbreviated_number;
|
||||||
use crate::util::requester::Requester;
|
use crate::util::requester::Requester;
|
||||||
use crate::videos::{ServerOptions, VideoEmbed, VideoFormat, VideoItem};
|
use crate::videos::{ServerOptions, VideoFormat, VideoItem};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use chrono::DateTime;
|
use chrono::DateTime;
|
||||||
use error_chain::error_chain;
|
use error_chain::error_chain;
|
||||||
@@ -1038,12 +1038,7 @@ sys.stdout.buffer.write(response.content)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some((embed_html, iframe_url)) = selected_embed.or(fallback_embed) {
|
if let Some((_embed_html, iframe_url)) = selected_embed.or(fallback_embed) {
|
||||||
item.embed = Some(VideoEmbed {
|
|
||||||
html: embed_html,
|
|
||||||
source: iframe_url.clone(),
|
|
||||||
});
|
|
||||||
|
|
||||||
let proxy_url = self.proxied_video(options, page_url);
|
let proxy_url = self.proxied_video(options, page_url);
|
||||||
if Self::is_allowed_vidara_iframe_url(&iframe_url) {
|
if Self::is_allowed_vidara_iframe_url(&iframe_url) {
|
||||||
match self.resolve_vidara_stream(&iframe_url).await {
|
match self.resolve_vidara_stream(&iframe_url).await {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use crate::util::cache::VideoCache;
|
|||||||
use crate::util::parse_abbreviated_number;
|
use crate::util::parse_abbreviated_number;
|
||||||
use crate::util::requester::Requester;
|
use crate::util::requester::Requester;
|
||||||
use crate::util::time::parse_time_to_seconds;
|
use crate::util::time::parse_time_to_seconds;
|
||||||
use crate::videos::{ServerOptions, VideoEmbed, VideoFormat, VideoItem};
|
use crate::videos::{ServerOptions, VideoFormat, VideoItem};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use chrono::NaiveDate;
|
use chrono::NaiveDate;
|
||||||
use error_chain::error_chain;
|
use error_chain::error_chain;
|
||||||
@@ -1106,12 +1106,6 @@ impl ShooshtimeProvider {
|
|||||||
tags.sort();
|
tags.sort();
|
||||||
tags.dedup();
|
tags.dedup();
|
||||||
|
|
||||||
let embed_url = page_url
|
|
||||||
.trim_end_matches('/')
|
|
||||||
.split('/')
|
|
||||||
.nth_back(1)
|
|
||||||
.map(|video_id| format!("{}/embed/{video_id}", self.url));
|
|
||||||
|
|
||||||
if let Some(title) = title {
|
if let Some(title) = title {
|
||||||
item.title = title;
|
item.title = title;
|
||||||
}
|
}
|
||||||
@@ -1146,14 +1140,6 @@ impl ShooshtimeProvider {
|
|||||||
item.thumb = thumb;
|
item.thumb = thumb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(source) = embed_url {
|
|
||||||
item = item.embed(VideoEmbed {
|
|
||||||
html: format!(
|
|
||||||
"<iframe src=\"{source}\" frameborder=\"0\" allowfullscreen></iframe>"
|
|
||||||
),
|
|
||||||
source,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(item)
|
Ok(item)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user