Private GIT

Skip to content
Snippets Groups Projects
Commit cf161272 authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Try to fix SiCKRAGETV/sickrage-issues#2207 by adding delay between api calls

parent 6b99b044
Branches
Tags
No related merge requests found
......@@ -33,7 +33,7 @@ from sickbeard.exceptions import ex, AuthException
from sickbeard.common import MULTI_EP_RESULT, SEASON_RESULT, USER_AGENT
from sickbeard import db
from sickbeard.name_parser.parser import NameParser, InvalidNameException, InvalidShowException
from sickbeard.common import Quality
from sickbeard.common import Quality, cpu_presets
import jsonrpclib
from datetime import datetime
......@@ -144,6 +144,7 @@ class BTNProvider(generic.TorrentProvider):
try:
parsedJSON = server.getTorrents(apikey, params, int(results_per_page), int(offset))
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
except jsonrpclib.jsonrpc.ProtocolError, error:
if error.message == 'Call Limit Exceeded':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment