Browse Source

Filter for paid channels

master
djib 2 years ago
parent
commit
fca1cb2c5a
  1. 11
      FreeboxMoviePlanner.py

11
FreeboxMoviePlanner.py

@ -132,9 +132,15 @@ class FreeboxMoviePlanner:
movie.url = 'https://www.themoviedb.org/movie/{}?language={}' \
.format(movie.tmdb_id, self.config['tmdb-language'])
def filterBadRatings(self):
def excludeBadRatings(self):
self.movies = [movie for movie in self.movies if movie.good]
def excludePaidChannels(self):
paid_channels = ['Canal+']
self.movies = [
m for m in self.movies if m.channel not in paid_channels
]
def _findMovieOnTMDB(self, movie):
logging.info("Searching for '{}' on TMDB".format(movie))
search = tmdbsimple.Search()
@ -156,5 +162,6 @@ if __name__ == '__main__':
)
fmp = FreeboxMoviePlanner(TVGuideScraper.findAllMovies())
fmp.findMoviesOnTMDB()
fmp.filterBadRatings()
fmp.excludeBadRatings()
fmp.excludePaidChannels()
fmp.printAllMovies()
Loading…
Cancel
Save