summaryrefslogtreecommitdiffstats
path: root/docs/plugins/smartplaylist.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/plugins/smartplaylist.rst')
-rw-r--r--docs/plugins/smartplaylist.rst41
1 files changed, 40 insertions, 1 deletions
diff --git a/docs/plugins/smartplaylist.rst b/docs/plugins/smartplaylist.rst
index a40d18882..af7a09f03 100644
--- a/docs/plugins/smartplaylist.rst
+++ b/docs/plugins/smartplaylist.rst
@@ -93,6 +93,38 @@ 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
+ - 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
+
+To give a usage example, the `webm3u`_ and `Beetstream`_ plugins read the
+exported ``id`` field, allowing you to serve your local m3u playlists via HTTP.
+
+.. _Beetstream: https://github.com/BinaryBrain/Beetstream
+.. _webm3u: https://github.com/mgoltzsche/beets-webm3u
+
Configuration
-------------
@@ -122,7 +154,14 @@ other configuration options are:
playlist item URI, e.g. ``http://beets:8337/item/$id/file``.
When this option is specified, the local path-related options ``prefix``,
``relative_to``, ``forward_slash`` and ``urlencode`` are ignored.
-- **output**: Specify the playlist format: m3u|m3u8. Default ``m3u``.
+- **output**: Specify the playlist format: m3u|extm3u. Default ``m3u``.
+- **fields**: Specify the names of the additional item fields to export into
+ the playlist. This allows using e.g. the ``id`` field within other tools such
+ as the `webm3u`_ and `Beetstream`_ plugins.
+ To use this option, you must set the ``output`` option to ``extm3u``.
+
+.. _Beetstream: https://github.com/BinaryBrain/Beetstream
+.. _webm3u: https://github.com/mgoltzsche/beets-webm3u
For many configuration options, there is a corresponding CLI option, e.g.
``--playlist-dir``, ``--relative-to``, ``--prefix``, ``--forward-slash``,