diff --git a/Gamez.db b/Gamez.db
index e19fefe..bd926a0 100644
Binary files a/Gamez.db and b/Gamez.db differ
diff --git a/Gamez.ini b/Gamez.ini
index cba5c10..d4c1917 100644
--- a/Gamez.ini
+++ b/Gamez.ini
@@ -22,6 +22,7 @@ port = 8081
[Scheduler]
download_interval = 60
+game_list_update_interval = 86400
[SystemGenerated]
is_to_ignore_update = 0
@@ -29,6 +30,5 @@ ignored_version =
api_key = "ikzFRzA1Y8I1UajNJAOQ803TbTYk1vLB64A9SxrAxAw"
[Notifications]
-prowl__api =
prowl_api = ""
diff --git a/Gamez.py b/Gamez.py
index 6fa7388..1195010 100644
--- a/Gamez.py
+++ b/Gamez.py
@@ -13,7 +13,7 @@
import cherrypy.process.plugins
from cherrypy.process.plugins import Daemonizer
from lib.ConfigFunctions import CheckConfigForAllKeys
-from lib.DBFunctions import ValidateDB
+from lib.DBFunctions import ValidateDB,AddWiiGamesIfMissing,AddXbox360GamesIfMissing
from lib.Logger import LogEvent
import cherrypy.lib.auth_basic
@@ -63,16 +63,21 @@ def RunWebServer(self,isToDaemonize):
config = ConfigParser.RawConfigParser()
config.read('Gamez.ini')
interval = config.get('Scheduler','download_interval').replace('"','')
+ updateGameListInterval = config.get('Scheduler','game_list_update_interval').replace('"','')
fInterval = float(interval)
+ fUpdateGameListInterval = float(updateGameListInterval)
workerTask = cherrypy.process.plugins.BackgroundTask(fInterval,RunGameTask)
+ gameListUpdaterWorkTask = cherrypy.process.plugins.BackgroundTask(fUpdateGameListInterval,RunGameListUpdaterTask)
try:
- workerTask.start()
+ workerTask.start()
+ gameListUpdaterWorkTask.start()
LogEvent("Starting the Gamez web server")
cherrypy.quickstart(WebRoot(app_path),'/',config=conf)
except KeyboardInterrupt:
LogEvent("Shutting down Gamez")
workerTask.cancel()
+ gameListUpdaterWorkTask.cancel()
if(isToDaemonize == 1):
daemon.unsubscribe()
@@ -136,6 +141,19 @@ def RunGameTask():
errorMessage = errorMessage + " - " + str(message)
LogEvent(errorMessage)
+def RunGameListUpdaterTask():
+ try:
+ LogEvent("Updating Game Lists")
+ AddWiiGamesIfMissing()
+ LogEvent("Wii Game List Updated")
+ AddXbox360GamesIfMissing()
+ LogEvent("XBOX 360 Game List Updated")
+ except:
+ errorMessage = "Major error occured when running Update Game List scheduled tasks"
+ for message in sys.exc_info():
+ errorMessage = errorMessage + " - " + str(message)
+ LogEvent(errorMessage)
+
if __name__ == '__main__':
app_path = sys.path[0]
ValidateDB()
@@ -147,4 +165,4 @@ def RunGameTask():
if(param == "-d"):
isToDaemonize = 1
- RunApp().RunWebServer(isToDaemonize)
\ No newline at end of file
+ RunApp().RunWebServer(isToDaemonize)
diff --git a/cherrypy/__init__.pyc b/cherrypy/__init__.pyc
index 074ac4b..ce856c9 100644
Binary files a/cherrypy/__init__.pyc and b/cherrypy/__init__.pyc differ
diff --git a/cherrypy/_cpchecker.pyc b/cherrypy/_cpchecker.pyc
index 09aaaf8..c644375 100644
Binary files a/cherrypy/_cpchecker.pyc and b/cherrypy/_cpchecker.pyc differ
diff --git a/cherrypy/_cpcompat.pyc b/cherrypy/_cpcompat.pyc
index 4903aae..af2ad6f 100644
Binary files a/cherrypy/_cpcompat.pyc and b/cherrypy/_cpcompat.pyc differ
diff --git a/cherrypy/_cpconfig.pyc b/cherrypy/_cpconfig.pyc
index abc7f5a..95cd139 100644
Binary files a/cherrypy/_cpconfig.pyc and b/cherrypy/_cpconfig.pyc differ
diff --git a/cherrypy/_cpdispatch.pyc b/cherrypy/_cpdispatch.pyc
index 30ea712..7ed9757 100644
Binary files a/cherrypy/_cpdispatch.pyc and b/cherrypy/_cpdispatch.pyc differ
diff --git a/cherrypy/_cperror.pyc b/cherrypy/_cperror.pyc
index 2400775..02508ec 100644
Binary files a/cherrypy/_cperror.pyc and b/cherrypy/_cperror.pyc differ
diff --git a/cherrypy/_cplogging.pyc b/cherrypy/_cplogging.pyc
index b56c5dc..e43ce2c 100644
Binary files a/cherrypy/_cplogging.pyc and b/cherrypy/_cplogging.pyc differ
diff --git a/cherrypy/_cpreqbody.pyc b/cherrypy/_cpreqbody.pyc
index 279ca60..98f3d55 100644
Binary files a/cherrypy/_cpreqbody.pyc and b/cherrypy/_cpreqbody.pyc differ
diff --git a/cherrypy/_cprequest.pyc b/cherrypy/_cprequest.pyc
index 945f149..e010e1f 100644
Binary files a/cherrypy/_cprequest.pyc and b/cherrypy/_cprequest.pyc differ
diff --git a/cherrypy/_cpserver.pyc b/cherrypy/_cpserver.pyc
index 4d2dbab..1d2901f 100644
Binary files a/cherrypy/_cpserver.pyc and b/cherrypy/_cpserver.pyc differ
diff --git a/cherrypy/_cptools.pyc b/cherrypy/_cptools.pyc
index 5b5102c..796f500 100644
Binary files a/cherrypy/_cptools.pyc and b/cherrypy/_cptools.pyc differ
diff --git a/cherrypy/_cptree.pyc b/cherrypy/_cptree.pyc
index 0c3dc4b..ea3855a 100644
Binary files a/cherrypy/_cptree.pyc and b/cherrypy/_cptree.pyc differ
diff --git a/cherrypy/_cpwsgi.pyc b/cherrypy/_cpwsgi.pyc
index 4270099..14e7ddb 100644
Binary files a/cherrypy/_cpwsgi.pyc and b/cherrypy/_cpwsgi.pyc differ
diff --git a/cherrypy/_cpwsgi_server.pyc b/cherrypy/_cpwsgi_server.pyc
index 9f358f7..8cbac7b 100644
Binary files a/cherrypy/_cpwsgi_server.pyc and b/cherrypy/_cpwsgi_server.pyc differ
diff --git a/cherrypy/lib/__init__.pyc b/cherrypy/lib/__init__.pyc
index 816ea37..23b7cc0 100644
Binary files a/cherrypy/lib/__init__.pyc and b/cherrypy/lib/__init__.pyc differ
diff --git a/cherrypy/lib/auth.pyc b/cherrypy/lib/auth.pyc
index 941ef39..311f5c6 100644
Binary files a/cherrypy/lib/auth.pyc and b/cherrypy/lib/auth.pyc differ
diff --git a/cherrypy/lib/auth_basic.pyc b/cherrypy/lib/auth_basic.pyc
index 049d7be..fe392b6 100644
Binary files a/cherrypy/lib/auth_basic.pyc and b/cherrypy/lib/auth_basic.pyc differ
diff --git a/cherrypy/lib/auth_digest.pyc b/cherrypy/lib/auth_digest.pyc
index c56cf72..a4d9a65 100644
Binary files a/cherrypy/lib/auth_digest.pyc and b/cherrypy/lib/auth_digest.pyc differ
diff --git a/cherrypy/lib/caching.pyc b/cherrypy/lib/caching.pyc
index 44a370e..834181f 100644
Binary files a/cherrypy/lib/caching.pyc and b/cherrypy/lib/caching.pyc differ
diff --git a/cherrypy/lib/cptools.pyc b/cherrypy/lib/cptools.pyc
index 519a228..b16b9d3 100644
Binary files a/cherrypy/lib/cptools.pyc and b/cherrypy/lib/cptools.pyc differ
diff --git a/cherrypy/lib/encoding.pyc b/cherrypy/lib/encoding.pyc
index 19bd1a3..729a54d 100644
Binary files a/cherrypy/lib/encoding.pyc and b/cherrypy/lib/encoding.pyc differ
diff --git a/cherrypy/lib/httpauth.pyc b/cherrypy/lib/httpauth.pyc
index c107cd9..559d7ab 100644
Binary files a/cherrypy/lib/httpauth.pyc and b/cherrypy/lib/httpauth.pyc differ
diff --git a/cherrypy/lib/httputil.pyc b/cherrypy/lib/httputil.pyc
index 004a7fa..3311448 100644
Binary files a/cherrypy/lib/httputil.pyc and b/cherrypy/lib/httputil.pyc differ
diff --git a/cherrypy/lib/jsontools.pyc b/cherrypy/lib/jsontools.pyc
index 904a73b..8d98595 100644
Binary files a/cherrypy/lib/jsontools.pyc and b/cherrypy/lib/jsontools.pyc differ
diff --git a/cherrypy/lib/reprconf.pyc b/cherrypy/lib/reprconf.pyc
index 359115a..a2b65a2 100644
Binary files a/cherrypy/lib/reprconf.pyc and b/cherrypy/lib/reprconf.pyc differ
diff --git a/cherrypy/lib/sessions.pyc b/cherrypy/lib/sessions.pyc
index fb553a2..7f5e77f 100644
Binary files a/cherrypy/lib/sessions.pyc and b/cherrypy/lib/sessions.pyc differ
diff --git a/cherrypy/lib/static.pyc b/cherrypy/lib/static.pyc
index a24814b..f4b96fe 100644
Binary files a/cherrypy/lib/static.pyc and b/cherrypy/lib/static.pyc differ
diff --git a/cherrypy/lib/xmlrpcutil.pyc b/cherrypy/lib/xmlrpcutil.pyc
index a2653f3..ff96f8f 100644
Binary files a/cherrypy/lib/xmlrpcutil.pyc and b/cherrypy/lib/xmlrpcutil.pyc differ
diff --git a/cherrypy/process/__init__.pyc b/cherrypy/process/__init__.pyc
index ef8813d..e6bdd55 100644
Binary files a/cherrypy/process/__init__.pyc and b/cherrypy/process/__init__.pyc differ
diff --git a/cherrypy/process/plugins.pyc b/cherrypy/process/plugins.pyc
index c0a5d49..5d62067 100644
Binary files a/cherrypy/process/plugins.pyc and b/cherrypy/process/plugins.pyc differ
diff --git a/cherrypy/process/servers.pyc b/cherrypy/process/servers.pyc
index 50fccc3..46ace09 100644
Binary files a/cherrypy/process/servers.pyc and b/cherrypy/process/servers.pyc differ
diff --git a/cherrypy/process/win32.pyc b/cherrypy/process/win32.pyc
index 1d02c21..5e37587 100644
Binary files a/cherrypy/process/win32.pyc and b/cherrypy/process/win32.pyc differ
diff --git a/cherrypy/process/wspbus.pyc b/cherrypy/process/wspbus.pyc
index 5652c7e..24e5724 100644
Binary files a/cherrypy/process/wspbus.pyc and b/cherrypy/process/wspbus.pyc differ
diff --git a/cherrypy/wsgiserver/__init__.pyc b/cherrypy/wsgiserver/__init__.pyc
index 8c3ba31..bcfbaf4 100644
Binary files a/cherrypy/wsgiserver/__init__.pyc and b/cherrypy/wsgiserver/__init__.pyc differ
diff --git a/cherrypy/wsgiserver/wsgiserver2.pyc b/cherrypy/wsgiserver/wsgiserver2.pyc
index 7aafcaf..31df821 100644
Binary files a/cherrypy/wsgiserver/wsgiserver2.pyc and b/cherrypy/wsgiserver/wsgiserver2.pyc differ
diff --git a/lib/ConfigFunctions.py b/lib/ConfigFunctions.py
index da6041b..a4f51b1 100644
--- a/lib/ConfigFunctions.py
+++ b/lib/ConfigFunctions.py
@@ -77,6 +77,10 @@ def CheckConfigForAllKeys(app_path):
if(config.has_option('Scheduler','download_interval') == False):
config.set('Scheduler','download_interval','60')
changesMade = True
+
+ if(config.has_option('Scheduler','game_list_update_interval') == False):
+ config.set('Scheduler','game_list_update_interval','86400')
+ changesMade = True
if(config.has_option('SystemGenerated','is_to_ignore_update') == False):
config.set('SystemGenerated','is_to_ignore_update','0')
diff --git a/lib/ConfigFunctions.pyc b/lib/ConfigFunctions.pyc
index 408b275..74ed01a 100644
Binary files a/lib/ConfigFunctions.pyc and b/lib/ConfigFunctions.pyc differ
diff --git a/lib/Constants.py b/lib/Constants.py
index 6829609..18b19c5 100644
--- a/lib/Constants.py
+++ b/lib/Constants.py
@@ -1,2 +1,2 @@
def VersionNumber():
- return "1.1.6.0"
+ return "1.1.7.0"
diff --git a/lib/Constants.pyc b/lib/Constants.pyc
index e306c95..2862133 100644
Binary files a/lib/Constants.pyc and b/lib/Constants.pyc differ
diff --git a/lib/DBFunctions.pyc b/lib/DBFunctions.pyc
index bd37f2c..613338a 100644
Binary files a/lib/DBFunctions.pyc and b/lib/DBFunctions.pyc differ
diff --git a/lib/GameTasks.pyc b/lib/GameTasks.pyc
index 11079bb..066b1a4 100644
Binary files a/lib/GameTasks.pyc and b/lib/GameTasks.pyc differ
diff --git a/lib/Logger.pyc b/lib/Logger.pyc
index 793a10a..0602c95 100644
Binary files a/lib/Logger.pyc and b/lib/Logger.pyc differ
diff --git a/lib/Notifications.pyc b/lib/Notifications.pyc
index 94b660b..ef5c410 100644
Binary files a/lib/Notifications.pyc and b/lib/Notifications.pyc differ
diff --git a/lib/UpgradeFunctions.pyc b/lib/UpgradeFunctions.pyc
index 4790201..5624c92 100644
Binary files a/lib/UpgradeFunctions.pyc and b/lib/UpgradeFunctions.pyc differ
diff --git a/lib/WebRoot.py b/lib/WebRoot.py
index f949836..1d53ef0 100644
--- a/lib/WebRoot.py
+++ b/lib/WebRoot.py
@@ -338,6 +338,9 @@ def settings(self):
+
+
+
@@ -548,7 +551,7 @@ def upgradetolatestversion(self,verification):
raise cherrypy.InternalRedirect("/?status_message=" + status)
@cherrypy.expose
- def savesettings(self,cherrypyHost='', nzbMatrixUsername='', downloadInterval=3600, sabPort='', nzbMatrixApi='', sabApi='', cherrypyPort='', sabHost='',gamezApiKey='',newznabHost='',newznabPort='',newznabApi='',newznabWiiCat='',newznabXbox360Cat='',prowlApi='',gamezUsername='',gamezPassword=''):
+ def savesettings(self,cherrypyHost='', nzbMatrixUsername='', downloadInterval=3600, sabPort='', nzbMatrixApi='', sabApi='', cherrypyPort='', sabHost='',gamezApiKey='',newznabHost='',newznabPort='',newznabApi='',newznabWiiCat='',newznabXbox360Cat='',prowlApi='',gamezUsername='',gamezPassword='',gameListUpdateInterval=''):
cherrypyHost = '"' + cherrypyHost + '"'
nzbMatrixUsername = '"' + nzbMatrixUsername + '"'
nzbMatrixApi = '"' + nzbMatrixApi + '"'
@@ -575,6 +578,7 @@ def savesettings(self,cherrypyHost='', nzbMatrixUsername='', downloadInterval=36
config.set('Sabnzbd','port',sabPort)
config.set('Sabnzbd','api_key',sabApi)
config.set('Scheduler','download_interval',downloadInterval)
+ config.set('Scheduler','game_list_update_interval',gameListUpdateInterval)
config.set('SystemGenerated','api_key',gamezApiKey)
config.set('Newznab','host',newznabHost)
config.set('Newznab','port',newznabPort)
@@ -624,4 +628,4 @@ def updategamelist(self):
AddWiiGamesIfMissing()
AddXbox360GamesIfMissing()
status = "Game list has been updated successfully"
- raise cherrypy.InternalRedirect("/?status_message=" + status)
\ No newline at end of file
+ raise cherrypy.InternalRedirect("/?status_message=" + status)
diff --git a/lib/WebRoot.pyc b/lib/WebRoot.pyc
index dd831f4..d9064c2 100644
Binary files a/lib/WebRoot.pyc and b/lib/WebRoot.pyc differ
diff --git a/lib/__init__.pyc b/lib/__init__.pyc
index 39721fd..b8a7567 100644
Binary files a/lib/__init__.pyc and b/lib/__init__.pyc differ
diff --git a/prowlpy/__init__.pyc b/prowlpy/__init__.pyc
index 4aa8fb6..be7935c 100644
Binary files a/prowlpy/__init__.pyc and b/prowlpy/__init__.pyc differ
diff --git a/prowlpy/prowlpy.pyc b/prowlpy/prowlpy.pyc
index 1b9bc37..981852a 100644
Binary files a/prowlpy/prowlpy.pyc and b/prowlpy/prowlpy.pyc differ