1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-23 08:12:41 +00:00

FIX: UEC wouldn't write to the custom_exceptions file in the proper format, this should be resolved now

This commit is contained in:
evilhero 2013-03-16 13:59:56 -04:00
parent 9bfcb74d45
commit 4c92423cf0
2 changed files with 4 additions and 4 deletions

View file

@ -80,6 +80,7 @@
<form action="error_change" method="GET">
<input type="hidden" name="comicid" value=${comicid}>
<input type="hidden" name="comicname" value=${comicname |u}>
<input type="hidden" name="comicyear" value=${comicyear}>
<div><br/>
<label><center><strong>Didn't get it right? Enter what it should be (or the GCD-ID) here:</strong></label></center>
<center><input type="text" name="errorgcd" size="30"><input type="submit" value="Update"/></center>

View file

@ -249,7 +249,6 @@ class WebInterface(object):
def from_Exceptions(self, comicid, gcdid, comicname=None, comicyear=None, comicissues=None, comicpublisher=None):
import unicodedata
mismatch = "yes"
#print ("gcdid:" + str(gcdid))
#write it to the custom_exceptions.csv and reload it so that importer will pick it up and do it's thing :)
#custom_exceptions in this format...
#99, (comicid), (gcdid), none
@ -268,7 +267,7 @@ class WebInterface(object):
with open(str(except_file), 'a') as f:
#f.write('%s,%s,%s,%s\n' % ("99", comicid, gcdid, except_info)
f.write(exceptline.encode('ascii','replace').strip())
f.write('%s\n' % (exceptline.encode('ascii','replace').strip()))
logger.info("re-loading csv file so it's all nice and current.")
mylar.csv_load()
@ -1251,7 +1250,7 @@ class WebInterface(object):
return serve_template(templatename="config.html", title="Settings", config=config, comicinfo=comicinfo)
config.exposed = True
def error_change(self, comicid, errorgcd, comicname):
def error_change(self, comicid, errorgcd, comicname, comicyear):
# if comicname contains a "," it will break the exceptions import.
import urllib
b = urllib.unquote_plus(comicname)
@ -1262,7 +1261,7 @@ class WebInterface(object):
if errorgcd[:5].isdigit():
print ("GCD-ID detected : " + str(errorgcd)[:5])
print ("I'm assuming you know what you're doing - going to force-match for " + cname)
self.from_Exceptions(comicid=comicid,gcdid=errorgcd,comicname=cname)
self.from_Exceptions(comicid=comicid,gcdid=errorgcd,comicname=cname,comicyear=comicyear)
else:
print ("Assuming rewording of Comic - adjusting to : " + str(errorgcd))
Err_Info = mylar.cv.getComic(comicid,'comic')