testing and fixing
This commit is contained in:
44
src/providers/all.rs
Normal file
44
src/providers/all.rs
Normal file
@@ -0,0 +1,44 @@
|
||||
use std::vec;
|
||||
use error_chain::error_chain;
|
||||
use futures::future::join_all;
|
||||
use serde_json::error::Category;
|
||||
use wreq::Client;
|
||||
use wreq_util::Emulation;
|
||||
use crate::db;
|
||||
use crate::providers::Provider;
|
||||
use crate::util::cache::VideoCache;
|
||||
use crate::videos::{self, ServerOptions, VideoItem};
|
||||
use crate::DbPool;
|
||||
|
||||
error_chain! {
|
||||
foreign_links {
|
||||
Io(std::io::Error);
|
||||
HttpRequest(wreq::Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
pub struct AllProvider {
|
||||
}
|
||||
|
||||
impl Provider for AllProvider {
|
||||
async fn get_videos(
|
||||
&self,
|
||||
cache: VideoCache,
|
||||
pool: DbPool,
|
||||
_channel: String,
|
||||
sort: String,
|
||||
query: Option<String>,
|
||||
page: String,
|
||||
per_page: String,
|
||||
options: ServerOptions,
|
||||
) -> Vec<VideoItem> {
|
||||
let sites = options.sites.unwrap();
|
||||
|
||||
println!("{:?}", sites);
|
||||
|
||||
return vec![];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user