[fix] handle downloadMap error within downloadPlaylistSongs (#873)

This commit is contained in:
silentrald
2025-06-10 20:47:23 +08:00
committed by GitHub
parent ed5f8fb073
commit f46fee7ee7
@@ -359,7 +359,18 @@ export class LocalPlaylistsManagerService {
continue;
}
const downloadedMap = await this.maps.downloadMap(mapDetail, version);
const downloadedMap = await this.maps.downloadMap(mapDetail, version)
.catch(error => {
log.error(
"Could not download map for playlist",
`[${mapDetail.id}] "${mapDetail.name}"`,
error
);
return null;
});
if (!downloadedMap) {
continue;
}
progress.data.downloadedMaps.push(downloadedMap);
progress.data.currentDownload = mapDetail;