This commit is contained in:
Simon
2025-08-10 12:53:00 +00:00
parent 0aee46371a
commit 8944646c85
2 changed files with 10 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ use ntex::web::HttpRequest;
use std::cmp::Ordering;
use tokio::task;
use crate::providers::all::AllProvider;
use crate::providers::hanime::HanimeProvider;
use crate::providers::perverzija::PerverzijaProvider;
use crate::providers::pmvhaven::PmvhavenProvider;
@@ -434,12 +435,13 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
nsfw: true,
});
// All
status.add_channel(Channel {
id: "all".to_string(),
name: "All".to_string(),
description: "(Work in Progress) Query from all sites of this Server".to_string(),
premium: false,
favicon: "https://hottub.spacemoehre.de/favicon".to_string(),
favicon: "https://hottub.spacemoehre.de/favicon.ico".to_string(),
status: "active".to_string(),
categories: vec![],
options: vec![ChannelOption {
@@ -601,6 +603,7 @@ async fn videos_post(
pub fn get_provider(channel: &str) -> Option<AnyProvider> {
match channel {
"all" => Some(AnyProvider::All(AllProvider::new())),
"perverzija" => Some(AnyProvider::Perverzija(PerverzijaProvider::new())),
"hanime" => Some(AnyProvider::Hanime(HanimeProvider::new())),
"spankbang" => Some(AnyProvider::Spankbang(SpankbangProvider::new())),

View File

@@ -23,6 +23,12 @@ error_chain! {
pub struct AllProvider {
}
impl AllProvider {
pub fn new() -> Self {
AllProvider {}
}
}
impl Provider for AllProvider {
async fn get_videos(
&self,