tubewatch/playlist-monitor
tigeren b01ef238e2 docs(build): add comprehensive build guide for playlist monitor
- 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
2025-11-21 17:17:23 +00:00
..
app feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
data feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
logs feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
playlist_monitor.egg-info feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
tests feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
.env.example feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
BUILD_GUIDE.md docs(build): add comprehensive build guide for playlist monitor 2025-11-21 17:17:23 +00:00
Dockerfile feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
GETTING_STARTED.md docs(build): add comprehensive build guide for playlist monitor 2025-11-21 17:17:23 +00:00
IMPLEMENTATION_STATUS.md feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
QUICK_START_GUIDE.md docs(build): add comprehensive build guide for playlist monitor 2025-11-21 17:17:23 +00:00
README.md feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
TESTING_GUIDE.md docs(build): add comprehensive build guide for playlist monitor 2025-11-21 17:17:23 +00:00
UI_INTEGRATION.md docs(build): add comprehensive build guide for playlist monitor 2025-11-21 17:17:23 +00:00
pyproject.toml feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00
uv.lock feat(playlist-monitor): add automated playlist monitor microservice with full API and deployment 2025-11-21 17:16:58 +00:00

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

Installation

  1. Clone and setup:

    cd playlist-monitor
    cp .env.example .env
    # Edit .env with your configuration
    
  2. Install dependencies (using uv recommended):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    uv sync
    
  3. 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 playlist
  • GET /api/playlists - List all playlists
  • GET /api/playlists/{id} - Get playlist details
  • POST /api/playlists/{id}/check - Manually check playlist for new videos
  • POST /api/videos/{id}/download - Trigger download for a video
  • GET /api/status - Get system status

Configuration

See .env.example for all configuration options. Key settings:

  • METUBE_URL: URL of your MeTube instance
  • DATABASE_URL: Database connection string
  • DEFAULT_CHECK_INTERVAL: Default playlist check interval (minutes)
  • MAX_CONCURRENT_DOWNLOADS: Maximum concurrent downloads
  • LOG_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.