Metadata-Version: 2.4
Name: platypus-music
Version: 0.2.0.post0
Summary: A lightweight, local music player for the terminal.
Author-email: Dev-ev-v <guilhermepapuf.dev@proton.me>
License-Expression: Apache-2.0
Keywords: music,music-player,audio-player,terminal,cli,offline,local,privacy,mpv
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Multimedia :: Sound/Audio :: Players
Requires-Python: <4,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer<1.0,>=0.12.3
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: mutagen
Dynamic: license-file

# PMP

## A lightweight, local music player for the terminal.

PMP is an open-source command-line music player built for people who want to listen to their own music without relying on streaming platforms, online accounts, or cloud-based music libraries.

It focuses on local playback, a simple terminal workflow, and keeping your music library under your control.

PMP is currently in alpha. It is usable, actively developed, and not yet tested across every intended platform.

## Features

- Local music library: Scan and organize music stored on your device.
- Playlist organization: Organize music through local directories.
- Search: Find songs and playlists in your library.
- Playback queue: Manage the songs waiting to be played.
- Playback controls: Navigate between tracks, seek within songs, and control playback volume.
- Loop: Listen to a song in loop mode.
- Session recovery: Resume a saved playback session.
- Listening statistics: Track playback activity and listening habits.
- Terminal miniplayer: Monitor the current track and playback progress.

PMP is designed for music you already have locally. It does not provide a streaming catalog, host music files, or replace music distribution services.

## Playback modes

PMP separates music source selection from track ordering, allowing different playback behaviors to be combined.

### Source selection

- Playlist: Select tracks from the current collection.
- Universal: Rotate between available playlists and songs stored in the root music directory.
- Smart: Prioritize tracks with fewer plays and fewer previous selections, using listening statistics.

### Track ordering

- Sequential: Select tracks in sequence.
- Random: Select tracks randomly.

These options can be combined independently to customize playback behavior.

## Requirements

- Python 3.10 or newer.
- `mpv`, installed separately and available to PMP.
- A local collection of supported audio files.

PMP uses mpv as its playback engine. Installing the Python package alone does not install the external player.

Daemon management currently relies on Linux `/proc` process metadata. Windows and macOS support has not yet been implemented or verified.

## Installation

### From PyPI

Install PMP using pip:

```bash
python -m pip install platypus-music
```

The PyPI package is named `platypus-music`, but the command and Python module are `pmp`.

Make sure mpv is installed separately before attempting playback.

Verify the installation:

```bash
pmp --help
```

### From GitHub

To install a development version, clone the PMP repository and install the local project:

```bash
git clone https://github.com/Dev-ev-v/pmp.git
cd pmp
python -m pip install .
```

Development versions may contain unfinished features or bugs. Use them accordingly.

## Getting started

After installing PMP and mpv, run:

```bash
pmp --help
```

This displays the commands and options available in your installed version.

### Play music

```bash
pmp play
```

If no music directory is configured, PMP displays the path to its configuration file. Set `music_dir` there to the directory containing your music before starting playback.

If a music directory is already configured, PMP plays a song from your library according to your configuration.

To play a specific song or playlist:

```bash
pmp play "My song"
```

### Stop playback

```bash
pmp stop
```

Stops playback and ends the current session.

### Open the miniplayer

```bash
pmp watch
```

Opens a miniplayer for easier playback and queue control.

### View listening statistics

```bash
pmp stats
```

Displays listening time, play counts, song selections, and play equivalents.

Use `--title` to sort the statistics alphabetically by song title, or `--short` to limit each section to its first ten entries:

```bash
pmp stats --title
pmp stats --short
```

### Reset the session

```bash
pmp reset
```

Use this command to reset the current session if playback gets stuck or behaves unexpectedly. It preserves the user's configuration and statistics.

## Supported audio

PMP is intended for local audio playback. The current implementation recognizes these file extensions:

- MP3 (`.mp3`)
- M4A (`.m4a`)
- FLAC (`.flac`)
- Ogg (`.ogg`)
- WAV (`.wav`)

Actual playback compatibility also depends on the codecs and formats supported by the installed mpv build.

Video playback is not currently part of PMP's scope.

## Privacy and philosophy

PMP is built around a simple idea: your local music library should remain yours.

The project aims to provide a lightweight way to play music without requiring a streaming account or depending on a centralized music catalog.

PMP is intended for local playback, not music hosting or distribution. Users are responsible for ensuring that their use of audio files complies with applicable laws and licenses.

## Roadmap

- Replace file paths with stable song identifiers, such as unique IDs.
- Implement and verify support for Windows and macOS.
- Add support for video files.
- Add support for basic audio effects.
- Improve error handling when MPV is missing or fails to start.

## Contributing

Contributions, bug reports, and suggestions are welcome.
