rakepack feeds: Only pull the ones that we can index
This commit is contained in:
parent
8578ee4b10
commit
b254ab1231
|
@ -140,6 +140,8 @@ pub fn handle_pack_feed(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const USEFUL_RAKEPACKS_TO_PULL_FROM_FEED: [&'static str; 2] = [".icons.pack", ".pages.pack"];
|
||||||
|
|
||||||
fn find_new_packs(feed_url: Url, processed_list_path: &Path) -> anyhow::Result<BTreeSet<String>> {
|
fn find_new_packs(feed_url: Url, processed_list_path: &Path) -> anyhow::Result<BTreeSet<String>> {
|
||||||
let processed_file = OpenOptions::new()
|
let processed_file = OpenOptions::new()
|
||||||
.read(true)
|
.read(true)
|
||||||
|
@ -157,6 +159,13 @@ fn find_new_packs(feed_url: Url, processed_list_path: &Path) -> anyhow::Result<B
|
||||||
if line.is_empty() {
|
if line.is_empty() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if !USEFUL_RAKEPACKS_TO_PULL_FROM_FEED
|
||||||
|
.iter()
|
||||||
|
.any(|ext| line.ends_with(ext))
|
||||||
|
{
|
||||||
|
// not a sort of rakepack we care about
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if processed.contains(&line) {
|
if processed.contains(&line) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue