hopefully fixed 503 errors on itunes import

This commit is contained in:
Remy
2011-05-26 15:16:59 -07:00
parent 627c6553cf
commit 97f31c80b4

View File

@@ -21,8 +21,10 @@ def itunesImport(pathtoxml):
rawlist = {}.fromkeys(lst).keys()
artistlist = [f for f in rawlist if f != None]
for name in artistlist:
time.sleep(1)
artistResults = ws.Query().getArtists(ws.ArtistFilter(string.replace(name, '&', '%38'), limit=1))
for result in artistResults:
time.sleep(1)
artistid = u.extractUuid(result.artist.id)
inc = ws.ArtistIncludes(releases=(m.Release.TYPE_OFFICIAL, m.Release.TYPE_ALBUM), ratings=False, releaseGroups=False)
artist = ws.Query().getArtistById(artistid, inc)