[ADN] Fix crash issue if no episodes were found

This commit is contained in:
AnimeDL 2024-04-13 10:35:53 -07:00
parent 82146f2c51
commit e61c1717ae

4
adn.ts
View file

@ -253,6 +253,10 @@ export default class AnimationDigitalNetwork implements ServiceClass {
console.error('Failed to list show data: Failed to get show');
return { isOk: false };
}
if (show.value.videos.length == 0) {
console.error('No episodes found!');
return { isOk: false };
}
const showData = show.value.videos[0].show;
console.info(`[S.${showData.id}] ${showData.title}`);
const specials: ADNVideo[] = [];