mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
Fix
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user