From 116b923b321ec3e8a0c11d2ce214ecaa7c5cf23a Mon Sep 17 00:00:00 2001 From: stratuma Date: Mon, 20 May 2024 19:05:22 +0200 Subject: [PATCH] changed version and added missing error handeling --- package.json | 2 +- src/api/routes/service/service.service.ts | 32 ++++++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index f4cb86e..31bdc9a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "crunchyroll-downloader", "author": "Stratum", "description": "Crunchyroll Downloader", - "version": "1.1.3", + "version": "1.1.4", "private": true, "main": ".output/src/electron/background.js", "repository": "https://github.com/stratuma/Crunchyroll-Downloader-v4.0", diff --git a/src/api/routes/service/service.service.ts b/src/api/routes/service/service.service.ts index e84fe34..18e2b24 100644 --- a/src/api/routes/service/service.service.ts +++ b/src/api/routes/service/service.service.ts @@ -459,6 +459,20 @@ export async function downloadCrunchyrollPlaylist( if (!playlist) { await updatePlaylistByID(downloadID, 'failed') console.log('Playlist not found') + messageBox( + 'error', + ['Cancel'], + 2, + 'Playlist not found', + 'Playlist not found', + 'Playlist not found' + ) + server.logger.log({ + level: 'error', + message: `Playlist not found for Download ${downloadID}`, + timestamp: new Date().toISOString(), + section: 'crunchyrollDownloadProcess' + }) return } @@ -469,15 +483,15 @@ export async function downloadCrunchyrollPlaylist( await deleteVideoToken(episodeID, playlist.data.token) playlist = await crunchyGetPlaylist(found.guid, found.geo) } else { - console.log('Exact Playlist not found, taking what crunchy gives.'), - messageBox( - 'error', - ['Cancel'], - 2, - 'Not found japanese stream', - 'Not found japanese stream', - 'This usually happens when Crunchyroll displays JP as dub on a language but its not available. The download will fail, just start a new download and remove JP from dubs' - ) + console.log('Exact Playlist not found, taking what crunchy gives.') + messageBox( + 'error', + ['Cancel'], + 2, + 'Not found japanese stream', + 'Not found japanese stream', + 'This usually happens when Crunchyroll displays JP as dub on a language but its not available. The download will fail, just start a new download and remove JP from dubs' + ) server.logger.log({ level: 'error', message: 'Not found japanese stream',