File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 19
19
import logging
20
20
import os
21
21
import tempfile
22
- import requests
23
22
24
23
from beets .plugins import BeetsPlugin
25
24
from beets .util .artresizer import ArtResizer
@@ -73,12 +72,13 @@ def caa_art(release_id):
73
72
"""
74
73
return CAA_URL .format (mbid = release_id )
75
74
76
- def caa_group (release_group_id ):
75
+ def caa_group_art (release_group_id ):
77
76
"""Return the Cover Art Archive release group URL given a MusicBrainz
78
77
release group ID.
79
78
"""
80
79
return CAA_GROUP_URL .format (mbid = release_group_id )
81
80
81
+
82
82
# Art from Amazon.
83
83
84
84
AMAZON_URL = 'http://images.amazon.com/images/P/%s.%02i.LZZZZZZZ.jpg'
@@ -155,15 +155,11 @@ def _source_urls(album):
155
155
through this sequence early to avoid the cost of scraping when not
156
156
necessary.
157
157
"""
158
+ # Cover Art Archive.
158
159
if album .mb_albumid :
159
- url = caa_art (album .mb_albumid )
160
- if url :
161
- yield url
162
-
160
+ yield caa_art (album .mb_albumid )
163
161
if album .mb_releasegroupid :
164
- url = caa_group (album .mb_releasegroupid )
165
- if url :
166
- yield url
162
+ yield caa_group_art (album .mb_releasegroupid )
167
163
168
164
# Amazon and AlbumArt.org.
169
165
if album .asin :
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ Changelog
11
11
* :doc: `/plugins/bpd `: Fix for a crash when searching, thanks to Simon Chopin.
12
12
* Regular expression queries (and other query types) over paths now work.
13
13
(Previously, special query types were ignored for the ``path `` field.)
14
+ * :doc: `/plugins/fetchart `: Look for images in the Cover Art Archive for
15
+ the release group in addition to the specific release. Thanks to Filipe
16
+ Fortes.
14
17
15
18
16
19
1.2.1 (June 22, 2013)
You can’t perform that action at this time.
0 commit comments