mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
fetchart: fix refactoring
This commit is contained in:
parent
206a88caff
commit
a2141c6f3a
1 changed files with 6 additions and 6 deletions
|
|
@ -626,10 +626,10 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin):
|
||||||
# For any other choices (e.g., TRACKS), do nothing.
|
# For any other choices (e.g., TRACKS), do nothing.
|
||||||
return
|
return
|
||||||
|
|
||||||
path = self.art_for_album(task.album, task.paths, local)
|
candidate = self.art_for_album(task.album, task.paths, local)
|
||||||
|
|
||||||
if path:
|
if candidate:
|
||||||
self.art_paths[task] = path
|
self.art_paths[task] = candidate.path
|
||||||
|
|
||||||
# Synchronous; after music files are put in place.
|
# Synchronous; after music files are put in place.
|
||||||
def assign_art(self, session, task):
|
def assign_art(self, session, task):
|
||||||
|
|
@ -719,9 +719,9 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin):
|
||||||
# sources.
|
# sources.
|
||||||
local_paths = None if force else [album.path]
|
local_paths = None if force else [album.path]
|
||||||
|
|
||||||
path = self.art_for_album(album, local_paths)
|
candidate = self.art_for_album(album, local_paths)
|
||||||
if path:
|
if candidate:
|
||||||
album.set_art(path, False)
|
album.set_art(candidate.path, False)
|
||||||
album.store()
|
album.store()
|
||||||
message = ui.colorize('text_success', u'found album art')
|
message = ui.colorize('text_success', u'found album art')
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue