beets/docs
Max Goltzsche 58e5b02929
smartplaylist: add --uri-format 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 provide sufficient flexibility for various ways of integrating beets remotely (e.g. beets API, beets API with context path, AURA API, mopidy resource URI, etc), the new option has been defined as a template with an `$id` placeholder (assuming each remote integration requires a different path schema but they all rely on using the beets item `id` as identifier/path segment).

To prevent local path-related plugin configuration from leaking into a HTTP URL-based playlist generation (invoked with CLI option in addition to the local playlists generated into another directory), setting the new option makes the plugin ignore the other path-related options `prefix`, `relative_to`, `forward_slash` and `urlencode`.

Usage examples:
* `beet splupdate --uri-format 'http://beets:8337/item/$id/file'` (for beets web API)
* `beet splupdate --uri-format 'http://beets:8337/aura/tracks/$id/audio'` (for AURA API)

(While it was already possible to generate playlists containing HTTP 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 #5037
2023-12-16 05:37:27 +01:00
..
_static Transparent background logo for docs 2023-10-29 10:30:33 +01:00
dev Document Album.items() / LibModel.items() conflict 2022-07-12 11:21:52 +01:00
guides Fix all occurences of Discourse to GH-Discussions 2023-10-23 09:51:52 +02:00
plugins smartplaylist: add --uri-format option 2023-12-16 05:37:27 +01:00
reference expose incremental_skip_later as cli option 2023-12-05 01:03:22 +01:00
changelog.rst smartplaylist: add --uri-format option 2023-12-16 05:37:27 +01:00
code_of_conduct.rst Integrate code of conduct 2023-10-27 21:55:13 +10:00
conf.py Transparent background logo for docs 2023-10-29 10:30:33 +01:00
contributing.rst add CONTRIBUTING.rst to the docs 2020-07-20 19:56:05 -07:00
faq.rst Fix all occurences of Discourse to GH-Discussions 2023-10-23 09:51:52 +02:00
index.rst Integrate code of conduct 2023-10-27 21:55:13 +10:00
Makefile Add new livereload server for docs 2016-01-25 13:19:26 -08:00
modd.conf Switch to modd for live docs build 2017-12-21 11:39:08 -05:00
team.rst Fix typo and add another member to the page 2023-10-03 12:03:06 +02:00