mirror of
https://github.com/beetbox/beets.git
synced 2026-01-27 18:43:50 +01:00
sanitize playlist names
Make e. g. - name: $albumartist/$year-$album.m3u' work when album data includes non fs-friendly characters
This commit is contained in:
parent
c5edd34841
commit
3e53d4caff
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ from __future__ import division, absolute_import, print_function
|
|||
|
||||
from beets.plugins import BeetsPlugin
|
||||
from beets import ui
|
||||
from beets.util import mkdirall, normpath, syspath, bytestring_path
|
||||
from beets.util import mkdirall, normpath, sanitize_path, syspath, bytestring_path
|
||||
from beets.library import Item, Album, parse_query_string
|
||||
from beets.dbcore import OrQuery
|
||||
from beets.dbcore.query import MultipleSort, ParsingError
|
||||
|
|
@ -186,7 +186,7 @@ class SmartPlaylistPlugin(BeetsPlugin):
|
|||
# As we allow tags in the m3u names, we'll need to iterate through
|
||||
# the items and generate the correct m3u file names.
|
||||
for item in items:
|
||||
m3u_name = item.evaluate_template(name, True)
|
||||
m3u_name = sanitize_path(item.evaluate_template(name, True), lib.replacements)
|
||||
if m3u_name not in m3us:
|
||||
m3us[m3u_name] = []
|
||||
item_path = item.path
|
||||
|
|
|
|||
Loading…
Reference in a new issue