mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-05-18 15:41:47 +00:00
fixed more rage errors if no image array crunchyroll
This commit is contained in:
parent
f90676c81e
commit
928b2bc95d
1 changed files with 3 additions and 3 deletions
|
|
@ -719,7 +719,7 @@ export default class Crunchy implements ServiceClass {
|
||||||
value: toSend
|
value: toSend
|
||||||
.map((a) => {
|
.map((a) => {
|
||||||
return a.items.map((a): SearchResponseItem => {
|
return a.items.map((a): SearchResponseItem => {
|
||||||
const images = (a.images.poster_tall ?? [[{ source: '/notFound.png' }]])[0];
|
const images = (a.images?.poster_tall ?? [[{ source: '/notFound.png' }]])[0];
|
||||||
return {
|
return {
|
||||||
id: a.id,
|
id: a.id,
|
||||||
image: images[Math.floor(images.length / 2)].source,
|
image: images[Math.floor(images.length / 2)].source,
|
||||||
|
|
@ -3145,7 +3145,7 @@ export default class Crunchy implements ServiceClass {
|
||||||
return {
|
return {
|
||||||
data: sortedEpisodes,
|
data: sortedEpisodes,
|
||||||
list: Object.entries(sortedEpisodes).map(([key, value]) => {
|
list: Object.entries(sortedEpisodes).map(([key, value]) => {
|
||||||
const images = (value.items[0].images.thumbnail ?? [[{ source: '/notFound.png' }]])[0];
|
const images = (value.items[0].images?.thumbnail ?? [[{ source: '/notFound.png' }]])[0];
|
||||||
const seconds = Math.floor(value.items[0].duration_ms / 1000);
|
const seconds = Math.floor(value.items[0].duration_ms / 1000);
|
||||||
let epNum;
|
let epNum;
|
||||||
if (data?.absolute) {
|
if (data?.absolute) {
|
||||||
|
|
@ -3244,7 +3244,7 @@ export default class Crunchy implements ServiceClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
// set data
|
// set data
|
||||||
const images = (item.images.thumbnail ?? [[{ source: '/notFound.png' }]])[0];
|
const images = (item.images?.thumbnail ?? [[{ source: '/notFound.png' }]])[0];
|
||||||
const epMeta: CrunchyEpMeta = {
|
const epMeta: CrunchyEpMeta = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue