lib/download_tv/grabbers/torrentapi.rb in download_tv-2.6.8 vs lib/download_tv/grabbers/torrentapi.rb in download_tv-2.6.9
- old
+ new
@@ -61,10 +61,10 @@
renew_token
search = format(@url, show, @token)
obj = request_and_parse(search)
end
- while obj['error_code'] == TOO_MANY_REQUESTS_ERROR || obj.has_key?('rate_limit')
+ until obj['error_code'] != TOO_MANY_REQUESTS_ERROR && (obj['rate_limit'].nil? || obj['rate_limit'] == false)
sleep(@wait)
obj = request_and_parse(search)
end
raise NoTorrentsError if obj['error']