From 2dab9fb68ccadb969d03d5cc107d32b0d9143922 Mon Sep 17 00:00:00 2001 From: Remy Date: Thu, 14 Jul 2011 15:45:51 -0700 Subject: [PATCH] Bug Fixes: 503 Error on import, fixed sorting --- headphones/updater.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headphones/updater.py b/headphones/updater.py index 59226c3e..3329d5c6 100644 --- a/headphones/updater.py +++ b/headphones/updater.py @@ -30,6 +30,7 @@ def dbUpdate(): inc = ws.ArtistIncludes(releases=(m.Release.TYPE_OFFICIAL, m.Release.TYPE_ALBUM), releaseGroups=True) artist = ws.Query().getArtistById(artistid, inc) + time.sleep(1) for rg in artist.getReleaseGroups(): @@ -37,7 +38,7 @@ def dbUpdate(): releaseid = getReleaseGroup(rgid) inc = ws.ReleaseIncludes(artist=True, releaseEvents= True, tracks= True, releaseGroup=True) results = ws.Query().getReleaseById(releaseid, inc) - + time.sleep(1) if any(releaseid in x for x in albumlist): logger.info(results.title + " already exists in the database. Updating ASIN, Release Date, Tracks") @@ -68,7 +69,6 @@ def dbUpdate(): c.execute('INSERT INTO tracks VALUES( ?, ?, ?, ?, ?, ?, ?, ?)', (artistid, results.artist.name, results.title, results.asin, u.extractUuid(results.id), track.title, track.duration, u.extractUuid(track.id))) conn.commit() - time.sleep(1) i += 1 conn.commit()