Plex-Meta-Manager/modules/stevenlu.py

19 lines
590 B
Python
Raw Normal View History

2021-07-31 21:23:17 -04:00
import logging
from modules.util import Failed
logger = logging.getLogger("Plex Meta Manager")
builders = ["stevenlu_popular"]
base_url = "https://s3.amazonaws.com/popular-movies/movies.json"
class StevenLu:
def __init__(self, config):
self.config = config
2021-08-07 02:01:21 -04:00
def get_stevenlu_ids(self, method):
2021-07-31 21:23:17 -04:00
if method == "stevenlu_popular":
2021-08-01 00:35:42 -04:00
logger.info(f"Processing StevenLu Popular Movies")
2021-08-07 02:01:21 -04:00
return [(i["imdb_id"], "imdb") for i in self.config.get_json(base_url)]
2021-07-31 21:23:17 -04:00
else:
raise Failed(f"StevenLu Error: Method {method} not supported")