feat: Complete watchlist & auto-download system with UI
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>
This commit is contained in:
+12
-10
@@ -9,16 +9,18 @@
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
|
||||
<!-- JavaScript -->
|
||||
<script src="/static/js/auth.js?v=1.9" defer></script>
|
||||
<script src="/static/js/api.js?v=1.9" defer></script>
|
||||
<script src="/static/js/utils.js?v=1.9" defer></script>
|
||||
<script src="/static/js/downloads.js?v=1.9" defer></script>
|
||||
<script src="/static/js/anime.js?v=1.9" defer></script>
|
||||
<script src="/static/js/anime-details.js?v=1.9" defer></script>
|
||||
<script src="/static/js/series-search.js?v=1.9" defer></script>
|
||||
<script src="/static/js/recommendations.js?v=1.9" defer></script>
|
||||
<script src="/static/js/tabs.js?v=1.9" defer></script>
|
||||
<script src="/static/js/main.js?v=1.9" defer></script>
|
||||
<script src="/static/js/auth.js?v=1.10" defer></script>
|
||||
<script src="/static/js/api.js?v=1.11" defer></script>
|
||||
<script src="/static/js/utils.js?v=1.11" defer></script>
|
||||
<script src="/static/js/downloads.js?v=1.11" defer></script>
|
||||
<script src="/static/js/anime.js?v=1.11" defer></script>
|
||||
<script src="/static/js/anime-details.js?v=1.11" defer></script>
|
||||
<script src="/static/js/series-search.js?v=1.11" defer></script>
|
||||
<script src="/static/js/recommendations.js?v=1.11" defer></script>
|
||||
<script src="/static/js/tabs.js?v=1.11" defer></script>
|
||||
<script src="/static/js/watchlist.js?v=1.11" defer></script>
|
||||
<script src="/static/js/watchlist-ui.js?v=1.11" defer></script>
|
||||
<script src="/static/js/main.js?v=1.11" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
||||
@@ -232,6 +232,7 @@
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="/static/js/api.js"></script>
|
||||
<script src="/static/js/utils.js"></script>
|
||||
<script src="/static/js/watchlist.js"></script>
|
||||
<script src="/static/js/watchlist-ui.js"></script>
|
||||
<script src="/static/js/auth.js"></script>
|
||||
@@ -251,12 +252,33 @@
|
||||
* Check authentication
|
||||
*/
|
||||
async function checkAuth() {
|
||||
const token = localStorage.getItem('token');
|
||||
const token = localStorage.getItem('auth_token');
|
||||
if (!token) {
|
||||
window.location.href = '/login';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
// Verify token with server
|
||||
try {
|
||||
const response = await fetch('/api/auth/me', {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${token}`
|
||||
}
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
// Token invalid, remove it and redirect
|
||||
localStorage.removeItem('auth_token');
|
||||
localStorage.removeItem('user');
|
||||
window.location.href = '/login';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error('Auth check error:', error);
|
||||
window.location.href = '/login';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user