adapted cache duration
This commit is contained in:
40
src/api.rs
40
src/api.rs
@@ -160,7 +160,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
if clientversion >= ClientVersion::new(22, 101, "22e".to_string()) {
|
||||
// pmvhaven
|
||||
@@ -235,7 +235,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
},
|
||||
],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
}
|
||||
if clientversion >= ClientVersion::new(22, 97, "22a".to_string()) {
|
||||
@@ -306,7 +306,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
// },
|
||||
],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: None,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: None,
|
||||
});
|
||||
|
||||
// status.add_channel(Channel {
|
||||
@@ -403,7 +403,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
// multiSelect: false,
|
||||
// }],
|
||||
// nsfw: true,
|
||||
//cacheDuration: 1800,
|
||||
//cacheDuration: Some(1800),
|
||||
// });
|
||||
|
||||
status.add_channel(Channel {
|
||||
@@ -445,7 +445,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
let files = fs::read_dir("./src/providers").unwrap();
|
||||
@@ -481,7 +481,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: true,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// Redtube
|
||||
@@ -495,7 +495,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
categories: vec![],
|
||||
options: vec![],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// ok.porn
|
||||
@@ -530,7 +530,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// pornhat
|
||||
@@ -565,7 +565,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
//perfectgirls
|
||||
@@ -600,7 +600,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// okxxx
|
||||
@@ -635,7 +635,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// homoxxx
|
||||
@@ -670,7 +670,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// // hentaimoon
|
||||
@@ -705,7 +705,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
// multiSelect: false,
|
||||
// }],
|
||||
// nsfw: true,
|
||||
// cacheDuration: 1800,
|
||||
// cacheDuration: Some(1800),
|
||||
// });
|
||||
|
||||
// xxthots
|
||||
@@ -740,7 +740,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// porn00
|
||||
@@ -775,7 +775,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// freshporno
|
||||
@@ -810,7 +810,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
multiSelect: false,
|
||||
}],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
|
||||
// porn00
|
||||
@@ -824,7 +824,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
// categories: vec![],
|
||||
// options: vec![],
|
||||
// nsfw: true,
|
||||
// cacheDuration: 1800,
|
||||
// cacheDuration: Some(1800),
|
||||
// });
|
||||
|
||||
//missav
|
||||
@@ -957,7 +957,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
},
|
||||
],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: None,
|
||||
});
|
||||
|
||||
if clientversion >= ClientVersion::new(22, 105, "22i".to_string()) {
|
||||
@@ -1021,7 +1021,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
|
||||
},
|
||||
],
|
||||
nsfw: true,
|
||||
cacheDuration: 1800,
|
||||
cacheDuration: Some(1800),
|
||||
});
|
||||
}
|
||||
status.iconUrl = format!("http://{}/favicon.ico", host).to_string();
|
||||
|
||||
@@ -18,7 +18,8 @@ pub struct Channel {
|
||||
pub categories: Vec<String>, //[],
|
||||
pub options: Vec<ChannelOption>,
|
||||
pub nsfw: bool, //true
|
||||
pub cacheDuration: u32, //Some(86400)
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cacheDuration: Option<u32>, //Some(86400)
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user