From 3f87df685b7755309754818992f4081696b8fa88 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 27 Feb 2026 18:06:10 +0000 Subject: [PATCH] fix: extract anime title from URL and download all episodes on follow --- static/js/watchlist-ui.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/static/js/watchlist-ui.js b/static/js/watchlist-ui.js index 2001e0a..299afa2 100644 --- a/static/js/watchlist-ui.js +++ b/static/js/watchlist-ui.js @@ -203,19 +203,6 @@ async function handleAddToWatchlist(animeUrl, providerId) { console.warn('Could not extract title from URL:', e); } } - let animeTitle = metadata.title || 'Unknown Anime'; - if (animeTitle === 'Unknown Anime') { - // Try to extract title from URL - try { - const urlParts = animeUrl.split('/'); - const slug = urlParts[urlParts.length - 1] || urlParts[urlParts.length - 2]; - animeTitle = slug.replace(/-/g, ' ').replace(/\+/g, ' ').replace(/\s+/g, ' ').trim(); - // Capitalize words - animeTitle = animeTitle.replace(/\b\w/g, l => l.toUpperCase()); - } catch (e) { - console.warn('Could not extract title from URL:', e); - } - } const itemData = { anime_title: animeTitle, @@ -257,10 +244,6 @@ async function handleAddToWatchlist(animeUrl, providerId) { // Update button to show it's already in watchlist updateAddButton(animeUrl, true); - alert(`✅ "${result.anime_title}" a été ajouté à votre watchlist!`); - - // Update button to show it's already in watchlist - updateAddButton(animeUrl, true); } catch (error) { console.error('Error adding to watchlist:', error);