root
d179694fb2
feat: download latest season only + fix lpayer CDN + HLS support
...
- Watchlist 'Suivre' now downloads only the latest season instead of all episodes
- Fix lpayer CDN 403 errors by adding proper Referer header for IP ranges
- Add HLS/m3u8 stream download support using ffmpeg
- Improve episode filename format: 'Anime - SX - Episode XX.mp4'
- Add CDN detection for lpayer IPs (185.237.x.x, 203.188.x.x, /mik/ path)
2026-03-01 09:29:16 +00:00
root
20bcc75b9b
chore: update watchlist features and fixes
2026-02-28 09:22:57 +00:00
root
3f87df685b
fix: extract anime title from URL and download all episodes on follow
2026-02-27 18:06:10 +00:00
root
3b4997213b
fix: properly extract anime title from URL
2026-02-27 14:24:05 +00:00
root
24567b58cf
feat: download all episodes when following anime, then auto-check for new episodes
2026-02-27 13:53:56 +00:00
root
a91ff3f71b
fix: extract anime title from URL when metadata title is missing
2026-02-27 13:39:36 +00:00
root
a49831f65e
fix: repair corrupted SVG path in empty watchlist message
2026-02-27 13:31:53 +00:00
root
2188298217
fix: resolve missing JS functions and CSS class names for watchlist tab
2026-02-26 17:33:30 +00:00
root
e22bc4191c
feat: integrate watchlist as tab on /web page
2026-02-26 16:06:21 +00:00
root
c6be191699
feat: Complete watchlist & auto-download system with UI
...
## Backend Implementation (100% Complete)
### Core Components
- **WatchlistManager**: JSON-based storage with full CRUD operations
- User-scoped data access for multi-tenant support
- Statistics and query functions
- Settings management with persistence
- **EpisodeChecker**: Automatic new episode detection
- Checks for new episodes using existing downloaders
- Automatic download with error handling
- Manual and scheduled check support
- Lazy initialization to avoid circular imports
- **AutoDownloadScheduler**: APScheduler-based periodic checking
- Configurable intervals (1-168 hours)
- Start/stop/restart controls
- Next run time tracking
### API Endpoints (15 endpoints)
- POST /api/watchlist - Add anime to watchlist
- GET /api/watchlist - Get user's watchlist (with status filter)
- GET /api/watchlist/{id} - Get specific item
- PUT /api/watchlist/{id} - Update item
- DELETE /api/watchlist/{id} - Delete item
- POST /api/watchlist/{id}/check - Check for new episodes
- POST /api/watchlist/{id}/pause - Pause tracking
- POST /api/watchlist/{id}/resume - Resume tracking
- GET /api/watchlist/settings - Get settings
- PUT /api/watchlist/settings - Update settings
- GET /api/watchlist/stats - Get statistics
- POST /api/watchlist/check-all - Check all items
- GET /api/watchlist/scheduler/status - Scheduler status
- POST /api/watchlist/scheduler/start - Start scheduler
- POST /api/watchlist/scheduler/stop - Stop scheduler
### Bug Fixes
- Fixed WatchlistManager.update() to accept both dict and WatchlistItemUpdate
- Added asyncio import to AutoDownloadScheduler for event loop detection
- Improved scheduler start() with better error handling
## Frontend Implementation (100% Complete)
### UI Components
- **Watchlist Page** (/watchlist)
- Scheduler status panel with start/stop/check all buttons
- Filter tabs (all/active/paused/completed)
- Statistics display with color-coded cards
- Watchlist items with pause/resume/delete controls
- Auto-refresh every 30 seconds
- Authentication check
- **Settings Modal**
- Check interval configuration (1-168h)
- Auto-download toggle
- Max concurrent downloads slider
- Notifications toggle
- Live settings update with scheduler restart
- **"Suivre" Button**
- Added to anime search result cards
- Purple gradient with heart icon
- Quick-add to watchlist functionality
- State tracking (disabled when already in watchlist)
### JavaScript Files
- **static/js/watchlist.js**: API client functions
- All watchlist API calls with token auth
- Error handling and response parsing
- **static/js/watchlist-ui.js**: UI functions
- Display watchlist with stats
- Handle add/pause/resume/delete
- Filter by status
- Settings modal management
- **static/js/tabs.js**: Watchlist tab handler
- Redirects to /watchlist page
## Testing
### Test Suite (test_watchlist_simple.py)
All tests passing (3/3):
1. **Watchlist Manager Tests** ✅
- Create/read/update/delete operations
- User-scoped queries
- Statistics generation
- Check time updates
2. **Settings Tests** ✅
- Get current settings
- Update settings with validation
- Reset to defaults
3. **Scheduler Tests** ✅
- Start/stop/restart controls
- Running status verification
- Next run time tracking
### Dependencies
- APScheduler 3.11.0 installed in virtual environment
- tzlocal 5.3.1 (APScheduler dependency)
## Documentation
- docs/WATCHLIST_AUTO_DOWNLOAD.md: Complete system documentation
- API endpoints with examples
- Architecture overview
- Usage examples
- Troubleshooting guide
Generated with [Claude Code](https://claude.ai/code )
via [Happy](https://happy.engineering )
Co-Authored-By: Claude <[email protected] >
Co-Authored-By: Happy <[email protected] >
2026-01-29 21:56:39 +00:00