mirror of
https://github.com/evilhero/mylar
synced 2024-12-22 07:42:24 +00:00
Merge branch 'development'
This commit is contained in:
commit
d0ce300f72
2 changed files with 32 additions and 16 deletions
|
@ -50,16 +50,22 @@ def Startit(searchName, searchIssue, searchYear, ComicVersion, IssDateFix):
|
||||||
searchName = searchName.replace("-", '((\\s)?[-:])?(\\s)?')
|
searchName = searchName.replace("-", '((\\s)?[-:])?(\\s)?')
|
||||||
regexName = searchName.replace(" ", '((\\s)?[-:])?(\\s)?')
|
regexName = searchName.replace(" ", '((\\s)?[-:])?(\\s)?')
|
||||||
|
|
||||||
if mylar.CONFIG.USE_MINSIZE:
|
if mylar.CONFIG.USE_MINSIZE is True:
|
||||||
size_constraints = "minsize=" + str(mylar.CONFIG.MINSIZE)
|
minsize = str(mylar.CONFIG.MINSIZE)
|
||||||
else:
|
else:
|
||||||
size_constraints = "minsize=10"
|
minsize = '10'
|
||||||
|
size_constraints = "&minsize=" + minsize
|
||||||
|
|
||||||
if mylar.CONFIG.USE_MAXSIZE:
|
if mylar.CONFIG.USE_MAXSIZE is True:
|
||||||
size_constraints = size_constraints + "&maxsize=" + str(mylar.CONFIG.MAXSIZE)
|
maxsize = str(mylar.CONFIG.MAXSIZE)
|
||||||
|
else:
|
||||||
|
maxsize = '0'
|
||||||
|
size_constraints += "&maxsize=" + maxsize
|
||||||
|
|
||||||
if mylar.CONFIG.USENET_RETENTION != None:
|
if mylar.CONFIG.USENET_RETENTION is not None:
|
||||||
max_age = "&age=" + str(mylar.CONFIG.USENET_RETENTION)
|
max_age = "&maxage=" + str(mylar.CONFIG.USENET_RETENTION)
|
||||||
|
else:
|
||||||
|
max_age = "&maxage=0"
|
||||||
|
|
||||||
feeds = []
|
feeds = []
|
||||||
i = 1
|
i = 1
|
||||||
|
@ -72,18 +78,19 @@ def Startit(searchName, searchIssue, searchYear, ComicVersion, IssDateFix):
|
||||||
searchmethod = '00' + searchIssue
|
searchmethod = '00' + searchIssue
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
logger.fdebug('Now searching experimental for issue number: %s to try and ensure all the bases are covered' % searchmethod)
|
|
||||||
joinSearch = "+".join(splitSearch) + "+" +searchmethod
|
joinSearch = "+".join(splitSearch) + "+" +searchmethod
|
||||||
|
|
||||||
|
logger.fdebug('Now searching experimental for issue number: %s to try and ensure all the bases are covered' % searchmethod)
|
||||||
|
|
||||||
if mylar.CONFIG.PREFERRED_QUALITY == 1: joinSearch = joinSearch + " .cbr"
|
if mylar.CONFIG.PREFERRED_QUALITY == 1: joinSearch = joinSearch + " .cbr"
|
||||||
elif mylar.CONFIG.PREFERRED_QUALITY == 2: joinSearch = joinSearch + " .cbz"
|
elif mylar.CONFIG.PREFERRED_QUALITY == 2: joinSearch = joinSearch + " .cbz"
|
||||||
|
|
||||||
feeds.append(feedparser.parse("http://nzbindex.nl/rss/alt.binaries.comics.dcp/?sort=agedesc&" + str(size_constraints) + str(max_age) + "&dq=%s&max=50&more=1" %joinSearch))
|
feeds.append(feedparser.parse("http://beta.nzbindex.com/search/rss?q=%s&max=50&minage=0%s&hidespam=1&hidepassword=1&sort=agedesc%s&complete=0&hidecross=0&hasNFO=0&poster=&g[]=85" % (joinSearch, max_age, size_constraints)))
|
||||||
time.sleep(3)
|
time.sleep(5)
|
||||||
if mylar.CONFIG.ALTEXPERIMENTAL:
|
if mylar.CONFIG.ALTEXPERIMENTAL:
|
||||||
feeds.append(feedparser.parse("http://nzbindex.nl/rss/?dq=%s&g[]=41&g[]=510&sort=agedesc&hidespam=0&max=&more=1" %joinSearch))
|
feeds.append(feedparser.parse("http://beta.nzbindex.com/search/rss?q=%s&max=50&minage=0%s&hidespam=1&hidepassword=1&sort=agedesc%s&complete=0&hidecross=0&hasNFO=0&poster=&g[]=86" % (joinSearch, max_age, size_constraints)))
|
||||||
time.sleep(3)
|
time.sleep(5)
|
||||||
|
|
||||||
i+=1
|
i+=1
|
||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
|
@ -124,7 +131,7 @@ def Startit(searchName, searchIssue, searchYear, ComicVersion, IssDateFix):
|
||||||
|
|
||||||
regexList=[regEx, regExOne, regExTwo, regExThree, regExFour, regExFive]
|
regexList=[regEx, regExOne, regExTwo, regExThree, regExFour, regExFive]
|
||||||
|
|
||||||
except_list=['releases', 'gold line', 'distribution', '0-day', '0 day', '0day']
|
except_list=['releases', 'gold line', 'distribution', '0-day', '0 day', '0day', 'o-day']
|
||||||
|
|
||||||
for entry in keyPair:
|
for entry in keyPair:
|
||||||
title = entry['title']
|
title = entry['title']
|
||||||
|
|
|
@ -1093,12 +1093,17 @@ def forceRescan(ComicID, archive=None, module=None, recheck=False):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
if tmpfc['JusttheDigits'] is not None:
|
if tmpfc['JusttheDigits'] is not None:
|
||||||
temploc= tmpfc['JusttheDigits'].replace('_', ' ')
|
temploc= tmpfc['JusttheDigits'].replace('_', ' ')
|
||||||
temploc = re.sub('[\#\']', '', temploc)
|
temploc = re.sub('[\#\']', '', temploc)
|
||||||
logger.fdebug('temploc: %s' % temploc)
|
logger.fdebug('temploc: %s' % temploc)
|
||||||
else:
|
else:
|
||||||
temploc = None
|
#assume 1 if not given
|
||||||
|
if any([booktype == 'TPB', booktype == 'One-Shot']):
|
||||||
|
temploc = '1'
|
||||||
|
else:
|
||||||
|
temploc = None
|
||||||
|
|
||||||
if all(['annual' not in temploc.lower(), 'special' not in temploc.lower()]):
|
if all(['annual' not in temploc.lower(), 'special' not in temploc.lower()]):
|
||||||
#remove the extension here
|
#remove the extension here
|
||||||
|
@ -1123,7 +1128,11 @@ def forceRescan(ComicID, archive=None, module=None, recheck=False):
|
||||||
|
|
||||||
fnd_iss_except = 'None'
|
fnd_iss_except = 'None'
|
||||||
|
|
||||||
fcdigit = helpers.issuedigits(temploc)
|
if temploc is not None:
|
||||||
|
fcdigit = helpers.issuedigits(temploc)
|
||||||
|
elif any([booktype == 'TPB', booktype == 'One-Shot']) and temploc is None:
|
||||||
|
fcdigit = helpers.issuedigits('1')
|
||||||
|
|
||||||
if int(fcdigit) == int_iss:
|
if int(fcdigit) == int_iss:
|
||||||
logger.fdebug(module + ' [' + str(reiss['IssueID']) + '] Issue match - fcdigit: ' + str(fcdigit) + ' ... int_iss: ' + str(int_iss))
|
logger.fdebug(module + ' [' + str(reiss['IssueID']) + '] Issue match - fcdigit: ' + str(fcdigit) + ' ... int_iss: ' + str(int_iss))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue