Filter for paid channels
This commit is contained in:
@ -132,9 +132,15 @@ class FreeboxMoviePlanner:
|
|||||||
movie.url = 'https://www.themoviedb.org/movie/{}?language={}' \
|
movie.url = 'https://www.themoviedb.org/movie/{}?language={}' \
|
||||||
.format(movie.tmdb_id, self.config['tmdb-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]
|
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):
|
def _findMovieOnTMDB(self, movie):
|
||||||
logging.info("Searching for '{}' on TMDB".format(movie))
|
logging.info("Searching for '{}' on TMDB".format(movie))
|
||||||
search = tmdbsimple.Search()
|
search = tmdbsimple.Search()
|
||||||
@ -156,5 +162,6 @@ if __name__ == '__main__':
|
|||||||
)
|
)
|
||||||
fmp = FreeboxMoviePlanner(TVGuideScraper.findAllMovies())
|
fmp = FreeboxMoviePlanner(TVGuideScraper.findAllMovies())
|
||||||
fmp.findMoviesOnTMDB()
|
fmp.findMoviesOnTMDB()
|
||||||
fmp.filterBadRatings()
|
fmp.excludeBadRatings()
|
||||||
|
fmp.excludePaidChannels()
|
||||||
fmp.printAllMovies()
|
fmp.printAllMovies()
|
||||||
|
Reference in New Issue
Block a user