Private GIT

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

Merge pull request #1944 from miigotu/unranked-rarbg-and-pp-logfix

Unranked rarbg and pp logfix
parents 32f4431a af7bbac7
Branches
Tags
No related merge requests found
...@@ -78,13 +78,13 @@ class NameParser(object): ...@@ -78,13 +78,13 @@ class NameParser(object):
def _compile_regexes(self, regexMode): def _compile_regexes(self, regexMode):
if regexMode == self.ANIME_REGEX: if regexMode == self.ANIME_REGEX:
logger.log(u"Using ANIME regexs", logger.DEBUG) dbg_str = u"ANIME"
uncompiled_regex = [regexes.anime_regexes, regexes.normal_regexes] uncompiled_regex = [regexes.anime_regexes, regexes.normal_regexes]
elif regexMode == self.NORMAL_REGEX: elif regexMode == self.NORMAL_REGEX:
logger.log(u"Using NORMAL regexs", logger.DEBUG) dbg_str = u"NORMAL"
uncompiled_regex = [regexes.normal_regexes] uncompiled_regex = [regexes.normal_regexes]
else: else:
logger.log(u"Using ALL regexes", logger.DEBUG) dbg_str = u"ALL"
uncompiled_regex = [regexes.normal_regexes, regexes.anime_regexes] uncompiled_regex = [regexes.normal_regexes, regexes.anime_regexes]
self.compiled_regexes = [] self.compiled_regexes = []
...@@ -93,7 +93,7 @@ class NameParser(object): ...@@ -93,7 +93,7 @@ class NameParser(object):
try: try:
cur_regex = re.compile(cur_pattern, re.VERBOSE | re.IGNORECASE) cur_regex = re.compile(cur_pattern, re.VERBOSE | re.IGNORECASE)
except re.error, errormsg: except re.error, errormsg:
logger.log(u"WARNING: Invalid episode_pattern, %s. %s" % (errormsg, cur_pattern)) logger.log(u"WARNING: Invalid episode_pattern using %s regexs, %s. %s" % (dbg_str, errormsg, cur_pattern))
else: else:
self.compiled_regexes.append((cur_pattern_num, cur_pattern_name, cur_regex)) self.compiled_regexes.append((cur_pattern_num, cur_pattern_name, cur_regex))
......
...@@ -444,8 +444,7 @@ def already_postprocessed(dirName, videofile, force, result): ...@@ -444,8 +444,7 @@ def already_postprocessed(dirName, videofile, force, result):
myDB = db.DBConnection() myDB = db.DBConnection()
sqlResult = myDB.select("SELECT * FROM tv_episodes WHERE release_name = ?", [dirName]) sqlResult = myDB.select("SELECT * FROM tv_episodes WHERE release_name = ?", [dirName])
if sqlResult: if sqlResult:
result.output += logHelper(u"You're trying to post process a dir that's already been processed, skipping", #result.output += logHelper(u"You're trying to post process a dir that's already been processed, skipping", logger.DEBUG)
logger.DEBUG)
return True return True
else: else:
...@@ -455,8 +454,7 @@ def already_postprocessed(dirName, videofile, force, result): ...@@ -455,8 +454,7 @@ def already_postprocessed(dirName, videofile, force, result):
sqlResult = myDB.select("SELECT * FROM tv_episodes WHERE release_name = ?", [videofile.rpartition('.')[0]]) sqlResult = myDB.select("SELECT * FROM tv_episodes WHERE release_name = ?", [videofile.rpartition('.')[0]])
if sqlResult: if sqlResult:
result.output += logHelper(u"You're trying to post process a video that's already been processed, skipping", #result.output += logHelper(u"You're trying to post process a video that's already been processed, skipping", logger.DEBUG)
logger.DEBUG)
return True return True
#Needed if we have downloaded the same episode @ different quality #Needed if we have downloaded the same episode @ different quality
...@@ -479,8 +477,7 @@ def already_postprocessed(dirName, videofile, force, result): ...@@ -479,8 +477,7 @@ def already_postprocessed(dirName, videofile, force, result):
search_sql += " and history.resource LIKE ?" search_sql += " and history.resource LIKE ?"
sqlResult = myDB.select(search_sql, [u'%' + videofile]) sqlResult = myDB.select(search_sql, [u'%' + videofile])
if sqlResult: if sqlResult:
result.output += logHelper(u"You're trying to post process a video that's already been processed, skipping", #result.output += logHelper(u"You're trying to post process a video that's already been processed, skipping", logger.DEBUG)
logger.DEBUG)
return True return True
return False return False
......
...@@ -87,7 +87,7 @@ class RarbgProvider(generic.TorrentProvider): ...@@ -87,7 +87,7 @@ class RarbgProvider(generic.TorrentProvider):
self.urlOptions['sorting'].format(sorting='last') + \ self.urlOptions['sorting'].format(sorting='last') + \
self.urlOptions['limit'].format(limit='100') + \ self.urlOptions['limit'].format(limit='100') + \
self.urlOptions['format'].format(format='json') + \ self.urlOptions['format'].format(format='json') + \
self.urlOptions['ranked'].format(ranked='1') self.urlOptions['ranked'].format(ranked='0')
self.next_request = datetime.datetime.now() self.next_request = datetime.datetime.now()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment