Пример #1
0
    def test_get_shows(self):
        """Just make sure we can get some shows.  Yes, this is a crappy
        functional shows.
        """
        shows = sync.get_shows()
        num_shows = len(shows)
        self.assertGreaterEqual(num_shows, 1)

        show = shows[0]
        self.assertTrue(show.has_key("date"))
Пример #2
0
    def new_job(self, job):
        """kick off a new job"""

        logger.info("Starting sync job %d at %s" % (job.id, job.start))

        # download show list:
        shows = sync.get_shows()
        num_tivo_shows = len(shows)
        logger.info("Number of shows on TiVo: %d" % num_tivo_shows)

        # prune list to new things to download:
        shows = showfilter.update(job, shows)
        logger.info("Number of shows added to queue: %d" % len(shows))

        # kick off queue processing in the background:
        num_processed = self.process_queue(job)

        msg = "Sync job %d:\n" % job.id
        msg += "  %d shows scanned on TiVo.\n" % num_tivo_shows
        msg += "  %d shows added to the queue.\n\n" % len(shows)
        msg += "  %d shows processed from the queue.\n\n" % num_processed
        logger.info(msg)