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
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
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))
def print_movie(movie): print "%s: %s (%s)" % (movie.id, utility.unicode_to_ascii(movie.title), movie.movie_year)
def print_series(series_list): for s in series_list: print "%i: %s" % (s.id, utility.unicode_to_ascii(s.title))