From 788c6fdfdba5e662441cccccc91eeff02641264c Mon Sep 17 00:00:00 2001 From: Daniel Haller Date: Thu, 2 May 2024 02:15:41 +0200 Subject: [PATCH] show error when crunchyroll shows dub but not available --- src/api/routes/service/service.service.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/api/routes/service/service.service.ts b/src/api/routes/service/service.service.ts index 365adb0..df22062 100644 --- a/src/api/routes/service/service.service.ts +++ b/src/api/routes/service/service.service.ts @@ -12,7 +12,7 @@ import { finished } from 'stream/promises' import Ffmpeg from 'fluent-ffmpeg' import { adnGetM3U8Playlist, adnGetPlaylist } from '../adn/adn.service' import { ADNEpisode } from '../../types/adn' -import { setProgressBar } from '../../../electron/background' +import { messageBox, setProgressBar } from '../../../electron/background' import { getFFMPEGPath } from '../../services/ffmpeg' import { getDRMKeys, Uint8ArrayToBase64 } from '../../services/decryption' import { getMP4DecryptPath } from '../../services/mp4decrypt' @@ -342,7 +342,15 @@ export async function downloadCrunchyrollPlaylist( await deleteVideoToken(episodeID, playlist.data.token) playlist = await crunchyGetPlaylistDRM(found.guid) } else { - console.log('Exact Playlist not found, taking what crunchy gives.') + 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' + ) } } }