mirror of https://github.com/evilhero/mylar
FIX:(#1316) Attempted fix for Wanted section being broken after recent update
This commit is contained in:
parent
27e368178d
commit
4c192e3c67
|
@ -50,7 +50,13 @@
|
||||||
<a href="home"><img src="images/mylarlogo.png" height="64" width="64" alt="mylar"></a>
|
<a href="home"><img src="images/mylarlogo.png" height="64" width="64" alt="mylar"></a>
|
||||||
</div>
|
</div>
|
||||||
<ul id="nav">
|
<ul id="nav">
|
||||||
<li><a href="upcoming">wanted</a></li>
|
<li>
|
||||||
|
%if mylar.WANTED_TAB_OFF:
|
||||||
|
<a href="#">wanted</a>
|
||||||
|
%else:
|
||||||
|
<a href="upcoming">wanted</a>
|
||||||
|
%endif
|
||||||
|
</li>
|
||||||
<li><a href="pullist">
|
<li><a href="pullist">
|
||||||
%if mylar.PULLNEW == 'no':
|
%if mylar.PULLNEW == 'no':
|
||||||
<img src="interfaces/default/images/grey-circle.png" height="10" width="10" />
|
<img src="interfaces/default/images/grey-circle.png" height="10" width="10" />
|
||||||
|
|
|
@ -89,6 +89,7 @@ DATA_DIR = None
|
||||||
DBLOCK = False
|
DBLOCK = False
|
||||||
|
|
||||||
UMASK = None
|
UMASK = None
|
||||||
|
WANTED_TAB_OFF = False
|
||||||
|
|
||||||
CONFIG_FILE = None
|
CONFIG_FILE = None
|
||||||
CFG = None
|
CFG = None
|
||||||
|
@ -455,7 +456,7 @@ def initialize():
|
||||||
|
|
||||||
with INIT_LOCK:
|
with INIT_LOCK:
|
||||||
global __INITIALIZED__, DBCHOICE, DBUSER, DBPASS, DBNAME, DYNAMIC_UPDATE, COMICVINE_API, DEFAULT_CVAPI, CVAPI_RATE, CV_HEADERS, BLACKLISTED_PUBLISHERS, FULL_PATH, PROG_DIR, VERBOSE, DAEMON, UPCOMING_SNATCHED, COMICSORT, DATA_DIR, CONFIG_FILE, CFG, CONFIG_VERSION, LOG_DIR, CACHE_DIR, MAX_LOGSIZE, OLDCONFIG_VERSION, OS_DETECT, \
|
global __INITIALIZED__, DBCHOICE, DBUSER, DBPASS, DBNAME, DYNAMIC_UPDATE, COMICVINE_API, DEFAULT_CVAPI, CVAPI_RATE, CV_HEADERS, BLACKLISTED_PUBLISHERS, FULL_PATH, PROG_DIR, VERBOSE, DAEMON, UPCOMING_SNATCHED, COMICSORT, DATA_DIR, CONFIG_FILE, CFG, CONFIG_VERSION, LOG_DIR, CACHE_DIR, MAX_LOGSIZE, OLDCONFIG_VERSION, OS_DETECT, \
|
||||||
queue, LOCAL_IP, EXT_IP, HTTP_PORT, HTTP_HOST, HTTP_USERNAME, HTTP_PASSWORD, HTTP_ROOT, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, HTTPS_CHAIN, HTTPS_FORCE_ON, HOST_RETURN, API_ENABLED, API_KEY, DOWNLOAD_APIKEY, LAUNCH_BROWSER, GIT_PATH, SAFESTART, NOWEEKLY, AUTO_UPDATE, \
|
queue, WANTED_TAB_OFF, LOCAL_IP, EXT_IP, HTTP_PORT, HTTP_HOST, HTTP_USERNAME, HTTP_PASSWORD, HTTP_ROOT, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, HTTPS_CHAIN, HTTPS_FORCE_ON, HOST_RETURN, API_ENABLED, API_KEY, DOWNLOAD_APIKEY, LAUNCH_BROWSER, GIT_PATH, SAFESTART, NOWEEKLY, AUTO_UPDATE, \
|
||||||
IMPORT_STATUS, IMPORT_FILES, IMPORT_TOTALFILES, IMPORT_CID_COUNT, IMPORT_PARSED_COUNT, IMPORT_FAILURE_COUNT, CHECKENABLED, \
|
IMPORT_STATUS, IMPORT_FILES, IMPORT_TOTALFILES, IMPORT_CID_COUNT, IMPORT_PARSED_COUNT, IMPORT_FAILURE_COUNT, CHECKENABLED, \
|
||||||
CURRENT_VERSION, LATEST_VERSION, CHECK_GITHUB, CHECK_GITHUB_ON_STARTUP, CHECK_GITHUB_INTERVAL, GIT_USER, GIT_BRANCH, USER_AGENT, DESTINATION_DIR, MULTIPLE_DEST_DIRS, CREATE_FOLDERS, DELETE_REMOVE_DIR, \
|
CURRENT_VERSION, LATEST_VERSION, CHECK_GITHUB, CHECK_GITHUB_ON_STARTUP, CHECK_GITHUB_INTERVAL, GIT_USER, GIT_BRANCH, USER_AGENT, DESTINATION_DIR, MULTIPLE_DEST_DIRS, CREATE_FOLDERS, DELETE_REMOVE_DIR, \
|
||||||
DOWNLOAD_DIR, USENET_RETENTION, SEARCH_INTERVAL, NZB_STARTUP_SEARCH, INTERFACE, DUPECONSTRAINT, DDUMP, DUPLICATE_DUMP, AUTOWANT_ALL, AUTOWANT_UPCOMING, ZERO_LEVEL, ZERO_LEVEL_N, COMIC_COVER_LOCAL, HIGHCOUNT, \
|
DOWNLOAD_DIR, USENET_RETENTION, SEARCH_INTERVAL, NZB_STARTUP_SEARCH, INTERFACE, DUPECONSTRAINT, DDUMP, DUPLICATE_DUMP, AUTOWANT_ALL, AUTOWANT_UPCOMING, ZERO_LEVEL, ZERO_LEVEL_N, COMIC_COVER_LOCAL, HIGHCOUNT, \
|
||||||
|
@ -1096,6 +1097,10 @@ def initialize():
|
||||||
logger.info('Search interval too low. Resetting to 6 hour minimum')
|
logger.info('Search interval too low. Resetting to 6 hour minimum')
|
||||||
SEARCH_INTERVAL = 360
|
SEARCH_INTERVAL = 360
|
||||||
|
|
||||||
|
# set the current week for the pull-list
|
||||||
|
todaydate = datetime.datetime.today()
|
||||||
|
CURRENT_WEEKNUMBER = todaydate.strftime("%U")
|
||||||
|
CURRENT_YEAR = todaydate.strftime("%Y")
|
||||||
|
|
||||||
# Initialize the database
|
# Initialize the database
|
||||||
logger.info('Checking to see if the database has all tables....')
|
logger.info('Checking to see if the database has all tables....')
|
||||||
|
@ -1204,11 +1209,6 @@ def initialize():
|
||||||
delay=60)
|
delay=60)
|
||||||
|
|
||||||
|
|
||||||
# set the current week for the pull-list
|
|
||||||
todaydate = datetime.datetime.today()
|
|
||||||
CURRENT_WEEKNUMBER = todaydate.strftime("%U")
|
|
||||||
CURRENT_YEAR = todaydate.strftime("%Y")
|
|
||||||
|
|
||||||
# Store the original umask
|
# Store the original umask
|
||||||
UMASK = os.umask(0)
|
UMASK = os.umask(0)
|
||||||
os.umask(UMASK)
|
os.umask(UMASK)
|
||||||
|
|
|
@ -1809,6 +1809,15 @@ class WebInterface(object):
|
||||||
# pulldate = re.sub("[^0-9]", "", pulldate) #convert pulldate to numerics only (should be in yyyymmdd)
|
# pulldate = re.sub("[^0-9]", "", pulldate) #convert pulldate to numerics only (should be in yyyymmdd)
|
||||||
|
|
||||||
# if int(tmpdate) >= int(timenow) and int(tmpdate) == int(pulldate): #int(pulldate) <= int(timenow):
|
# if int(tmpdate) >= int(timenow) and int(tmpdate) == int(pulldate): #int(pulldate) <= int(timenow):
|
||||||
|
mylar.WANTED_TAB_OFF = False
|
||||||
|
try:
|
||||||
|
ab = upc['weeknumber']
|
||||||
|
except TypeError:
|
||||||
|
logger.warn('Weekly Pull hasn\'t finished being generated as of yet (or has yet to initialize). Try to wait a few seconds more to accomodate processing.')
|
||||||
|
mylar.WANTED_TAB_OFF = True
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
if int(upc['weeknumber']) == int(weeknumber) and int(upc['year']) == int(weekyear):
|
if int(upc['weeknumber']) == int(weeknumber) and int(upc['year']) == int(weekyear):
|
||||||
if upc['Status'] == 'Wanted':
|
if upc['Status'] == 'Wanted':
|
||||||
upcoming_count +=1
|
upcoming_count +=1
|
||||||
|
|
|
@ -423,6 +423,9 @@ def pullit(forcecheck=None):
|
||||||
|
|
||||||
newtxtfile.close()
|
newtxtfile.close()
|
||||||
|
|
||||||
|
if pulldate == '00000000' and ALT_PULL != 2:
|
||||||
|
pulldate = shipdate
|
||||||
|
|
||||||
weektmp = datetime.date(*(int(s) for s in pulldate.split('-')))
|
weektmp = datetime.date(*(int(s) for s in pulldate.split('-')))
|
||||||
weeknumber = weektmp.strftime("%U")
|
weeknumber = weektmp.strftime("%U")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue