cache image, download log etc.

This commit is contained in:
Hellowlol 2016-05-09 00:44:02 +02:00
parent 21fcbd85d8
commit 9ae441b75a
7 changed files with 452 additions and 375 deletions

View file

@ -75,7 +75,7 @@ def initialize(options):
plexpy.HTTP_ROOT = options['http_root'] = '/'
else:
plexpy.HTTP_ROOT = options['http_root'] = '/' + options['http_root'].strip('/') + '/'
cherrypy.config.update(options_dict)
conf = {
@ -178,6 +178,17 @@ def initialize(options):
'tools.auth.on': False,
'tools.sessions.on': False
},
'/pms_image_proxy': {
'tools.staticdir.on': True,
'tools.staticdir.dir': os.path.join(plexpy.CONFIG.CACHE_DIR, 'images'),
'tools.caching.on': True,
'tools.caching.force': True,
'tools.caching.delay': 0,
'tools.expires.on': True,
'tools.expires.secs': 60 * 60 * 24 * 30, # 30 days
'tools.auth.on': False,
'tools.sessions.on': False
},
'/favicon.ico': {
'tools.staticfile.on': True,
'tools.staticfile.filename': os.path.abspath(os.path.join(plexpy.PROG_DIR, 'data/interfaces/default/images/favicon.ico')),