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