da5403a307
Implement comprehensive watchlist system with automatic episode detection
and downloading. Features include per-user watchlists, scheduler-based
periodic checks, and a modern web UI.
**Backend Components:**
- WatchlistManager: JSON-based storage with multi-tenant support
- EpisodeChecker: Detects and downloads new episodes automatically
- AutoDownloadScheduler: APScheduler-based periodic task execution
- Complete REST API for CRUD operations and scheduler control
**Frontend Components:**
- Modern watchlist page with dark theme and animations
- Real-time status updates and progress tracking
- Scheduler controls with next-run display
- Add anime directly from search results
**Models & Configuration:**
- WatchlistItem with status, quality, and auto-download settings
- WatchlistSettings for global configuration
- Per-user statistics and provider tracking
**API Endpoints:**
- GET/POST /api/watchlist - List and add items
- PUT/DELETE /api/watchlist/{id} - Update and delete
- POST /api/watchlist/{id}/check - Manual check trigger
- POST /api/watchlist/check-all - Check all due items
- GET/PUT /api/watchlist/settings - Global settings
- GET /api/watchlist/stats - Statistics
- GET/POST /api/watchlist/scheduler/* - Scheduler control
**Configuration Files:**
- config/watchlist.json - User watchlist data
- config/watchlist_settings.json - Global settings
Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Tests pour Ohm Stream Downloader
Ce dossier contient la suite de tests unitaires pour le projet Ohm Stream Downloader.
Structure
tests/
├── __init__.py # Package initialization
├── conftest.py # Pytest configuration et fixtures
├── test_models.py # Tests pour les modèles Pydantic
├── test_downloaders.py # Tests pour les downloaders
├── test_download_manager.py # Tests pour DownloadManager
├── test_favorites.py # Tests pour le système de favoris
└── test_api.py # Tests pour les endpoints FastAPI
Lancer les tests
Tous les tests
pytest
Avec couverture de code
pytest --cov=app --cov-report=html
Uniquement les tests unitaires (rapides)
pytest -m "unit"
Uniquement les tests d'intégration
pytest -m "integration"
Exclure les tests lents
pytest -m "not slow"
Mode verbeux
pytest -v
Afficher le print debugging
pytest -s
Fixtures disponibles
Les fixtures sont définies dans conftest.py :
temp_dir: Répertoire temporaire pour les teststemp_download_dir: Répertoire de téléchargement temporairesample_download_task: Exemple de tâche de téléchargementsample_download_request: Exemple de requête de téléchargementdownload_manager: Instance de DownloadManager configuréefavorites_manager: Instance de FavoritesManager configuréemock_httpx_client: Mock pour httpx.AsyncClientsample_anime_metadata: Exemple de métadonnées animesample_favorite_data: Exemple de favori
Marqueurs (Markers)
Les tests sont marqués automatiquement :
unit: Tests unitaires (isolés, rapides)integration: Tests d'intégration (API endpoints)asyncio: Tests asynchronesslow: Tests lents (à marquer manuellement)network: Tests nécessitant un accès réseau
Couverture de code
Le rapport de couverture est généré dans htmlcov/index.html après avoir lancé :
pytest --cov=app --cov-report=html
Notes
- Les tests utilisent des mocks pour éviter les appels réseau réels
- Les fichiers temporaires sont nettoyés automatiquement après chaque test
- La base de données de favoris utilise des fichiers temporaires
- Les tests asynchrones utilisent
pytest-asyncio