def sync_feed(): logging.info(u'Running automatic popular movies sync.') popular_feed = popularmovies.PopularMoviesFeed() popular_feed.get_feed() return
import time from base64 import b16encode from core import searcher, postprocessing from core.rss import imdb, popularmovies from core.cp_plugins.taskscheduler import SchedulerPlugin from core import trakt from core.library import Metadata logging = logging.getLogger(__name__) md = Metadata() pp = postprocessing.Postprocessing() search = searcher.Searcher() imdb = imdb.ImdbRss() popular_feed = popularmovies.PopularMoviesFeed() trakt = trakt.Trakt() 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()
def popularmovies_sync(): popular_feed = popularmovies.PopularMoviesFeed() popular_feed.get_feed() return