Metadata-Version: 2.4
Name: Mopidy-Songhive
Version: 0.1.2
Summary: Mopidy extension for playing music from Songhive
Author: Mopidy-Songhive contributors
License: Apache License, Version 2.0
Project-URL: Source, https://github.com/mopidy-songhive/mopidy-songhive
Keywords: mopidy,songhive,music
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Sound/Audio :: Players
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: setuptools
Requires-Dist: Mopidy>=4.0
Requires-Dist: Pykka>=1.1
Requires-Dist: requests>=2.20
Dynamic: license-file

# Mopidy-Songhive

[Mopidy](https://mopidy.com) extension for playing music from a
[Songhive](https://git.fabiomanganiello.com/songhive) instance.

## Features

- Browse libraries, playlists, artists, albums, genres and tags
- Favorite tracks exposed as a browsable folder
- Full text search across tracks, albums and artists (plus cached
  federated objects)
- Playlist editing: create, delete, rename, add/remove/reorder tracks
- Streams through Songhive's `/api/v1/stream/{track_id}` endpoint,
  including optional server-side transcoding
- Federated content: remote objects resolve and play through the
  instance's remote lookup
- Direct URL lookup — paste any Songhive or federated URL prefixed with
  `songhive:` (e.g. `songhive:https://music.example.com/tracks/abc123`)
- Track metadata is fetched once per session and cached; resolving many
  tracks at once (queueing an album or playlist) uses concurrent
  requests

## Requirements

- Mopidy >= 4.0
- Python >= 3.9

## Installation

Install by running:

```sh
pip install mopidy-songhive
```

Or install the development version:

```sh
pip install -e .
```

## Configuration

Add the extension to your `mopidy.conf`:

```ini
[songhive]
enabled = true
hostname = https://music.example.com
api_token = <your api token>
```

`api_token` is optional: without it the extension runs anonymously and
only sees public content; playlists and favorites become read-only.
Create a token on the Songhive web interface under *Settings → API
tokens*. Tokens are sent as `Authorization: Bearer` headers and, for
audio streaming, injected into GStreamer's HTTP source — they are only
ever sent to the configured `hostname`.

Additional options:

```ini
# Comma-separated allowlist of library names to show (default: all)
libraries = Music, Audiobooks

# Format for displaying album names (default: {title})
album_format = {title} ({release_year})

# Optional server-side transcoding for streams
transcode_format = opus     # mp3|ogg|flac|aac|opus
transcode_bitrate = 128     # kbps
```

## URI scheme

`songhive:track:123`, `songhive:album:123`, `songhive:artist:123`,
`songhive:playlist:123`, `songhive:library:123`,
`songhive:genre:rock`, `songhive:tag:favorites`,
`songhive:remote:<object_id>` for federated content, and
`songhive:<http(s) url>` for direct URL lookups.
