Metadata-Version: 2.4
Name: ytmusic-tuieee
Version: 0.1.1
Summary: A terminal YouTube music player
Author-email: Aditya <adityashri.shingare@gmail.com>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: yt-dlp
Requires-Dist: typer
Requires-Dist: rich
Requires-Dist: textual
Requires-Dist: python-mpv-jsonipc

# ytmusic-tuieee

A beautiful, lightweight, terminal-based YouTube music player. Provide a YouTube video or playlist URL, and stream the songs sequentially directly from your terminal!

It acts like a standalone music player without permanently downloading tracks to your disk. It delegates audio streaming and playback to `mpv` while resolving YouTube URLs using `yt-dlp`. The entire interface is built using `Textual` for a modern, responsive TUI (Terminal User Interface).

## Features
- **Full TUI:** Live playback progress, queue visualization, and status logs.
- **Background Audio:** Completely headless audio playback powered by MPV.
- **Smart Queueing:** Add entire playlists and they'll stream sequentially.
- **Cookies Support:** Easily pass browser cookies for YouTube Premium/Private playlists.
- **Auto-Installer:** Automatically detects and installs `mpv` on Windows if missing.

## Requirements

- Python 3.10+
- `mpv` (System media player)
  - **Windows:** The app will automatically prompt to install `mpv` via `winget` if it detects it is missing!
  - **macOS:** `brew install mpv`
  - **Linux:** `sudo apt install mpv`

## Installation

The recommended way to install `ytmusic-tuieee` globally is using `pipx`.

```bash
pipx install ytmusic-tuieee
```

*(If you don't have `pipx`, you can install it first with `pip install pipx`)*

## Usage

Once installed, simply run the `ytmusic` command followed by any YouTube URL:

```bash
ytmusic "https://www.youtube.com/playlist?list=YOUR_PLAYLIST_ID"
```

### Controls
Inside the TUI, you can type commands in the bottom input box to control playback:

- `play` / `p` - Start, resume, or toggle playback
- `pause` - Pause playback
- `stop` - Stop the current track
- `next` / `n` - Skip to the next track
- `previous` / `prev` / `b` - Go back to the previous track
- `seek <seconds>` - Seek forward or backward (e.g., `seek +30` or `seek -10`)
- `volume <0-100>` - Set the playback volume (e.g., `volume 80`)
- `quit` / `q` - Exit the player

## Configuration (Cookies & Settings)

If you need to access private playlists or YouTube Premium features, `ytmusic-tuieee` supports extracting cookies directly from your local browser.

Create a configuration file at `~/.ytmusic/config.toml` (e.g., `C:\Users\YourName\.ytmusic\config.toml` on Windows):

```toml
browser = "chrome"
volume = 80
autoplay = true
shuffle = false
```

Supported browsers for automatic cookie extraction: `chrome`, `firefox`, `edge`, `brave`, `opera`, `safari`.
