Fixed rate limiting, the provided sleep interval was pretty much ignored because any value > 0 was considered to be a limit of 1 request/second

This commit is contained in:
Patrick Speiser
2012-09-13 12:19:02 +02:00
parent 296ef01f63
commit e337bb4d62
+2 -1
View File
@@ -57,7 +57,8 @@ def startmb():
if sleepytime == 0:
musicbrainzngs.set_rate_limit(False)
else:
musicbrainzngs.set_rate_limit(True)
#calling it with an it ends up blocking all requests after the first
musicbrainzngs.set_rate_limit(limit_or_interval=float(sleepytime))
# Add headphones credentials
if headphones.MIRROR == "headphones":