Skip to content

Commit

Permalink
docs: add smartplaylist example config and m3u
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoltzsche committed Apr 19, 2024
1 parent 3c6309f commit dc0022e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/plugins/smartplaylist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,35 @@ The ``pretend_paths`` configuration option sets whether the items should be
displayed as per the user's ``format_item`` setting or what the file
paths as they would be written to the m3u file look like.

In case you want to export additional fields from the beets database into the
generated playlists, you can do so by specifying them within the ``fields``
configuration option and setting the ``output`` option to ``extm3u``.
For instance the following configuration exports the ``id`` and ``genre``
fields:

smartplaylist:
playlist_dir: /data/playlists
relative_to: /data/playlists
output: extm3u
fields:
- id

Check failure on line 107 in docs/plugins/smartplaylist.rst

View workflow job for this annotation

GitHub Actions / test-docs

Unexpected indentation.
- genre
playlists:
- name: all.m3u
query: ''

A resulting ``all.m3u`` file could look as follows:

#EXTM3U
#EXTINF:805 id="1931" genre="Jazz",Miles Davis - Autumn Leaves
../music/Albums/Miles Davis/Autumn Leaves/02 Autumn Leaves.mp3

Exporting the ``id`` field this way is required by the `webm3u`_ and
`Beetstream`_ plugins which allow you serving your local m3u playlists via HTTP.

.. _Beetstream: https://github.com/BinaryBrain/Beetstream
.. _webm3u: https://github.com/mgoltzsche/beets-webm3u

Configuration
-------------

Expand Down

0 comments on commit dc0022e

Please sign in to comment.