Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smartplaylist: add --uri-template option
Beets web API already allows remote players to access audio files but it doesn't provide a way to expose the playlists defined using the smartplaylist plugin. Now the smartplaylist plugin provides an option to generate ID-based item URIs/URLs instead of paths. Once playlists are generated this way, they can be served using a regular HTTP server such as nginx. To support integrations with more APIs than just the beets web API (e.g. AURA API), the new option has been defined as a template with an `$id` placeholder (assuming each integration requires a different path schema but they all rely on using the beets item `id` as identifier/path segment). Example linking to beets web API: `beet splupdate --uri-template 'http://beets:8337/item/$id/file'` (While it was already possible to generate playlists with URLs previously using the `prefix` option, it did not allow to generate ID-based URLs pointing to the beets web API but required to expose the audio files using a web server directly and refer to them using their file system path.) Relates to beetbox#5037
- Loading branch information