From e337bb4d624158a572cd351d7115615240e28377 Mon Sep 17 00:00:00 2001 From: Patrick Speiser Date: Thu, 13 Sep 2012 12:19:02 +0200 Subject: [PATCH] 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 --- headphones/mb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/headphones/mb.py b/headphones/mb.py index 1542d782..1096b813 100644 --- a/headphones/mb.py +++ b/headphones/mb.py @@ -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":