updates, enables networks on omgxxx
This commit is contained in:
12
src/api.rs
12
src/api.rs
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user