yesporn fix
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::util::cache::VideoCache;
|
||||
use crate::util::parse_abbreviated_number;
|
||||
use crate::util::requester::Requester;
|
||||
use crate::util::time::parse_time_to_seconds;
|
||||
use crate::videos::{ServerOptions, VideoItem};
|
||||
use crate::videos::{ServerOptions, VideoFormat, VideoItem};
|
||||
use async_trait::async_trait;
|
||||
use chrono::{DateTime, NaiveDate, Utc};
|
||||
use error_chain::error_chain;
|
||||
@@ -949,7 +949,10 @@ impl YespornProvider {
|
||||
duration,
|
||||
);
|
||||
if let Some(preview) = preview {
|
||||
item = item.preview(preview);
|
||||
let mut format =
|
||||
VideoFormat::new(preview.clone(), "preview".to_string(), "video/mp4".to_string());
|
||||
format.add_http_header("Referer".to_string(), item.url.clone());
|
||||
item = item.preview(preview).formats(vec![format]);
|
||||
}
|
||||
if let Some(views) = views {
|
||||
item = item.views(views);
|
||||
|
||||
Reference in New Issue
Block a user