diff --git a/README.md b/README.md index 9e5d2a5..25be12f 100644 --- a/README.md +++ b/README.md @@ -2,111 +2,118 @@ [![Quality Gate Status](https://sonarqube.huitsinnevada.fi/api/project_badges/measure?project=Tunetti&metric=alert_status&token=sqb_a08ffa8615e77ac20c6f7e0aa58a93e643a85666)](https://sonarqube.huitsinnevada.fi/dashboard?id=Tunetti) -A desktop YouTube Music player built with Python and Qt6. Search, play, and manage your music library โ€” all from a native GUI, no browser needed. +A desktop YouTube Music player โ€” search, play, and manage your music without opening a browser. ๐Ÿ–ฅ๏ธ -> **Disclaimer:** This project is approximately 99% AI-generated code. +

+ Tunetti screenshot +

+ +> ### ๐Ÿค– A note about this project +> +> This project is **approximately 99% AI-generated code**. It was created by prompting large language models โ€” not by hand. The code works, but it may not follow every best practice you'd expect from hand-written software. Contributions, bug reports, and suggestions are very welcome! ๐Ÿ™ --- -## Features +## โœจ What can it do? -- **YouTube Music search & playback** โ€“ Search songs, albums, and artists directly from the app. -- **Rich Qt6 GUI** โ€“ Sleek, dark-themed interface with custom widgets (glassmorphism cards, animated nav buttons, smooth sidebar). -- **Discord Rich Presence** โ€“ Shows what you're listening to on your Discord profile. -- **Play history & statistics** โ€“ Every play is logged. View your most-played tracks, play counts by day, and listening trends. -- **Favourites** โ€“ Mark songs as favourites and quickly access them. -- **Audio visualizer** โ€“ Real-time FFT-based spectrum analyser that reacts to the current playback. -- **Playback controls** โ€“ Play, pause, skip, seek, volume, mute, loop, and queue management. -- **Configurable** โ€“ Settings stored in `~/.config/tunetti/config.json` (XDG-compliant). Volume, Discord RPC toggle, visualizer toggle, and more. -- **Lightweight** โ€“ Downloads audio on-the-fly via yt-dlp; no permanent music library to store. +- **๐ŸŽถ YouTube Music search & playback** โ€” Find songs, albums, and artists right from the app. +- **๐ŸŽง Play music in the background** โ€” Keep listening while you work. +- **๐ŸŽจ Good-looking interface** โ€” Dark theme with a modern, clean design. +- **๐ŸŽค Discord Rich Presence** โ€” Show your friends what you're listening to. +- **๐Ÿ“Š Play history & stats** โ€” See your most-played tracks, listening trends, and daily counts. +- **โญ Favourites** โ€” Save songs you love and find them again instantly. +- **๐Ÿ“ˆ Audio visualizer** โ€” A colorful spectrum display that moves with the music. +- **โฏ๏ธ Full playback controls** โ€” Play, pause, skip, seek, volume, loop, shuffle, and queue. +- **โš™๏ธ Configurable** โ€” Toggle Discord RPC, visualizer, and more in settings. +- **๐Ÿ’พ Lightweight** โ€” Streams audio on demand; no big music library to store. --- -## Requirements +## ๐Ÿ“‹ What you'll need -- **Python 3.10+** -- A **PulseAudio** or **PipeWire** audio system (Linux) -- **FFmpeg** installed and available in `PATH` +- **Python 3.10 or newer** +- **Linux** with **PulseAudio** or **PipeWire** for sound +- **FFmpeg** installed and on your `PATH` -## Installation +## ๐Ÿš€ Getting started ```bash -# Clone the repository -git clone https://github.com/your-org/tunetti.git -cd tunetti +# Download the code +git clone https://git.huitsinnevada.fi/NikkeDoy/Tunetti.git +cd Tunetti -# Create and activate a virtual environment +# Set up a virtual environment python -m venv .venv source .venv/bin/activate -# Install dependencies +# Install everything pip install -r requirements.txt ``` -> **Note:** `PySide6` provides the Qt6 bindings. On some distributions you may need to install system packages like `libegl1` or `libxkbcommon0` as well. +> โš ๏ธ You might also need system packages like `libegl1` or `libxkbcommon0` โ€” your package manager will tell you what's missing. -## Usage +### โ–ถ๏ธ Running Tunetti ```bash # Normal mode python main.py -# Verbose/debug mode (shows yt-dlp and Qt FFmpeg internals) +# Debug mode (see what's happening under the hood) TUNETTI_VERBOSE=1 python main.py ``` -On first launch, Tunetti creates `~/.config/tunetti/` and populates it with default settings. +On first launch, Tunetti creates `~/.config/tunetti/` and sets everything up for you. -### Environment Variables +### ๐Ÿ”ง Environment variables -| Variable | Description | +| Variable | What it does | |---|---| -| `TUNETTI_VERBOSE` | Set to `1`, `true`, or `yes` to enable debug logging. | +| `TUNETTI_VERBOSE` | Set to `1`, `true`, or `yes` to see detailed debug logs. | --- -## Project Structure +## ๐Ÿ“ How the code is organized ``` Tunetti/ -โ”œโ”€โ”€ main.py # Entry point & logging setup -โ”œโ”€โ”€ gui.py # All UI components (window, search, playback bar, visualizer, stats, settings) -โ”œโ”€โ”€ player.py # Audio playback, download workers, queue management -โ”œโ”€โ”€ config.py # XDG-compliant configuration loader & migrator -โ”œโ”€โ”€ music_db.py # SQLite database layer (history, favourites, stats) -โ”œโ”€โ”€ discord_rpc.py # Discord Rich Presence integration via pypresence -โ”œโ”€โ”€ requirements.txt # Python dependencies -โ”œโ”€โ”€ sonar-project.properties # SonarQube analysis config +โ”œโ”€โ”€ main.py # App start & logging +โ”œโ”€โ”€ gui.py # All the visual stuff (window, search bar, visualizer, stats, settings) +โ”œโ”€โ”€ player.py # Audio playback, downloads, queue +โ”œโ”€โ”€ config.py # Settings loader +โ”œโ”€โ”€ music_db.py # History, favourites, stats database +โ”œโ”€โ”€ discord_rpc.py # Discord integration +โ”œโ”€โ”€ requirements.txt # List of Python packages needed +โ”œโ”€โ”€ sonar-project.properties โ””โ”€โ”€ .gitea/ โ””โ”€โ”€ workflows/ - โ””โ”€โ”€ sonar.yaml # Gitea Actions CI pipeline + โ””โ”€โ”€ sonar.yaml # Automated code checks ``` -## Configuration +## โš™๏ธ Settings -Settings are persisted in `~/.config/tunetti/config.json` and include: +Tunetti stores its settings in `~/.config/tunetti/config.json`. Here's what you can change: -| Key | Default | Description | +| Setting | Default | What it does | |---|---|---| | `volume` | `50` | Playback volume (0โ€“100) | -| `max_history` | `5000` | Maximum history entries | -| `discord_rpc_enabled` | `true` | Enable Discord Rich Presence | -| `visualizer_enabled` | `true` | Enable the audio spectrum visualizer | -| `db_path` | `~/.config/tunetti/music_history.db` | SQLite database location | +| `max_history` | `5000` | Max number of plays to remember | +| `discord_rpc_enabled` | `true` | Show what you're listening to on Discord | +| `visualizer_enabled` | `true` | Show the audio spectrum visualizer | +| `db_path` | `~/.config/tunetti/music_history.db` | Where the database is stored | -## Dependencies +## ๐Ÿ“ฆ What's under the hood -| Package | Purpose | +| Package | What it's used for | |---|---| -| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | YouTube audio download & search | -| [ytmusicapi](https://github.com/sigma67/ytmusicapi) | YouTube Music search API | -| [PySide6](https://pypi.org/project/PySide6/) | Qt6 GUI framework | +| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Downloads audio from YouTube | +| [ytmusicapi](https://github.com/sigma67/ytmusicapi) | Searches YouTube Music | +| [PySide6](https://pypi.org/project/PySide6/) | The graphical interface (Qt6) | | [pypresence](https://github.com/qwertyquerty/pypresence) | Discord Rich Presence | -## CI / Quality +## ๐Ÿงช Quality checks -The project uses SonarQube for static analysis, with a Gitea Actions workflow defined in `.gitea/workflows/sonar.yaml`. +Code quality is analyzed automatically by SonarQube whenever changes are pushed. -## License +## ๐Ÿ“„ License See [LICENSE](./LICENSE). diff --git a/docs/screenshots/screenshot-1.avif b/docs/screenshots/screenshot-1.avif new file mode 100644 index 0000000..83616c1 Binary files /dev/null and b/docs/screenshots/screenshot-1.avif differ