Debian Codegraph @

docs/plugins/playlist.rst

raw
1 Playlist Plugin
2 ===============
3
4 ``playlist`` is a plugin to use playlists in m3u format.
5
6 To use it, enable the ``playlist`` plugin in your configuration (see
7 :ref:`using-plugins`). Then configure your playlists like this:
8
9 ::
10
11 playlist:
12 auto: no
13 relative_to: ~/Music
14 playlist_dir: ~/.mpd/playlists
15 forward_slash: no
16
17 It is possible to query the library based on a playlist by specifying its
18 absolute path:
19
20 ::
21
22 $ beet ls playlist:/path/to/someplaylist.m3u
23
24 The plugin also supports referencing playlists by name. The playlist is then
25 searched in the playlist_dir and the ".m3u" extension is appended to the name:
26
27 ::
28
29 $ beet ls playlist:anotherplaylist
30
31 A playlist query will use the paths found in the playlist file to match items in
32 the beets library. ``playlist:`` submits a regular beets :ref:`query <queries>`
33 similar to a :ref:`specific fields query <fieldsquery>`. If you want the list in
34 any particular order, you can use the standard beets query syntax for
35 :ref:`sorting <query-sort>`:
36
37 ::
38
39 $ beet ls playlist:/path/to/someplaylist.m3u artist+ year+
40
41 Playlist queries do not reflect the original order in the m3u file.
42
43 The plugin can also update playlists in the playlist directory automatically
44 every time an item is moved or deleted. This can be controlled by the ``auto``
45 configuration option.
46
47 Configuration
48 -------------
49
50 To configure the plugin, make a ``playlist:`` section in your configuration
51 file. In addition to the ``playlists`` described above, the other configuration
52 options are:
53
54 - **auto**: If this is set to ``yes``, then anytime an item in the library is
55 moved or removed, the plugin will update all playlists in the ``playlist_dir``
56 directory that contain that item to reflect the change. Default: ``no``
57 - **playlist_dir**: Where to read playlist files from. Default: The current
58 working directory (i.e., ``'.'``).
59 - **relative_to**: Interpret paths in the playlist files relative to a base
60 directory. Instead of setting it to a fixed path, it is also possible to set
61 it to ``playlist`` to use the playlist's parent directory or to ``library`` to
62 use the library directory. Default: ``library``
63 - **forward_slash**: Forces forward slashes in the generated playlist files. If
64 you intend to use this plugin to generate playlists for MPD on Windows, set
65 this to yes. Default: Use system separator.