- Provide detailed system requirements and software dependencies - Describe multiple build options including uv, pip/venv, and Poetry - Include steps for development setup, database initialization, and production build - Document UI integration options: standalone web UI, Angular UI extension, and simple dashboard - Add Docker build instructions for development, production, and multi-stage builds - Provide troubleshooting tips for build and runtime issues - Offer advanced build options such as custom database backend, Redis caching, HTTPS, and load balancing - Add a build checklist and next step recommendations for users docs(getting-started): add complete getting started guide for playlist monitor - Summarize implemented backend features and note missing UI - Present quick start paths: API-only, simple UI, and full React app - Detail API usage with examples and testing instructions - Explain Docker deployment instructions - List UI implementation priorities and recommended next steps - Supply common setup issues and resolution tips - Provide community and debugging resources - Define success metrics and final usage recommendations docs(quick-start): add quick start guide for rapid setup of playlist monitor - Outline prerequisites including Python and MeTube requirements - Provide recommended Docker usage instructions - Detail manual installation steps and command examples - Explain how to access API documentation and MeTube service - Include example commands to add and monitor playlists via API - Offer troubleshooting advice for service startup, connectivity, and database issues - Present common operational commands for playlist |
||
|---|---|---|
| .. | ||
| app | ||
| data | ||
| logs | ||
| playlist_monitor.egg-info | ||
| tests | ||
| .env.example | ||
| BUILD_GUIDE.md | ||
| Dockerfile | ||
| GETTING_STARTED.md | ||
| IMPLEMENTATION_STATUS.md | ||
| QUICK_START_GUIDE.md | ||
| README.md | ||
| TESTING_GUIDE.md | ||
| UI_INTEGRATION.md | ||
| pyproject.toml | ||
| uv.lock | ||
README.md
Playlist Monitor Service
An automated playlist monitoring service for MeTube that tracks YouTube playlists, detects new videos, and automatically downloads them using MeTube as the download engine.
Features
- Playlist Monitoring: Automatically monitor YouTube playlists for new videos
- Smart Download Management: Track download status and prevent re-downloads
- Start Point Control: Set starting points to skip older videos
- File Movement Tracking: Handle files moved by users without re-downloading
- Periodic Checking: Configurable check intervals for each playlist
- MeTube Integration: Seamless integration with MeTube via REST API and WebSocket
- Real-time Updates: WebSocket events for download progress and completion
- Comprehensive API: RESTful API for managing playlists and videos
- Docker Support: Easy deployment with Docker Compose
Quick Start
Prerequisites
- Python 3.13+
- MeTube instance running (default: http://localhost:8081)
- SQLite or PostgreSQL database
Installation
-
Clone and setup:
cd playlist-monitor cp .env.example .env # Edit .env with your configuration -
Install dependencies (using uv recommended):
curl -LsSf https://astral.sh/uv/install.sh | sh uv sync -
Run the service:
uv run python -m app.main
Docker Deployment
docker build -t playlist-monitor .
docker run -d \
--name playlist-monitor \
-p 8082:8082 \
-e METUBE_URL=http://metube:8081 \
-v ./data:/app/data \
-v ./logs:/app/logs \
playlist-monitor
API Documentation
Once running, visit http://localhost:8082/docs for interactive API documentation.
Key Endpoints
POST /api/playlists- Add a new playlistGET /api/playlists- List all playlistsGET /api/playlists/{id}- Get playlist detailsPOST /api/playlists/{id}/check- Manually check playlist for new videosPOST /api/videos/{id}/download- Trigger download for a videoGET /api/status- Get system status
Configuration
See .env.example for all configuration options. Key settings:
METUBE_URL: URL of your MeTube instanceDATABASE_URL: Database connection stringDEFAULT_CHECK_INTERVAL: Default playlist check interval (minutes)MAX_CONCURRENT_DOWNLOADS: Maximum concurrent downloadsLOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR)
Architecture
The service consists of:
- FastAPI: Modern async web framework
- SQLAlchemy: Database ORM with SQLite/PostgreSQL support
- APScheduler: Periodic task scheduling
- yt-dlp: YouTube playlist and video information extraction
- MeTube Client: HTTP/WebSocket client for MeTube integration
Development
Project Structure
playlist-monitor/
├── app/
│ ├── api/ # API endpoints
│ ├── core/ # Core functionality (config, database, scheduler)
│ ├── models/ # Database models
│ ├── services/ # Business logic services
│ └── main.py # FastAPI application
├── data/ # Database files
├── logs/ # Log files
└── tests/ # Test files
Running Tests
uv run pytest
Code Quality
uv run black app/
uv run isort app/
uv run mypy app/
License
MIT License - see LICENSE file for details.