mirror of
https://github.com/beetbox/beets.git
synced 2026-01-06 07:53:40 +01:00
Update beets/library.py
Fix for Issue 450: Expand templates in art_filename config option
This commit is contained in:
parent
131b191885
commit
6b7b54062f
1 changed files with 5 additions and 2 deletions
|
|
@ -1002,7 +1002,7 @@ class Library(BaseLibrary):
|
|||
self.path = bytestring_path(normpath(path))
|
||||
self.directory = bytestring_path(normpath(directory))
|
||||
self.path_formats = path_formats
|
||||
self.art_filename = bytestring_path(art_filename)
|
||||
self.art_filename = art_filename
|
||||
self.replacements = replacements
|
||||
|
||||
self._memotable = {} # Used for template substitution performance.
|
||||
|
|
@ -1564,8 +1564,11 @@ class Album(BaseAlbum):
|
|||
"""
|
||||
image = bytestring_path(image)
|
||||
item_dir = item_dir or self.item_dir()
|
||||
sanitized_art_filename = util.sanitize_for_path(self.evaluate_template(self._library.art_filename),os.path)
|
||||
_, ext = os.path.splitext(image)
|
||||
dest = os.path.join(item_dir, self._library.art_filename + ext)
|
||||
|
||||
dest = os.path.join(item_dir, util.sanitize_path(sanitized_art_filename) + ext)
|
||||
|
||||
return dest
|
||||
|
||||
def set_art(self, path, copy=True):
|
||||
|
|
|
|||
Loading…
Reference in a new issue