This commit is contained in:
2023-08-10 13:41:27 +02:00
parent 3d53c93706
commit 592ff0f8d8

View File

@@ -183,7 +183,7 @@ pub async fn start_update_cache(
}; };
for book in books { for book in books {
for available_type in book.available_types { 'types: for available_type in book.available_types {
let cached_file = match db let cached_file = match db
.cached_file() .cached_file()
.find_unique( .find_unique(
@@ -194,13 +194,15 @@ pub async fn start_update_cache(
Ok(v) => v, Ok(v) => v,
Err(err) => { Err(err) => {
log::error!("{:?}", err); log::error!("{:?}", err);
continue; continue 'types;
} }
}; };
if cached_file.is_none() { if cached_file.is_some() {
continue 'types;
}
cache_file(book.id, available_type, db.clone()).await; cache_file(book.id, available_type, db.clone()).await;
} }
} }
}
} }