def create(): interval = core.CONFIG['Search']['rsssyncfrequency'] * 60 now = datetime.datetime.today() hr = now.hour min = now.minute + core.CONFIG['Search']['rsssyncfrequency'] SchedulerPlugin.ScheduledTask(hr, min, interval, search.search_all, auto_start=True, name='Movie Search')
def create(): conf = core.CONFIG['Postprocessing']['Scanner'] interval = conf['interval'] * 60 now = datetime.datetime.today() hr = now.hour minute = now.minute + interval SchedulerPlugin.ScheduledTask(hr, minute, interval, PostProcessingScan.scan_directory, auto_start=conf['enabled'], name='PostProcessing Scan') return
def create(): interval = 72 * 60 * 60 # 72 hours now = datetime.datetime.today() hr = now.hour min = now.minute SchedulerPlugin.ScheduledTask(hr, min, interval, MetadataUpdate.metadata_update, auto_start=True, name='Metadata Update') return
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() PopularMoviesSync.create() PostProcessingScan.create() TraktSync.create() core.scheduler_plugin.subscribe()
def create(): interval = 24 * 3600 hr = core.CONFIG['Search']['Watchlists']['popularmovieshour'] min = core.CONFIG['Search']['Watchlists']['popularmoviesmin'] if core.CONFIG['Search']['Watchlists']['popularmoviessync']: auto_start = True else: auto_start = False SchedulerPlugin.ScheduledTask(hr, min, interval, popular_feed.get_feed, auto_start=auto_start, name='PopularMovies Sync') return
def create(): interval = core.CONFIG['Search']['Watchlists']['imdbfrequency'] * 60 now = datetime.datetime.today() hr = now.hour min = now.minute + core.CONFIG['Search']['Watchlists']['imdbfrequency'] if core.CONFIG['Search']['Watchlists']['imdbsync']: auto_start = True else: auto_start = False SchedulerPlugin.ScheduledTask(hr, min, interval, imdb.get_rss, auto_start=auto_start, name='IMDB Sync') return
def create(): interval = core.CONFIG['Server']['checkupdatefrequency'] * 3600 now = datetime.datetime.today() hr = now.hour min = now.minute + (core.CONFIG['Server']['checkupdatefrequency'] * 60) if now.second > 30: min += 1 if core.CONFIG['Server']['checkupdates']: auto_start = True else: auto_start = False SchedulerPlugin.ScheduledTask(hr, min, interval, AutoUpdateCheck.update_check, auto_start=auto_start, name='Update Checker') return
def create(): interval = core.CONFIG['Search']['Watchlists']['traktfrequency'] * 60 now = datetime.datetime.today() hr = now.hour min = now.minute + core.CONFIG['Search']['Watchlists']['traktfrequency'] if core.CONFIG['Search']['Watchlists']['traktsync']: if any(core.CONFIG['Search']['Watchlists']['Traktlists'].keys()): auto_start = True else: logging.warning('Trakt sync enabled but no lists are enabled.') auto_start = False else: auto_start = False SchedulerPlugin.ScheduledTask(hr, min, interval, trakt.trakt_sync, auto_start=auto_start, name='Trakt Sync') return