1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-22 07:42:24 +00:00

FIX: Fix for DDL attempting to parse issue year from results that did not contain an issue year, FIX: (#2172) Attempt to fix config page not displaying branch history due to non-English locale which resulted in unicode error

This commit is contained in:
evilhero 2019-01-23 13:15:28 -05:00
parent 0cfe3e22e0
commit 02d805d4bd
2 changed files with 17 additions and 9 deletions

View file

@ -896,7 +896,8 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
comsize_b = entry['size']
elif entry['site'] == 'DDL':
comsize_b = helpers.human2bytes(entry['size'])
except:
except Exception as e:
logger.warn('[ERROR] %s' % e)
tmpsz = entry.enclosures[0]
comsize_b = tmpsz['length']
@ -1178,7 +1179,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
elif ComVersChk == 0:
logger.fdebug("Series version detected as V1 (only series in existance with that title). Bypassing Year/Volume check")
yearmatch = "true"
elif UseFuzzy == "0" or UseFuzzy == "2" or UseFuzzy is None or IssDateFix != "no":
elif any([UseFuzzy == "0", UseFuzzy == "2", UseFuzzy is None, IssDateFix != "no"]) and parsed_comic['issue_year'] is not None:
if parsed_comic['issue_year'][:-2] == '19' or parsed_comic['issue_year'][:-2] == '20':
logger.fdebug('year detected: %s' % parsed_comic['issue_year'])
result_comyear = parsed_comic['issue_year']

View file

@ -4545,13 +4545,20 @@ class WebInterface(object):
#----
# to be implemented in the future.
if mylar.INSTALL_TYPE == 'git':
branch_history, err = mylar.versioncheck.runGit('log --pretty=format:"%h - %cr - %an - %s" -n 5')
#here we pass the branch_history to the pretty_git module to break it down
if branch_history:
br_hist = self.pretty_git(branch_history)
#br_hist = branch_history.replace("\n", "<br />\n")
else:
br_hist = err
try:
branch_history, err = mylar.versioncheck.runGit('log --encoding=UTF-8 --pretty=format:"%h - %cr - %an - %s" -n 5')
#here we pass the branch_history to the pretty_git module to break it down
if branch_history:
br_hist = self.pretty_git(branch_history)
try:
br_hist = u"" + br_hist.decode('utf-8')
except:
br_hist = br_hist
else:
br_hist = err
except Exception as e:
logger.fdebug('[ERROR] Unable to retrieve git revision history for some reason: %s' % e)
br_hist = 'This would be a nice place to see revision history...'
else:
br_hist = 'This would be a nice place to see revision history...'
#----