mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-07 00:17:24 +08:00
fix: 修复字段错误,凭据刷新从第二天开始
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ async def upper_thumb():
|
|||||||
other_tasks.extend(
|
other_tasks.extend(
|
||||||
[
|
[
|
||||||
upper.save_metadata(),
|
upper.save_metadata(),
|
||||||
download_content(upper.thumb_url, upper.thumb_path),
|
download_content(upper.thumb, upper.thumb_path),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
await asyncio.gather(*makedir_tasks)
|
await asyncio.gather(*makedir_tasks)
|
||||||
|
|||||||
+4
-2
@@ -81,10 +81,12 @@ async def manage_model(medias: list[dict], fav_list: FavoriteList) -> None:
|
|||||||
|
|
||||||
async def process() -> None:
|
async def process() -> None:
|
||||||
global anchor
|
global anchor
|
||||||
if datetime.date.today() >= anchor and await credential.check_refresh():
|
if (
|
||||||
|
today := datetime.date.today()
|
||||||
|
) > anchor and await credential.check_refresh():
|
||||||
try:
|
try:
|
||||||
await credential.refresh()
|
await credential.refresh()
|
||||||
anchor = datetime.date.today() + datetime.timedelta(days=1)
|
anchor = today
|
||||||
logger.info("Credential refreshed.")
|
logger.info("Credential refreshed.")
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Failed to refresh credential.")
|
logger.exception("Failed to refresh credential.")
|
||||||
|
|||||||
Reference in New Issue
Block a user