From f7c1629679bcbee56d2ccfa40cec3c79bf058661 Mon Sep 17 00:00:00 2001 From: evilhero Date: Fri, 31 Aug 2018 12:03:54 -0400 Subject: [PATCH] IMP: Tiered wanted list searching - anything older than 2 weeks will only by searched for using RSS and/or manual means (scheduled searches only), IMP: Tiered option viewable in Upcoming tab, FIX: Fixed API searching against WWT option (RSS is still broken however, as that is due to WWT), IMP: Removed cherrypy logging in some instances, IMP: Updated cfscrape library to most recent, FIX: Fixed problem with simliar titles being incorrectly post-processed due to multiple matches when manual post-processing, FIX: Fixed notifications not firing off on a successful manual post-process/folder monitor due to some previous changes, FIX: If grabbag_dir was not set, would not correctly set the location, FIX:(#2051) When using nzbget, if nzbToMylar is enabled along with CDH - warning will be issued within Mylar to indicate as such --- data/interfaces/default/config.html | 8 +- data/interfaces/default/css/data_table.css | 34 ++++++ data/interfaces/default/css/style.css | 2 + data/interfaces/default/upcoming.html | 32 ++++- lib/cfscrape/LICENSE | 21 ++++ lib/cfscrape/__init__.py | 129 ++++++++++++++------- mylar/PostProcessor.py | 96 +++++++++------ mylar/__init__.py | 29 ++++- mylar/auth32p.py | 2 +- mylar/config.py | 5 + mylar/logger.py | 3 +- mylar/mb.py | 2 +- mylar/nzbget.py | 22 +++- mylar/rsscheck.py | 59 ++++++---- mylar/search.py | 26 ++++- mylar/webserve.py | 16 ++- mylar/weeklypull.py | 8 +- mylar/wwt.py | 10 +- 18 files changed, 372 insertions(+), 132 deletions(-) create mode 100644 lib/cfscrape/LICENSE diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index eaa48fd9..eae3333b 100755 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -21,7 +21,7 @@

settingsSettings

-
+
  • Information
  • @@ -1464,10 +1464,10 @@

    Web Interface changes require a restart to take effect

    -
    +
-
- + + <%def name="javascriptIncludes()"> diff --git a/data/interfaces/default/css/data_table.css b/data/interfaces/default/css/data_table.css index 14d86a44..c7bcbf9e 100755 --- a/data/interfaces/default/css/data_table.css +++ b/data/interfaces/default/css/data_table.css @@ -357,6 +357,19 @@ table.display tr.even.gradeF { background-color: #FF5858; } +table.display tr.odd.gradeT1 { + background-color: #FFDDDD; +} +table.display tr.even.gradeT1 { + background-color: #FFDDDD; +} + +table.display tr.odd.gradeT2 { + background-color: #FFDDAA; +} +table.display tr.even.gradeT2 { + background-color: #FFDDAA; +} table.display tr.gradeL #status { background: url("../images/loader_black.gif") no-repeat scroll 15px center transparent; font-size: 11px; @@ -373,6 +386,8 @@ table.display tr.gradeP td, table.display tr.gradeD td, table.display tr.gradeT td, table.display tr.gradeF td, +table.display tr.gradeT1 td, +table.display tr.gradeT2 td, table.display tr.gradeZ td {border-bottom: 1px solid #FFF;} table.display tr:last-child td { border-bottom: 1px solid #eee; @@ -478,6 +493,23 @@ table.display_no_select tr.odd.gradeZ { table.display_no_select tr.even.gradeZ { background-color: white; } + +table.display_no_select tr.odd.gradeT1 { + background-color: #FFDDDD; +} + +table.display_no_select tr.even.gradeT1 { + background-color: white; +} + +table.display_no_select tr.odd.gradeT2 { + background-color: #FFDDAA; +} + +table.display_no_select tr.even.gradeT2 { + background-color: white; +} + table.display_no_select tr.gradeL #status { background: url("../images/loader_black.gif") no-repeat scroll 15px center transparent; font-size: 11px; @@ -494,6 +526,8 @@ table.display_no_select tr.gradeP td, table.display_no_select tr.gradeD td, table.display_no_select tr.gradeT td, table.display_no_select tr.gradeF td, +table.display_no_select tr.gradeT1 td, +table.display_no_select tr.gradeT2 td, table.display_no_select tr.gradeZ td {border-bottom: 1px solid #FFF;} table.display_no_select tr:last-child td { border-bottom: 1px solid #eee; diff --git a/data/interfaces/default/css/style.css b/data/interfaces/default/css/style.css index 5f14caf2..3fb1788a 100755 --- a/data/interfaces/default/css/style.css +++ b/data/interfaces/default/css/style.css @@ -1960,6 +1960,7 @@ DIV.progress-container > DIV } #upcoming_table th#type, #wanted_table th#type, +#wanted_table th#tier, #searchresults_table th#score { min-width: 75px; text-align: center; @@ -2010,6 +2011,7 @@ DIV.progress-container > DIV } #upcoming_table td#type, #wanted_table td#type, +#wanted_table td#tier, #searchresults_table td#score { min-width: 75px; text-align: center; diff --git a/data/interfaces/default/upcoming.html b/data/interfaces/default/upcoming.html index ca3600af..f78145f2 100755 --- a/data/interfaces/default/upcoming.html +++ b/data/interfaces/default/upcoming.html @@ -21,6 +21,7 @@
+ %if mylar.CONFIG.UPCOMING_SNATCHED is True: %if int(isCounts['Snatched']) > 0: @@ -46,7 +47,7 @@
- + Date shown in SearchTier is when the issue was added to the Wanted list @@ -54,6 +55,7 @@ + @@ -62,12 +64,25 @@ <% if issue['Status'] == 'Wanted': grade = 'X' + + try: + if issue['DateAdded'] <= mylar.SEARCH_TIER_DATE: + tier = "2nd" + grade = 'T2' + else: + tier = "1st [%s]" % issue['DateAdded'] + grade = 'X' + except: + tier = "1st [%s]" % issue['DateAdded'] + grade = 'T2' + elif issue['Status'] == 'Snatched': grade = 'C' elif issue['Status'] == 'Failed': grade = 'F' else: grade = 'Z' + %> @@ -96,6 +111,15 @@ else: adjcomicname = issue['ComicName'] endif + + try: + if issue['DateAdded'] <= mylar.SEARCH_TIER_DATE: + tier = "2nd" + else: + tier = "1st [%s]" % issue['DateAdded'] + except: + tier = "1st [%s]" % issue['DateAdded'] + %> + %if issue['Status'] == 'Wanted': + + %else: + + %endif
Comic Issue Release DateSearchTier Options
@@ -107,6 +131,11 @@ ${issuenumber} ${issue['IssueDate']}${tier}