mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 01:25:47 +01:00
minor tweak
This commit is contained in:
parent
12aaa2ee34
commit
fe1b40f7d2
1 changed files with 5 additions and 7 deletions
|
|
@ -1563,15 +1563,13 @@ class Album(BaseAlbum):
|
|||
item_dir must be provided.
|
||||
"""
|
||||
|
||||
if isinstance(self._library.art_filename,Template):
|
||||
art_filename_template = self._library.art_filename,Template
|
||||
else:
|
||||
art_filename_template = Template(self._library.art_filename)
|
||||
|
||||
|
||||
image = bytestring_path(image)
|
||||
item_dir = item_dir or self.item_dir()
|
||||
sanitized_art_filename = util.sanitize_for_path(self.evaluate_template(art_filename_template),os.path)
|
||||
|
||||
if not isinstance(self._library.art_filename,Template):
|
||||
self._library.art_filename = Template(self._library.art_filename)
|
||||
|
||||
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, util.sanitize_path(sanitized_art_filename) + ext)
|
||||
|
|
|
|||
Loading…
Reference in a new issue