From 245a5b141c71ebc2d244562bb40ea1bddf3217c8 Mon Sep 17 00:00:00 2001 From: stratuma Date: Wed, 10 Jul 2024 14:20:30 +0200 Subject: [PATCH] fixed adn and updated packages --- components/ADN/ListEpisodes.ts | 19 +- components/Settings/Main.vue | 4 +- components/Settings/Naming.vue | 2 +- package.json | 21 +- pages/addanime.vue | 10 +- pnpm-lock.yaml | 1893 +++++++++++--------------------- 6 files changed, 695 insertions(+), 1254 deletions(-) diff --git a/components/ADN/ListEpisodes.ts b/components/ADN/ListEpisodes.ts index a1f5e4e..1062d7a 100644 --- a/components/ADN/ListEpisodes.ts +++ b/components/ADN/ListEpisodes.ts @@ -4,14 +4,25 @@ export async function getEpisodesWithShowIdADN(id: number, lang: 'de' | 'fr') { const { data, error } = await useFetch(`https://gw.api.animationdigitalnetwork.fr/video/show/${id}?offset=0&limit=-1&order=asc`, { method: 'GET', headers: { - 'x-target-distribution': lang + 'x-target-distribution': 'de' } }) if (error.value || !data.value) { - console.log(error.value) - alert(error.value) - return + const { data: newdata, error: newerror } = await useFetch(`https://gw.api.animationdigitalnetwork.fr/video/show/${id}?offset=0&limit=-1&order=asc`, { + method: 'GET', + headers: { + 'x-target-distribution': 'fr' + } + }) + + if (newerror.value || !newdata.value) { + console.log(error.value) + alert(error.value) + return + } + + return newdata.value.videos } return data.value.videos diff --git a/components/Settings/Main.vue b/components/Settings/Main.vue index 6f5d217..61b80c1 100644 --- a/components/Settings/Main.vue +++ b/components/Settings/Main.vue @@ -1,7 +1,7 @@