cleanup
This commit is contained in:
72
src/api.rs
72
src/api.rs
@@ -120,24 +120,24 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
status: "active".to_string(),
|
||||
categories: vec![],
|
||||
options: vec![
|
||||
ChannelOption {
|
||||
id: "sort".to_string(),
|
||||
title: "Sort".to_string(),
|
||||
description: "Sort the Videos".to_string(), //"Sort the videos by Date or Name.".to_string(),
|
||||
systemImage: "list.number".to_string(),
|
||||
colorName: "blue".to_string(),
|
||||
options: vec![
|
||||
FilterOption {
|
||||
id: "date".to_string(),
|
||||
title: "Date".to_string(),
|
||||
},
|
||||
FilterOption {
|
||||
id: "name".to_string(),
|
||||
title: "Name".to_string(),
|
||||
},
|
||||
],
|
||||
multiSelect: false,
|
||||
},
|
||||
// ChannelOption {
|
||||
// id: "sort".to_string(),
|
||||
// title: "Sort".to_string(),
|
||||
// description: "Sort the Videos".to_string(), //"Sort the videos by Date or Name.".to_string(),
|
||||
// systemImage: "list.number".to_string(),
|
||||
// colorName: "blue".to_string(),
|
||||
// options: vec![
|
||||
// FilterOption {
|
||||
// id: "date".to_string(),
|
||||
// title: "Date".to_string(),
|
||||
// },
|
||||
// FilterOption {
|
||||
// id: "name".to_string(),
|
||||
// title: "Name".to_string(),
|
||||
// },
|
||||
// ],
|
||||
// multiSelect: false,
|
||||
// },
|
||||
ChannelOption {
|
||||
id: "featured".to_string(),
|
||||
title: "Featured".to_string(),
|
||||
@@ -156,24 +156,24 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
],
|
||||
multiSelect: false,
|
||||
},
|
||||
ChannelOption {
|
||||
id: "duration".to_string(),
|
||||
title: "Duration".to_string(),
|
||||
description: "Filter the videos by duration.".to_string(),
|
||||
systemImage: "timer".to_string(),
|
||||
colorName: "green".to_string(),
|
||||
options: vec![
|
||||
FilterOption {
|
||||
id: "short".to_string(),
|
||||
title: "< 1h".to_string(),
|
||||
},
|
||||
FilterOption {
|
||||
id: "long".to_string(),
|
||||
title: "> 1h".to_string(),
|
||||
},
|
||||
],
|
||||
multiSelect: true,
|
||||
},
|
||||
// ChannelOption {
|
||||
// id: "duration".to_string(),
|
||||
// title: "Duration".to_string(),
|
||||
// description: "Filter the videos by duration.".to_string(),
|
||||
// systemImage: "timer".to_string(),
|
||||
// colorName: "green".to_string(),
|
||||
// options: vec![
|
||||
// FilterOption {
|
||||
// id: "short".to_string(),
|
||||
// title: "< 1h".to_string(),
|
||||
// },
|
||||
// FilterOption {
|
||||
// id: "long".to_string(),
|
||||
// title: "> 1h".to_string(),
|
||||
// },
|
||||
// ],
|
||||
// multiSelect: true,
|
||||
// },
|
||||
],
|
||||
nsfw: true,
|
||||
});
|
||||
|
||||
@@ -374,7 +374,6 @@ impl PerverzijaProvider {
|
||||
return Ok(video_item);
|
||||
}
|
||||
Ok(None) => {
|
||||
println!("Couldnt find {}", lookup_url);
|
||||
},
|
||||
Err(e) => {
|
||||
println!("Error fetching video from database: {}", e);
|
||||
@@ -411,8 +410,7 @@ impl PerverzijaProvider {
|
||||
.split("\"")
|
||||
.collect::<Vec<&str>>()[0]
|
||||
.to_string().replace("index.php","xs1.php");
|
||||
println!("new_url = {:?}", url);
|
||||
if url.starts_with("https://discord.com"){
|
||||
if !url.contains("xtremestream.xyz"){
|
||||
url = "!".to_string()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user