testing and fixing

This commit is contained in:
Simon
2025-08-09 12:21:43 +00:00
parent 6b4b0be522
commit 3feeb02251
12 changed files with 204 additions and 96 deletions

44
src/providers/all.rs Normal file
View 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![];
}
}