if core.CONFIG['Proxy']['behindproxy'] == 'true': core.URL_BASE = core.CONFIG['Proxy']['webroot'] # mount applications cherrypy.tree.mount(root, '{}/'.format(core.URL_BASE), root.conf ) cherrypy.tree.mount(api.API(), '{}/api'.format(core.URL_BASE), api.API.conf ) cherrypy.tree.mount(postprocessing.Postprocessing(), '{}/postprocessing'.format(core.URL_BASE), postprocessing.Postprocessing.conf ) auth = AuthController() cherrypy.tree.mount(auth, '{}/auth'.format(core.URL_BASE), auth.conf ) # if everything goes well so far, open the browser if passed_args.browser or core.CONFIG['Server']['launchbrowser'] == 'true': webbrowser.open("http://{}:{}{}".format( core.SERVER_ADDRESS, core.SERVER_PORT, core.URL_BASE)) logging.info('Launching web browser.')
import cherrypy import core import os import time import hashlib from core import searcher, postprocessing, downloaders, snatcher from core.rss import imdb, popularmovies from lib.cherrypyscheduler import SchedulerPlugin from core import trakt from core.library import Metadata, Manage logging = logging.getLogger(__name__) pp = postprocessing.Postprocessing() search = searcher def create_plugin(): ''' Creates plugin instance, adds tasks, and subscribes to cherrypy.engine Does not return ''' logging.info('Initializing scheduler plugin.') core.scheduler_plugin = SchedulerPlugin(cherrypy.engine, record_handler=record_handler) AutoSearch.create() AutoUpdateCheck.create() ImdbRssSync.create() MetadataUpdate.create()