示例#1
0
def searchTvShowsDeferred(activeShowKeys):
    if activeShowKeys is None:
        logging.info("No activeShowKeys found, exiting searchTvShowsDeferred")
        return
    if len(activeShowKeys) == 0:
        logging.info("0 activeShowKeys found, exiting searchTvShowsDeferred")
        return

    activeShows = []
    for key in activeShowKeys:
        show = TrackedSeries.get(key)
        if show is not None:
            activeShows.append(show)

    if len(activeShows) == 0:
        logging.info(
            "0 activeShows found from the keys, exiting searchTvShowsDeferred")
        return

    allSources = memcache.get("sources")
    if allSources is None:
        allSources = FileSource.all().order("name").fetch(1000)
        if allSources is not None:
            memcache.add("sources", allSources)
        else:
            return

    if filesourceparsing.ParseAndSearch.go(activeShows, allSources):
        invalidate_cache()
示例#2
0
def searchTvShowsDeferred(activeShowKeys):
    if activeShowKeys is None:
        logging.info("No activeShowKeys found, exiting searchTvShowsDeferred")
        return
    if len(activeShowKeys) == 0:
        logging.info("0 activeShowKeys found, exiting searchTvShowsDeferred")
        return

    activeShows = []
    for key in activeShowKeys:
        show = TrackedSeries.get(key)
        if show is not None:
            activeShows.append(show)

    if len(activeShows) == 0:
        logging.info("0 activeShows found from the keys, exiting searchTvShowsDeferred")
        return

    allSources = memcache.get("sources")
    if allSources is None:
        allSources = FileSource.all().order("name").fetch(1000)
        if allSources is not None:
            memcache.add("sources", allSources)
        else:
            return

    if filesourceparsing.ParseAndSearch.go(activeShows, allSources):
        invalidate_cache()
示例#3
0
 def data(self):
     return FileSource.all().order("name").fetch(1000)
示例#4
0
 def data(self):
     return FileSource.all().order("name").fetch(1000)