mirror of
https://github.com/beetbox/beets.git
synced 2026-02-08 00:14:31 +01:00
spl mutli-query (#575): remove option, changelog
This commit is contained in:
parent
f9b9ab5db8
commit
f06a16819f
3 changed files with 5 additions and 11 deletions
|
|
@ -35,10 +35,6 @@ def update_playlists(lib):
|
|||
relative_to = normpath(relative_to)
|
||||
|
||||
for playlist in playlists:
|
||||
# Default is to not keep_duplicate
|
||||
keep_duplicate = playlist.has_key('keep_duplicate') and \
|
||||
playlist['keep_duplicate']
|
||||
|
||||
# Query attribute could be a single query or a list of queries
|
||||
queries = playlist['query']
|
||||
if not isinstance(queries, (list, tuple)):
|
||||
|
|
@ -58,9 +54,7 @@ def update_playlists(lib):
|
|||
item_path = item.path
|
||||
if relative_to:
|
||||
item_path = os.path.relpath(item.path, relative_to)
|
||||
# Check if we want to add the item.
|
||||
if keep_duplicate or not item_path in m3us[m3u_name]:
|
||||
m3us[m3u_name].append(item_path)
|
||||
m3us[m3u_name].append(item_path)
|
||||
# Now iterate through the m3us that we need to generate
|
||||
for m3u in m3us:
|
||||
m3u_path = normpath(os.path.join(playlist_dir, m3u))
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ New stuff:
|
|||
fields. Thanks to geigerzaehler.
|
||||
* The importer interface now shows the URL for MusicBrainz matches. Thanks to
|
||||
johtso.
|
||||
* :doc:`/plugins/smartplaylist`: Playlists can now be generated from multiple
|
||||
queries (combined with "or" logic). Thanks to brilnius.
|
||||
|
||||
Fixes:
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,11 @@ For more advanced usage, you can use template syntax (see
|
|||
This will query all the songs in 2010 and 2011 and generate the two playlist
|
||||
files `ReleasedIn2010.m3u` and `ReleasedIn2011.m3u` using those songs.
|
||||
|
||||
You can also gather the results of several queries by putting them in a list. By
|
||||
default duplicates are removed, but you can keep all of them with the
|
||||
``keep_duplicate: yes`` additional directive. For example::
|
||||
You can also gather the results of several queries by putting them in a list.
|
||||
(Items that match both queries are not included twice.) For example::
|
||||
|
||||
- query: ['artist:beatles', 'genre:"beatles cover"']
|
||||
name: 'BeatlesUniverse.m3u'
|
||||
keep_duplicate: yes
|
||||
|
||||
By default, all playlists are regenerated after every beets command that
|
||||
changes the library database. To force regeneration, you can invoke it manually
|
||||
|
|
|
|||
Loading…
Reference in a new issue