Esempio n. 1
0
    def __init__(self):
        self.auth = AuthController()
        self.postprocessing = Postprocessing()
        self.api = api.API()

        if core.CONFIG['Server']['authrequired']:
            self._cp_config = {
                'auth.require': []
            }

        self.ajax = ajax.Ajax()
        localization.get()
        localization.install()

        # point server toward custom 404
        cherrypy.config.update({
            'error_page.404': self.error_page_404
        })

        # Lock down settings if required
        if core.CONFIG['Server']['adminrequired']:
            self.settings._cp_config['auth.require'] = [core.auth.is_admin]

        if core.CONFIG['Server']['checkupdates']:
            scheduler.AutoUpdateCheck.update_check(install=False)
Esempio n. 2
0
    def __init__(self):
        self.ajax = ajax.Ajax()

        self.conf = {
                '/': {
                    'tools.sessions.on': True,
                    'tools.sessions.timeout': 60,
                    'tools.auth.on': False,
                    'tools.staticdir.root': core.PROG_PATH
                },
                '/static': {
                    'tools.staticdir.on': True,
                    'tools.staticdir.dir': './static'
                }
            }

        # point server toward custom 404
        cherrypy.config.update({
            'error_page.404': self.error_page_404
        })

        if core.CONFIG['Server']['checkupdates'] == 'true':
            self.initial_update_check()

        return
Esempio n. 3
0
 def __init__(self):
     self.tmdb = movieinfo.TMDB()
     self.plugins = plugins.Plugins()
     self.sql = sqldb.SQL()
     self.ajax = ajax.Ajax()
     self.snatcher = snatcher.Snatcher()
     self.update = library.Status()
     self.metadata = library.Metadata()
Esempio n. 4
0
    def __init__(self):
        if core.CONFIG['Server']['authrequired']:
            self._cp_config = {'auth.require': []}

        self.ajax = ajax.Ajax()

        # point server toward custom 404
        cherrypy.config.update({'error_page.404': self.error_page_404})

        if core.CONFIG['Server']['checkupdates']:
            scheduler.AutoUpdateCheck.update_check(install=False)
Esempio n. 5
0
    def __init__(self):
        if core.CONFIG['Server']['authrequired']:
            self._cp_config = {'auth.require': []}

        self.ajax = ajax.Ajax()
        self.add_movie = add_movie.AddMovie()
        self.artists = artists.Artists()
        self.settings = settings.Settings()
        self.restart = restart.Restart()
        self.shutdown = shutdown.Shutdown()
        self.update = update.Update()
        self.import_library = import_library.ImportLibrary()

        # point server toward custom 404
        cherrypy.config.update({'error_page.404': self.error_page_404})

        if core.CONFIG['Server']['checkupdates']:
            scheduler.AutoUpdateCheck.update_check()

        return
Esempio n. 6
0
 def __init__(self):
     self.sql = sqldb.SQL()
     self.ajax = ajax.Ajax()
     self.poster = poster.Poster()
     return
Esempio n. 7
0
 def __init__(self):
     self.sql = sqldb.SQL()
     self.ajax = ajax.Ajax()
     return
Esempio n. 8
0
 def __init__(self):
     self.sql = sqldb.SQL()
     self.ajax = ajax.Ajax()
     self.rss = 'https://itunes.apple.com/WebObjects/MZStore.woa/wpa/MRSS/newreleases/sf=143441/limit=100/explicit=true/rss.xml'
     return
Esempio n. 9
0
 def __init__(self):
     self.config = config.Config()
     self.tmdb = TMDB()
     self.sql = sqldb.SQL()
     self.ajax = ajax.Ajax()
     return