updates, enables networks on omgxxx

This commit is contained in:
Simon
2025-10-04 16:49:52 +00:00
parent efedc0e6e4
commit 67e7b96758
3 changed files with 17 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ use crate::util::requester::Requester;
use crate::{DbPool, db, status::*, videos::*};
use cute::c;
use std::sync::Arc;
use crate::providers::{Provider, DynProvider, ALL_PROVIDERS};
use crate::providers::{DynProvider, ALL_PROVIDERS};
#[derive(Debug, Clone)]
pub struct ClientVersion {
@@ -1138,10 +1138,6 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
}
for provider in ALL_PROVIDERS.values() {
println!(
"Loaded provider (dyn): {:?}",
std::any::type_name::<&dyn Provider>()
);
status.add_channel(provider.get_channel(clientversion.clone()));
}
status.iconUrl = format!("http://{}/favicon.ico", host).to_string();
@@ -1214,6 +1210,11 @@ async fn videos_post(
.as_deref()
.unwrap_or("en")
.to_string();
let network = video_request
.networks
.as_deref()
.unwrap_or("")
.to_string();
let options = ServerOptions {
featured: Some(featured),
category: Some(category),
@@ -1221,6 +1222,7 @@ async fn videos_post(
filter: Some(filter),
language: Some(language),
requester: Some(requester),
network: Some(network),
};
let video_items = provider
.get_videos(