mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
delegate validation to the api level
This commit is contained in:
parent
1a84376b98
commit
09b83d6449
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
/// Parse infohash from the source filepath,
|
/// Parse infohash from the source filepath,
|
||||||
/// decode JSON to array on success
|
/// decode JSON to array on success
|
||||||
pub fn infohashes(path: &str) -> anyhow::Result<Vec<String>> {
|
pub fn infohashes(path: &str) -> anyhow::Result<Vec<String>> {
|
||||||
|
if path.contains("://") {
|
||||||
|
todo!("URL sources yet not supported")
|
||||||
|
}
|
||||||
let mut f = std::fs::File::open(path)?;
|
let mut f = std::fs::File::open(path)?;
|
||||||
let mut s = String::new();
|
let mut s = String::new();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,9 +78,6 @@ async fn main() -> Result<()> {
|
||||||
debug.info("Index queue begin...");
|
debug.info("Index queue begin...");
|
||||||
index.refresh();
|
index.refresh();
|
||||||
for source in &config.infohash {
|
for source in &config.infohash {
|
||||||
if source.contains("://") {
|
|
||||||
todo!("URL sources yet not supported")
|
|
||||||
}
|
|
||||||
debug.info(&format!("Index source `{source}`..."));
|
debug.info(&format!("Index source `{source}`..."));
|
||||||
// grab latest info-hashes from this source
|
// grab latest info-hashes from this source
|
||||||
// * aquatic server may update the stats at this moment, handle result manually
|
// * aquatic server may update the stats at this moment, handle result manually
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue