fix: incorrectly set snapshot status to 'completed' when bilibili returned other status code

This commit is contained in:
alikia2x (寒寒) 2025-04-15 03:34:45 +08:00
parent 68bd46fd8a
commit 651eef0b9e
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -41,7 +41,7 @@ export const snapshotVideoWorker = async (job: Job): Promise<void> => {
const stat = await insertVideoSnapshot(client, aid, task); const stat = await insertVideoSnapshot(client, aid, task);
if (typeof stat === "number") { if (typeof stat === "number") {
await setBiliVideoStatus(client, aid, stat); await setBiliVideoStatus(client, aid, stat);
await setSnapshotStatus(client, id, "completed"); await setSnapshotStatus(client, id, "bili_error");
logger.warn( logger.warn(
`Bilibili return status ${status} when snapshoting for ${aid}.`, `Bilibili return status ${status} when snapshoting for ${aid}.`,
"mq", "mq",