mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-28 02:23:58 +00:00
Move code to new _queue_from_cover_art_relation()
Consistency.
This commit is contained in:
@@ -300,9 +300,7 @@ class CoverArt:
|
||||
if use_whitelist \
|
||||
and (relation.type == 'cover art link' or
|
||||
relation.type == 'has_cover_art_at'):
|
||||
log.debug("Found cover art link in whitelist")
|
||||
url = relation.target[0].text
|
||||
self._queue_put(CoverArtImage(url))
|
||||
self._queue_from_cover_art_relation(relation)
|
||||
elif use_amazon \
|
||||
and (relation.type == 'amazon asin' or
|
||||
relation.type == 'has_Amazon_ASIN'):
|
||||
@@ -310,6 +308,12 @@ class CoverArt:
|
||||
except AttributeError:
|
||||
self.album.error_append(traceback.format_exc())
|
||||
|
||||
def _queue_from_cover_art_relation(self, relation):
|
||||
"""Queue from cover art relationships"""
|
||||
log.debug("Found cover art link in whitelist")
|
||||
url = relation.target[0].text
|
||||
self._queue_put(CoverArtImage(url))
|
||||
|
||||
def _queue_from_asin_relation(self, relation):
|
||||
"""Queue cover art images from Amazon"""
|
||||
amz = parse_amazon_url(relation.target[0].text)
|
||||
|
||||
Reference in New Issue
Block a user