@@ -124,11 +124,7 @@ def findArtist(name, limit=1):
124
124
'Cannot determine the best match from an artist/album search. Using top match instead' )
125
125
artistlist .append ({
126
126
# Just need the artist id if the limit is 1
127
- # 'name': unicode(result['sort-name']),
128
- # 'uniquename': uniquename,
129
127
'id' : str (result ['id' ]),
130
- # 'url': unicode("http://musicbrainz.org/artist/" + result['id']),#probably needs to be changed
131
- # 'score': int(result['ext:score'])
132
128
})
133
129
else :
134
130
artistlist .append (artistdict )
@@ -137,7 +133,7 @@ def findArtist(name, limit=1):
137
133
'name' : str (result ['sort-name' ]),
138
134
'uniquename' : uniquename ,
139
135
'id' : str (result ['id' ]),
140
- 'url' : str ("http ://musicbrainz.org/artist/" + result ['id' ]),
136
+ 'url' : str ("https ://musicbrainz.org/artist/" + result ['id' ]),
141
137
# probably needs to be changed
142
138
'score' : int (result ['ext:score' ])
143
139
})
@@ -208,9 +204,9 @@ def findRelease(name, limit=1, artist=None):
208
204
'id' : str (result ['artist-credit' ][0 ]['artist' ]['id' ]),
209
205
'albumid' : str (result ['id' ]),
210
206
'url' : str (
211
- "http ://musicbrainz.org/artist/" + result ['artist-credit' ][0 ]['artist' ]['id' ]),
207
+ "https ://musicbrainz.org/artist/" + result ['artist-credit' ][0 ]['artist' ]['id' ]),
212
208
# probably needs to be changed
213
- 'albumurl' : str ("http ://musicbrainz.org/release/" + result ['id' ]),
209
+ 'albumurl' : str ("https ://musicbrainz.org/release/" + result ['id' ]),
214
210
# probably needs to be changed
215
211
'score' : int (result ['ext:score' ]),
216
212
'date' : str (result ['date' ]) if 'date' in result else '' ,
@@ -248,7 +244,7 @@ def findSeries(name, limit=1):
248
244
'name' : str (result ['name' ]),
249
245
'type' : str (result ['type' ]),
250
246
'id' : str (result ['id' ]),
251
- 'url' : str ("http ://musicbrainz.org/series/" + result ['id' ]),
247
+ 'url' : str ("https ://musicbrainz.org/series/" + result ['id' ]),
252
248
# probably needs to be changed
253
249
'score' : int (result ['ext:score' ])
254
250
})
@@ -295,7 +291,7 @@ def getArtist(artistid, extrasonly=False):
295
291
releasegroups .append ({
296
292
'title' : str (rg ['title' ]),
297
293
'id' : str (rg ['id' ]),
298
- 'url' : "http ://musicbrainz.org/release-group/" + rg ['id' ],
294
+ 'url' : "https ://musicbrainz.org/release-group/" + rg ['id' ],
299
295
'type' : str (rg ['type' ])
300
296
})
301
297
@@ -356,7 +352,7 @@ def getArtist(artistid, extrasonly=False):
356
352
releasegroups .append ({
357
353
'title' : str (rg ['title' ]),
358
354
'id' : str (rg ['id' ]),
359
- 'url' : "http ://musicbrainz.org/release-group/" + rg ['id' ],
355
+ 'url' : "https ://musicbrainz.org/release-group/" + rg ['id' ],
360
356
'type' : str (rg_type )
361
357
})
362
358
artist_dict ['releasegroups' ] = releasegroups
@@ -691,7 +687,7 @@ def getTracksFromRelease(release):
691
687
'number' : totalTracks ,
692
688
'title' : track_title ,
693
689
'id' : str (track ['recording' ]['id' ]),
694
- 'url' : "http ://musicbrainz.org/track/" + track ['recording' ]['id' ],
690
+ 'url' : "https ://musicbrainz.org/track/" + track ['recording' ]['id' ],
695
691
'duration' : int (track ['length' ]) if 'length' in track else 0
696
692
})
697
693
totalTracks += 1
@@ -733,15 +729,7 @@ def findArtistbyAlbum(name):
733
729
for releaseGroup in results :
734
730
newArtist = releaseGroup ['artist-credit' ][0 ]['artist' ]
735
731
# Only need the artist ID if we're doing an artist+album lookup
736
- # if 'disambiguation' in newArtist:
737
- # uniquename = unicode(newArtist['sort-name'] + " (" + newArtist['disambiguation'] + ")")
738
- # else:
739
- # uniquename = unicode(newArtist['sort-name'])
740
- # artist_dict['name'] = unicode(newArtist['sort-name'])
741
- # artist_dict['uniquename'] = uniquename
742
732
artist_dict ['id' ] = str (newArtist ['id' ])
743
- # artist_dict['url'] = u'http://musicbrainz.org/artist/' + newArtist['id']
744
- # artist_dict['score'] = int(releaseGroup['ext:score'])
745
733
746
734
return artist_dict
747
735
0 commit comments