Exemplo n.º 1
0
 def _file_path(self, template, episode):
     relative_path = template.format(
         name=episode.series.canonical_name,
         formatted=self._format_name(episode.series.canonical_name),
         season=episode.season.number,
         episode=episode.number,
         ext='*',
     )
     return first_valid(self._path.glob(relative_path))
Exemplo n.º 2
0
 def _file_path(self, template, movie):
     relative_path = template.format(title=movie.title, ext='*')
     return first_valid(self._path.glob(relative_path))
Exemplo n.º 3
0
 def movie_subtitle_path(self, movie):
     results = [c.subtitle_path(movie) for c in self._movie_collections]
     return first_valid(results)
Exemplo n.º 4
0
 def episode_subtitle_path(self, episode):
     results = [c.subtitle_path(episode) for c in self._episode_collections]
     return first_valid(results)
Exemplo n.º 5
0
 def movie(self, title, **kw):
     return first_valid(self.movies(title=title, **kw))
Exemplo n.º 6
0
 def season(self, series, number):
     return first_valid(self.seasons(series=series, numbers=[number]))
Exemplo n.º 7
0
 def episode(self, series, season, number, **kw):
     return first_valid(
         self.episodes(series=series, season=season, numbers=[number],
                       **kw))