mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 16:22:45 +00:00
FIX: Possible error when anti-hammering for nzb sites was enforced and was taking a string instead of the numeric (ie. repeating the number 1, 60 times).
This commit is contained in:
parent
9e0c94c41d
commit
f660a5dff0
1 changed files with 5 additions and 4 deletions
|
@ -493,14 +493,15 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
||||||
request.add_header('User-Agent', str(mylar.USER_AGENT))
|
request.add_header('User-Agent', str(mylar.USER_AGENT))
|
||||||
opener = urllib2.build_opener()
|
opener = urllib2.build_opener()
|
||||||
|
|
||||||
#set a delay between searches here. Default is for 30 seconds...
|
#set a delay between searches here. Default is for 60 seconds...
|
||||||
|
#changing this to lower could result in a ban from your nzb source due to hammering.
|
||||||
if mylar.SEARCH_DELAY == 'None' or mylar.SEARCH_DELAY is None:
|
if mylar.SEARCH_DELAY == 'None' or mylar.SEARCH_DELAY is None:
|
||||||
pause_the_search = 1 * 60 # (it's in seconds)
|
pause_the_search = 60 # (it's in seconds)
|
||||||
elif str(mylar.SEARCH_DELAY).isdigit():
|
elif str(mylar.SEARCH_DELAY).isdigit():
|
||||||
pause_the_search = mylar.SEARCH_DELAY * 60
|
pause_the_search = int(mylar.SEARCH_DELAY) * 60
|
||||||
else:
|
else:
|
||||||
logger.info("Check Search Delay - invalid numerical given. Force-setting to 1 minute.")
|
logger.info("Check Search Delay - invalid numerical given. Force-setting to 1 minute.")
|
||||||
pause_the_search = 1 * 60
|
pause_the_search = 60
|
||||||
|
|
||||||
#bypass for local newznabs
|
#bypass for local newznabs
|
||||||
#remove the protocol string (http/https)
|
#remove the protocol string (http/https)
|
||||||
|
|
Loading…
Reference in a new issue