From f00556ab517e360a827c605dc30c663c44631d6c Mon Sep 17 00:00:00 2001 From: MasutaYunikon Date: Thu, 16 Apr 2026 09:21:26 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20le=20badge=20de=20rename=20utilise=20la?= =?UTF-8?q?=20meme=20logique=20que=20cot=C3=A9=20serveur=20et=20n'apparait?= =?UTF-8?q?=20plus=20sur=20les=20vue=20series=20si=20il=20ne=20devrais=20p?= =?UTF-8?q?as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/serie/SerieSeasonCard.vue | 9 ++++++--- src/views/SerieView.vue | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/serie/SerieSeasonCard.vue b/src/components/serie/SerieSeasonCard.vue index 83110d7..3bf5994 100644 --- a/src/components/serie/SerieSeasonCard.vue +++ b/src/components/serie/SerieSeasonCard.vue @@ -166,6 +166,7 @@ const props = defineProps<{ organizedByEpisode: Record epActionLoading : Record downloadingSeason ?: boolean + nfoSupport ?: boolean }>() const emit = defineEmits<{ @@ -253,9 +254,11 @@ function epExpectedName(ep: any): string { const entry = props.organizedByEpisode[String(ep.id)] if (!entry) return '' const srcExt = entry.dest_filename ? '.' + entry.dest_filename.split('.').pop() : '.mkv' - if (ep.nfo_filename) return ep.nfo_filename.replace(/\.[^.]+$/, '') + srcExt - if (ep.formatted_name?.trim()) return ep.formatted_name.replace(/[<>:"/\\|?*]/g, '').trim() + srcExt - return entry.dest_filename + if (props.nfoSupport) { + return ep.nfo_filename ? ep.nfo_filename.replace(/\.[^.]+$/, '') + srcExt : entry.dest_filename + } else { + return ep.formatted_name?.trim() ? ep.formatted_name.replace(/[<>:"/\\|?*]/g, '').trim() + srcExt : entry.dest_filename + } } function epNeedsRename(ep: any): boolean { const entry = props.organizedByEpisode[String(ep.id)] diff --git a/src/views/SerieView.vue b/src/views/SerieView.vue index 69cb41c..090f1d2 100644 --- a/src/views/SerieView.vue +++ b/src/views/SerieView.vue @@ -43,6 +43,7 @@ :organized-by-episode="organizedByEpisode" :ep-action-loading="epActionLoading" :downloading-season="!!downloadingSeason[season.id]" + :nfo-support="nfoSupport" @toggle="toggleSeason" @download="(key, url, magnet) => download(key, url, magnet)" @download-season="downloadSeason" @@ -87,6 +88,7 @@ const downloaded = ref([]) const manualImportOpen = ref(false) const organizedByEpisode = ref>({}) const mediaPath = ref('/') +const nfoSupport = ref(false) const epActionLoading = ref>({}) const unimportMenuOpen = ref(false) const downloadingAll = ref(false) @@ -128,7 +130,7 @@ async function fetchOrganized() { async function fetchSettings() { try { const res = await fetch('/api/settings', { credentials: 'include' }) - if (res.ok) { const s = await res.json(); mediaPath.value = s.mediaPath || '/' } + if (res.ok) { const s = await res.json(); mediaPath.value = s.mediaPath || '/'; nfoSupport.value = !!s.nfoSupport } } catch {} }