FIX: Fixed sort order on Wanted tab so will sort in tier order first, FIX: When using the field in File Format, would always pick January/February regardless of actual publication date, FIX: Quick patch to make sure none of the Wanted issues have a Tier start date of None

This commit is contained in:
evilhero 2018-09-14 09:53:46 -04:00
parent 16ae80c137
commit 2743e8fad0
3 changed files with 23 additions and 5 deletions

View File

@ -646,7 +646,7 @@
<div class="row">
<label>Deluge Host:Port </label>
<input type="text" name="deluge_host" value="${config['deluge_host']}" size="30">
<small>port uses the deluge daemon port (remote connection to daemon has to be enabled)</small>
<small>(ie. 192.168.1.2:58846) port uses the deluge daemon port (remote connection to daemon has to be enabled)</small>
</div>
<div class="row">
<label>Deluge Username</label>

View File

@ -789,7 +789,7 @@ def fullmonth(monthno):
monthconv = None
for numbs in basmonths:
if numbs in str(int(monthno)):
if int(numbs) == int(monthno):
monthconv = basmonths[numbs]
return monthconv
@ -3775,6 +3775,20 @@ def lookupthebitches(filelist, folder, nzbname, nzbid, prov, hash, pulldate):
mylar.updater.foundsearch(x['comicid'], x['issueid'], mode=mode, provider=prov, hash=hash)
def DateAddedFix():
import db
myDB = db.DBConnection()
DA_A = datetime.datetime.today()
DateAdded = DA_A.strftime('%Y-%m-%d')
issues = myDB.select("SELECT IssueID FROM issues WHERE Status='Wanted' and DateAdded is NULL")
for da in issues:
myDB.upsert("issues", {'DateAdded': DateAdded}, {'IssueID': da[0]})
annuals = myDB.select("SELECT IssueID FROM annuals WHERE Status='Wanted' and DateAdded is NULL")
for an in annuals:
myDB.upsert("annuals", {'DateAdded': DateAdded}, {'IssueID': an[0]})
def file_ops(path,dst,arc=False,one_off=False):
# # path = source path + filename
# # dst = destination path + filename

View File

@ -2022,6 +2022,10 @@ class WebInterface(object):
futureupcoming = sorted(futureupcoming, key=itemgetter('IssueDate', 'ComicName', 'IssueNumber'), reverse=True)
#fix None DateAdded points here
helpers.DateAddedFix()
issues = myDB.select("SELECT * from issues WHERE Status='Wanted'")
if mylar.CONFIG.UPCOMING_STORYARCS is True:
arcs = myDB.select("SELECT * from storyarcs WHERE Status='Wanted'")
@ -2061,9 +2065,9 @@ class WebInterface(object):
ann_list += annuals_list
issues += annuals_list
issues_tmp1 = sorted(issues, key=itemgetter('DateAdded'), reverse=True)
issues_tmp = sorted(issues_tmp1, key=itemgetter('ReleaseDate'), reverse=True)
issues = sorted(issues_tmp, key=itemgetter('Status'), reverse=True)
issues_tmp = sorted(issues, key=itemgetter('ReleaseDate'), reverse=True)
issues_tmp1 = sorted(issues_tmp, key=itemgetter('DateAdded'), reverse=True)
issues = sorted(issues_tmp1, key=itemgetter('Status'), reverse=True)
for curResult in issues:
baseissues = {'wanted': 1, 'snatched': 2, 'failed': 3}