diff --git a/couchpotato/core/media/movie/providers/automation/popular_movies/__init__.py b/couchpotato/core/media/movie/providers/automation/popular_movies/__init__.py deleted file mode 100644 index e2eace30..00000000 --- a/couchpotato/core/media/movie/providers/automation/popular_movies/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -from .main import PopularMovies - -def start(): - return PopularMovies() - -config = [{ - 'name': 'popular_movies', - 'groups': [ - { - 'tab': 'automation', - 'list': 'automation_providers', - 'name': 'popular_movies_automation', - 'label': 'Popular Movies', - 'description': 'Imports the top titles of movies that have been in theaters.', - 'options': [ - { - 'name': 'automation_enabled', - 'default': False, - 'type': 'enabler', - }, - ], - }, - ], -}] diff --git a/couchpotato/core/media/movie/providers/automation/popular_movies/main.py b/couchpotato/core/media/movie/providers/automation/popular_movies/main.py deleted file mode 100644 index 6c56cf5a..00000000 --- a/couchpotato/core/media/movie/providers/automation/popular_movies/main.py +++ /dev/null @@ -1,22 +0,0 @@ -from couchpotato.core.logger import CPLog -from couchpotato.core.providers.automation.base import Automation -import datetime - -log = CPLog(__name__) - - -class PopularMovies(Automation): - - interval = 1800 - url = 'https://s3.amazonaws.com/popular-movies/movies.json' - - def getIMDBids(self): - - movies = [] - retrieved_movies = self.getJsonData(self.url) - - for movie in retrieved_movies.get('movies'): - imdb_id = movie.get('imdb_id') - movies.append(imdb_id) - - return movies diff --git a/couchpotato/core/media/movie/providers/automation/popularmovies.py b/couchpotato/core/media/movie/providers/automation/popularmovies.py new file mode 100644 index 00000000..a1418c2b --- /dev/null +++ b/couchpotato/core/media/movie/providers/automation/popularmovies.py @@ -0,0 +1,44 @@ +from couchpotato.core.logger import CPLog +from couchpotato.core.media.movie.providers.automation.base import Automation + +log = CPLog(__name__) + +autoload = 'PopularMovies' + + +class PopularMovies(Automation): + + interval = 1800 + url = 'https://s3.amazonaws.com/popular-movies/movies.json' + + def getIMDBids(self): + + movies = [] + retrieved_movies = self.getJsonData(self.url) + + for movie in retrieved_movies.get('movies'): + imdb_id = movie.get('imdb_id') + movies.append(imdb_id) + + return movies + + +config = [{ + 'name': 'popular_movies', + 'groups': [ + { + 'tab': 'automation', + 'list': 'automation_providers', + 'name': 'popular_movies_automation', + 'label': 'Popular Movies', + 'description': 'Imports the top titles of movies that have been in theaters. Script provided by Steven Lu', + 'options': [ + { + 'name': 'automation_enabled', + 'default': False, + 'type': 'enabler', + }, + ], + }, + ], +}]