Refine project and GUI plans

This commit is contained in:
2026-03-20 19:25:01 +02:00
parent 2e1ebe1eea
commit b6afbb33c1
2 changed files with 45 additions and 39 deletions
+18 -7
View File
@@ -1,13 +1,24 @@
### Python-first
### Python-first Desktop Architecture
- Primary GUI framework: `PySide6` (Qt for Python) — native desktop look, cross-platform on Windows and Linux, mature widget set, good documentation. - **Primary GUI framework**: `PySide6` (Qt for Python).
- Desktop architecture: keep the core downloader logic as a Python package and expose a local HTTP/WebSocket API (e.g., `FastAPI`) that the GUI talks to. The GUI stays a thin client that issues commands and receives status updates. - **Communication Layer**: A local `FastAPI` backend to separate core logic from the UI.
- **IPC Mechanism**: The GUI spawns the FastAPI server on a random high port (binding to `127.0.0.1` ONLY) and communicates via REST/WebSockets.
### Why this approach ### Core Features to Implement
- Stay in Python end-to-end for now, minimizing new languages or runtimes. 1. **Dashboard Overview**: List all tracked playlists, their status (Last Sync), and total size.
- A local API boundary lets you reuse the same backend for a future Web frontend (React/Next.js or plain SPA) and for Android (native or Flutter shell that talks to the API or a hosted API). 2. **Interactive Configuration**: Wizard-style setup for new playlists (URL detection, folder picker).
- `PySide6` provides a polished native desktop UX and easier packaging for Windows/Linux compared with Python mobile toolkits. 3. **Queue Manager**: Visual progress bars for active downloads, showing speed, ETA, and current video title.
4. **Log Viewer**: Real-time streaming of yt-dlp logs for troubleshooting.
5. **Settings Panel**: Global settings for binary paths (ffmpeg, aria2c), max parallel jobs, and Docker detection toggle.
### Phase 1 Roadmap: "The Bridge"
- [ ] **Refactor `src/manager.py`**: Convert CLI-first execution to async-compatible methods for FastAPI consumption.
- [ ] **FastAPI Integration**: Create endpoints for `/playlists`, `/status`, and `/download/start`.
- [ ] **PySide6 Skeleton**: Basic window with `QWebEngine` (if hybrid) or native `QWidget` dashboard.
- [ ] **Packaging**: `pyinstaller` configuration to bundle both backend and frontend into a single `.exe`.
### Packaging & Distribution (brief) ### Packaging & Distribution (brief)
+27 -32
View File
@@ -3,8 +3,8 @@
## Subject Area ## Subject Area
- Tool for downloading and synchronizing YouTube playlists. - Tool for downloading and synchronizing YouTube playlists.
- Focuses on reliable batch downloading, format selection (audio and/or video), configurable quality and keeping local copies synced with playlist changes. - Focuses on batch downloading, format selection (audio and/or video), configurable quality and keeping local copies synced with playlist changes.
- Targets power users and archivists who need large-scale, repeatable playlist archiving and ongoing synchronization, with GUI interfaces. - Targets power users and archivists who need large-scale, repeatable playlist archiving and ongoing synchronization, with GUI interface.
## Problem ## Problem
@@ -18,38 +18,33 @@ Individuals who need to download a large number of videos or audio files from a
## Functionality Definition ## Functionality Definition
- Can download: - Multi-format Download:
- Video only - Video only (mp4)
- Audio only - Audio only (mp3)
- Both video and audio - Both video and audio (mp3 & mp4)
- Can update the playlist (download only newly added videos) - Smart Synchronization:
- Can delete videos that are no longer in the playlist - Archive tracking (prevents re-downloading existing media)
- Has configuration for: - Playlist Pruning (automatically deletes local files no longer in the YouTube playlist)
- Quality - Sequential Renumbering (keeps local files sorted by playlist position)
- Download type (audio, video) - Advanced Configuration:
- Save directory - Per-playlist settings (Quality, paths, archive file)
- Use of aria2c - Global performance options (Parallel downloads, aria2c threading)
- aria2-related settings - Path management for yt-dlp, ffmpeg, and aria2c (Docker-aware)
- GUI settings - GUI Integration:
- Real-time status updates via backend API
- Visual configuration editor
- Modern, responsive Qt-based interface
## GUI ## Platforms
- Has buttons for all features - Desktop: Windows (Primary), Linux
- Allows adjusting all settings from the GUI - Docker
- Modern Design - Possible Future: Web App, Android App (via shared FastAPI backend)
## Platform ## Architecture & Languages
- Desktop application - Core Engine: Python (yt-dlp wrapper)
- Optional: - Backend API: FastAPI (Local localhost-only boundary)
- Web App - Desktop Frontend: PySide6 (Qt for Python)
- Android App - Distribution: PyInstaller / Briefcase (Windows .exe, Linux AppImage)
## Languages
- Backend
- Python
- Frontend
- qt ?
- Tkinter?