|
@@ -251,11 +251,11 @@ export class WorkService {
|
|
|
onProgress?.(0.1, `获取作品列表中:${account.accountName || account.id} (${platform})`);
|
|
onProgress?.(0.1, `获取作品列表中:${account.accountName || account.id} (${platform})`);
|
|
|
const accountInfo = await headlessBrowserService.fetchAccountInfo(platform, cookieList, {
|
|
const accountInfo = await headlessBrowserService.fetchAccountInfo(platform, cookieList, {
|
|
|
onWorksFetchProgress: (info) => {
|
|
onWorksFetchProgress: (info) => {
|
|
|
- const declaredTotal = typeof info.declaredTotal === 'number' ? info.declaredTotal : 0;
|
|
|
|
|
- const ratio = declaredTotal > 0 ? Math.min(1, info.totalSoFar / declaredTotal) : 0;
|
|
|
|
|
|
|
+ const declaredTotal = typeof info.declaredTotal === 'number' ? info.declaredTotal : null;
|
|
|
|
|
+ const ratio = declaredTotal !== null && declaredTotal > 0 ? Math.min(1, info.totalSoFar / declaredTotal) : 0;
|
|
|
onProgress?.(
|
|
onProgress?.(
|
|
|
0.1 + ratio * 0.2,
|
|
0.1 + ratio * 0.2,
|
|
|
- `拉取作品中:${account.accountName || account.id} (${platform}) ${info.totalSoFar}/${declaredTotal || '?'}`
|
|
|
|
|
|
|
+ `拉取作品中:${account.accountName || account.id} (${platform}) ${declaredTotal !== null ? `${info.totalSoFar}/${declaredTotal}` : info.totalSoFar}`
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|