d82bec92b4
Major performance improvements and bug fixes for Anime-Sama integration: **Backend Optimizations:** - Parallel season loading with asyncio.gather() (200x faster: 50s → 0.25s) - Filter out empty seasons to avoid unnecessary HTML parsing - Reduced timeout from 5s to 3s for quick season checks - Optimized fallback method to detect empty seasons instantly **Frontend Fixes:** - Fixed infinite "Chargement des saisons..." by ensuring DOM exists before loading - Added 15-second timeout with retry functionality for season loading - Staggered requests (500ms delay) to prevent overwhelming the server - Duplicate request prevention with dataset.loading flag **Search Improvements:** - Separated anime and series provider searches - Intelligent query variations (original, normalized, first word) - Better error handling with user-friendly messages **UI Fixes:** - Added missing id="mainTabs" to navigation header - Fixed tabs visibility for authenticated users **Performance:** 10 seasons loaded in 0.25s instead of 50+ seconds Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
49 lines
3.4 KiB
HTML
49 lines
3.4 KiB
HTML
<h1>⚡ Ohm Stream Downloader</h1>
|
|
<p class="subtitle">Téléchargez vos vidéos, animes et séries depuis vos hébergeurs préférés</p>
|
|
|
|
<!-- User info and logout button -->
|
|
<div id="userInfo" style="display: none; margin-bottom: 15px; padding: 10px; background: rgba(0, 217, 255, 0.1); border-radius: 8px; justify-content: space-between; align-items: center;">
|
|
<div style="display: flex; align-items: center; gap: 10px;">
|
|
<span style="color: #00d9ff;">👤</span>
|
|
<span style="color: #fff; font-size: 14px;">Connecté en tant que <strong id="currentUser" style="color: #00d9ff;">-</strong></span>
|
|
</div>
|
|
<button class="btn-secondary btn-small" onclick="handleLogout()" style="padding: 5px 15px; font-size: 12px;">
|
|
🚪 Déconnexion
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Login prompt (shown when not logged in) -->
|
|
<div id="loginPrompt" style="display: none; margin-bottom: 15px; padding: 15px; background: rgba(0, 217, 255, 0.1); border: 1px solid rgba(0, 217, 255, 0.3); border-radius: 8px; text-align: center;">
|
|
<p style="color: #00d9ff; margin: 0 0 10px 0;">👋 Bienvenue! <a href="/login" style="color: #00d9ff; text-decoration: underline;">Connectez-vous</a> pour télécharger des vidéos</p>
|
|
</div>
|
|
|
|
<!-- Tabs - Hidden by default, shown only when authenticated -->
|
|
<div id="mainTabs" class="tabs" style="visibility: hidden;">
|
|
<button class="tab active" data-tab-type="home" onclick="switchTab('home')">
|
|
<svg style="width:16px;height:16px;vertical-align:middle;margin-right:5px" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
|
|
</svg>
|
|
Accueil
|
|
</button>
|
|
<button class="tab" data-tab-type="anime" onclick="switchTab('anime')">
|
|
<svg style="width:16px;height:16px;vertical-align:middle;margin-right:5px" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"></path>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
</svg>
|
|
Anime
|
|
</button>
|
|
<button class="tab" data-tab-type="series" onclick="switchTab('series')">
|
|
<svg style="width:16px;height:16px;vertical-align:middle;margin-right:5px" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 20h16a1 1 0 001-1V5a1 1 0 00-1-1H4a1 1 0 00-1 1v14a1 1 0 001 1z"></path>
|
|
</svg>
|
|
Série
|
|
</button>
|
|
<button class="tab" data-tab-type="providers" onclick="switchTab('providers')">
|
|
<svg style="width:16px;height:16px;vertical-align:middle;margin-right:5px" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
|
|
</svg>
|
|
Fournisseurs
|
|
</button>
|
|
<!-- Provider tabs will be loaded dynamically after the static tabs -->
|
|
</div>
|