From ced891ef29cbd05053126bcaff47725e2e1eedad Mon Sep 17 00:00:00 2001 From: RockinChaos Date: Fri, 31 May 2024 18:24:47 -0700 Subject: [PATCH] fix: fetching wrong anime season idk why an array is returned for some seasons resulting in '3,03' so instead of it failing and returning the default season we can now return the first entry in the array. --- common/modules/anime.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/modules/anime.js b/common/modules/anime.js index 57e299f..1883618 100644 --- a/common/modules/anime.js +++ b/common/modules/anime.js @@ -175,6 +175,8 @@ export async function anitomyscript (...args) { obj.anime_season = seasonMatch[1] obj.episode_number = seasonMatch[2] obj.anime_title = obj.anime_title.replace(/S(\d{2})E(\d{2})/, '') + } else if (Array.isArray(obj.anime_season)) { + obj.anime_season = obj.anime_season[0] } const yearMatch = obj.anime_title.match(/ (19[5-9]\d|20\d{2})/) if (yearMatch && Number(yearMatch[1]) <= (new Date().getUTCFullYear() + 1)) {