- port uses the deluge daemon port (remote connection to daemon has to be enabled)
+ (ie. 192.168.1.2:58846) port uses the deluge daemon port (remote connection to daemon has to be enabled)
diff --git a/mylar/helpers.py b/mylar/helpers.py
index 699e66a2..afd1a216 100755
--- a/mylar/helpers.py
+++ b/mylar/helpers.py
@@ -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
diff --git a/mylar/webserve.py b/mylar/webserve.py
index 4815ea5f..2577744b 100644
--- a/mylar/webserve.py
+++ b/mylar/webserve.py
@@ -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}