my brain isnt work

This commit is contained in:
SadlyNotSappho 2023-09-05 11:56:00 -07:00
parent 7a6134b075
commit 8b414b5181
1 changed files with 10 additions and 0 deletions

View File

@ -235,3 +235,13 @@ pub async fn get_page(date: &str, config: &Config) -> Page {
cached, cached,
} }
} }
pub async fn current_page(config: &Config) -> Page {
let page = get_page(&config.latest_date[..], config).await;
if page.cached {
page
} else {
cache::download_page_image(&config.cache_folder[..], &page).await;
page
}
}