File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def _fetch_image(url):
66
66
# Cover Art Archive.
67
67
68
68
CAA_URL = 'http://coverartarchive.org/release/{mbid}/front-500.jpg'
69
- CAA_GROUP_URL = 'http://coverartarchive.org/release-group/{mbid}/'
69
+ CAA_GROUP_URL = 'http://coverartarchive.org/release-group/{mbid}/front-500.jpg '
70
70
71
71
def caa_art (release_id ):
72
72
"""Return the Cover Art Archive URL given a MusicBrainz release ID.
@@ -79,8 +79,6 @@ def caa_group(release_group_id):
79
79
"""
80
80
return CAA_GROUP_URL .format (mbid = release_group_id )
81
81
82
- RELEASE_ID_PAT = r'^http://musicbrainz.org/release/([^/]+)'
83
-
84
82
# Art from Amazon.
85
83
86
84
AMAZON_URL = 'http://images.amazon.com/images/P/%s.%02i.LZZZZZZZ.jpg'
@@ -163,17 +161,9 @@ def _source_urls(album):
163
161
yield url
164
162
165
163
if album .mb_releasegroupid :
166
- group_url = caa_group (album .mb_releasegroupid )
167
- response = requests .get (group_url )
168
- if response .status_code == 200 :
169
- json = response .json ()
170
- if json .has_key ('release' ):
171
- # URL in the form of http://musicbrainz.org/release/{mbid}
172
- m = re .search (RELEASE_ID_PAT , json ['release' ])
173
- if m :
174
- url = caa_art (m .group (1 ))
175
- if url :
176
- yield url
164
+ url = caa_group (album .mb_releasegroupid )
165
+ if url :
166
+ yield url
177
167
178
168
# Amazon and AlbumArt.org.
179
169
if album .asin :
You can’t perform that action at this time.
0 commit comments