示例#1
0
    def generate_episode_metadata(self, episode):
        if self.format == 'pyTivo':
            if self.debug:
                print 'Generating metadata for \'%s\' season %i episode %i in pyTivo format' % (episode.series.title, episode.season_number, episode.episode_number)

            unformatted_metadata = episode.format_for_pyTivo(datetime.now())

            to_return = []
            for l in unformatted_metadata:
                to_append = utility.unicode_to_ascii(l)
                to_append = to_append + os.linesep
                to_return.append(to_append)

            return to_return
        else:
            print "Format '%s' is not a valid format.\n" % self.format
            return None
示例#2
0
    def generate_movie_metadata(self, movie):
        if self.format == 'pyTivo':
            if self.debug:
                print 'Generating metadata for movie \'%s\' in pyTivo format' % (movie.title, )

            unformatted_metadata = movie.format_for_pyTivo()

            to_return = []
            for l in unformatted_metadata:
                to_append = utility.unicode_to_ascii(l)
                to_append = to_append + os.linesep
                to_return.append(to_append)

            return to_return
        else:
            print "Format '%s' is not a valid format.\n" % self.format
            return None
示例#3
0
def print_episodes(episodes):
    for e in episodes:
        print "%s season %i, episode %i: %s" % (utility.unicode_to_ascii(e.series.title), e.season_number, e.episode_number, utility.unicode_to_ascii(e.title))
示例#4
0
def print_movie(movie):
    print "%s: %s (%s)" % (movie.id, utility.unicode_to_ascii(movie.title), movie.movie_year)
示例#5
0
def print_series(series_list):
    for s in series_list:
        print "%i: %s" % (s.id, utility.unicode_to_ascii(s.title))