mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +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:
parent
0cfe3e22e0
commit
02d805d4bd
2 changed files with 17 additions and 9 deletions
|
@ -896,7 +896,8 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
||||||
comsize_b = entry['size']
|
comsize_b = entry['size']
|
||||||
elif entry['site'] == 'DDL':
|
elif entry['site'] == 'DDL':
|
||||||
comsize_b = helpers.human2bytes(entry['size'])
|
comsize_b = helpers.human2bytes(entry['size'])
|
||||||
except:
|
except Exception as e:
|
||||||
|
logger.warn('[ERROR] %s' % e)
|
||||||
tmpsz = entry.enclosures[0]
|
tmpsz = entry.enclosures[0]
|
||||||
comsize_b = tmpsz['length']
|
comsize_b = tmpsz['length']
|
||||||
|
|
||||||
|
@ -1178,7 +1179,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
||||||
elif ComVersChk == 0:
|
elif ComVersChk == 0:
|
||||||
logger.fdebug("Series version detected as V1 (only series in existance with that title). Bypassing Year/Volume check")
|
logger.fdebug("Series version detected as V1 (only series in existance with that title). Bypassing Year/Volume check")
|
||||||
yearmatch = "true"
|
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':
|
if parsed_comic['issue_year'][:-2] == '19' or parsed_comic['issue_year'][:-2] == '20':
|
||||||
logger.fdebug('year detected: %s' % parsed_comic['issue_year'])
|
logger.fdebug('year detected: %s' % parsed_comic['issue_year'])
|
||||||
result_comyear = parsed_comic['issue_year']
|
result_comyear = parsed_comic['issue_year']
|
||||||
|
|
|
@ -4545,13 +4545,20 @@ class WebInterface(object):
|
||||||
#----
|
#----
|
||||||
# to be implemented in the future.
|
# to be implemented in the future.
|
||||||
if mylar.INSTALL_TYPE == 'git':
|
if mylar.INSTALL_TYPE == 'git':
|
||||||
branch_history, err = mylar.versioncheck.runGit('log --pretty=format:"%h - %cr - %an - %s" -n 5')
|
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
|
#here we pass the branch_history to the pretty_git module to break it down
|
||||||
if branch_history:
|
if branch_history:
|
||||||
br_hist = self.pretty_git(branch_history)
|
br_hist = self.pretty_git(branch_history)
|
||||||
#br_hist = branch_history.replace("\n", "<br />\n")
|
try:
|
||||||
|
br_hist = u"" + br_hist.decode('utf-8')
|
||||||
|
except:
|
||||||
|
br_hist = br_hist
|
||||||
else:
|
else:
|
||||||
br_hist = err
|
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:
|
else:
|
||||||
br_hist = 'This would be a nice place to see revision history...'
|
br_hist = 'This would be a nice place to see revision history...'
|
||||||
#----
|
#----
|
||||||
|
|
Loading…
Reference in a new issue