fix: n'affiche plus tous les épisodes en train de se telecharger si seulement un fichier est selectionner

This commit is contained in:
MasutaYunikon committed 2026-04-21 10:37:40 +02:00
1 parent 1b2036b57b
commit c9534c2011
2 files changed
+11 -1

No files matched your search

+3
View File
@@ -112,6 +112,9 @@ function extractHash(torrent: any): string | null {
return m ? m[1].toLowerCase() : null
}
function isAlreadyQueued(torrent: any): boolean {
// Pour un fichier dans un pack (file_index défini), le hash seul ne suffit pas :
// le pack peut être actif sans que CE fichier spécifique soit en téléchargement.
if (torrent?.file_index != null) return false
const hash = extractHash(torrent)
if (!hash) return false
return activeTorrents.value.some(t => t.hash.toLowerCase() === hash.toLowerCase())