📝 | Update README.md
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 27s

This commit is contained in:
2026-05-31 23:38:45 +03:00
parent 079afdf124
commit 5f417396ff
2 changed files with 61 additions and 54 deletions

115
README.md
View File

@@ -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) [![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. <p align="center">
<img src="docs/screenshots/screenshot-1.avif" alt="Tunetti screenshot" width="800">
</p>
> ### 🤖 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. - **🎶 YouTube Music search & playback** — Find songs, albums, and artists right from the app.
- **Rich Qt6 GUI** Sleek, dark-themed interface with custom widgets (glassmorphism cards, animated nav buttons, smooth sidebar). - **🎧 Play music in the background** — Keep listening while you work.
- **Discord Rich Presence** Shows what you're listening to on your Discord profile. - **🎨 Good-looking interface** — Dark theme with a modern, clean design.
- **Play history & statistics** Every play is logged. View your most-played tracks, play counts by day, and listening trends. - **🎤 Discord Rich Presence** — Show your friends what you're listening to.
- **Favourites** Mark songs as favourites and quickly access them. - **📊 Play history & stats** — See your most-played tracks, listening trends, and daily counts.
- **Audio visualizer** Real-time FFT-based spectrum analyser that reacts to the current playback. - **⭐ Favourites** — Save songs you love and find them again instantly.
- **Playback controls** Play, pause, skip, seek, volume, mute, loop, and queue management. - **📈 Audio visualizer** — A colorful spectrum display that moves with the music.
- **Configurable** Settings stored in `~/.config/tunetti/config.json` (XDG-compliant). Volume, Discord RPC toggle, visualizer toggle, and more. - **⏯️ Full playback controls** — Play, pause, skip, seek, volume, loop, shuffle, and queue.
- **Lightweight** Downloads audio on-the-fly via yt-dlp; no permanent music library to store. - **⚙️ 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+** - **Python 3.10 or newer**
- A **PulseAudio** or **PipeWire** audio system (Linux) - **Linux** with **PulseAudio** or **PipeWire** for sound
- **FFmpeg** installed and available in `PATH` - **FFmpeg** installed and on your `PATH`
## Installation ## 🚀 Getting started
```bash ```bash
# Clone the repository # Download the code
git clone https://github.com/your-org/tunetti.git git clone https://git.huitsinnevada.fi/NikkeDoy/Tunetti.git
cd tunetti cd Tunetti
# Create and activate a virtual environment # Set up a virtual environment
python -m venv .venv python -m venv .venv
source .venv/bin/activate source .venv/bin/activate
# Install dependencies # Install everything
pip install -r requirements.txt 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 ```bash
# Normal mode # Normal mode
python main.py 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 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/ Tunetti/
├── main.py # Entry point & logging setup ├── main.py # App start & logging
├── gui.py # All UI components (window, search, playback bar, visualizer, stats, settings) ├── gui.py # All the visual stuff (window, search bar, visualizer, stats, settings)
├── player.py # Audio playback, download workers, queue management ├── player.py # Audio playback, downloads, queue
├── config.py # XDG-compliant configuration loader & migrator ├── config.py # Settings loader
├── music_db.py # SQLite database layer (history, favourites, stats) ├── music_db.py # History, favourites, stats database
├── discord_rpc.py # Discord Rich Presence integration via pypresence ├── discord_rpc.py # Discord integration
├── requirements.txt # Python dependencies ├── requirements.txt # List of Python packages needed
├── sonar-project.properties # SonarQube analysis config ├── sonar-project.properties
└── .gitea/ └── .gitea/
└── workflows/ └── 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 (0100) | | `volume` | `50` | Playback volume (0100) |
| `max_history` | `5000` | Maximum history entries | | `max_history` | `5000` | Max number of plays to remember |
| `discord_rpc_enabled` | `true` | Enable Discord Rich Presence | | `discord_rpc_enabled` | `true` | Show what you're listening to on Discord |
| `visualizer_enabled` | `true` | Enable the audio spectrum visualizer | | `visualizer_enabled` | `true` | Show the audio spectrum visualizer |
| `db_path` | `~/.config/tunetti/music_history.db` | SQLite database location | | `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 | | [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Downloads audio from YouTube |
| [ytmusicapi](https://github.com/sigma67/ytmusicapi) | YouTube Music search API | | [ytmusicapi](https://github.com/sigma67/ytmusicapi) | Searches YouTube Music |
| [PySide6](https://pypi.org/project/PySide6/) | Qt6 GUI framework | | [PySide6](https://pypi.org/project/PySide6/) | The graphical interface (Qt6) |
| [pypresence](https://github.com/qwertyquerty/pypresence) | Discord Rich Presence | | [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). See [LICENSE](./LICENSE).

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB