-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #613 from linaspurinis/master
mdblist.com list support
- Loading branch information
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import logging | ||
from modules.util import Failed | ||
|
||
logger = logging.getLogger("Plex Meta Manager") | ||
|
||
builders = ["mdblist_list"] | ||
base_url = "https://mdblist.com/lists" | ||
|
||
headers = { 'User-Agent': 'Plex-Meta-Manager' } | ||
|
||
class Mdblist: | ||
def __init__(self, config): | ||
self.config = config | ||
|
||
def get_mdblist_ids(self, method, data): | ||
if method == "mdblist_list": | ||
logger.info(f"Processing Mdblist.com List: {data}") | ||
return [(i["imdb_id"], "imdb") for i in self.config.get_json(data,headers=headers)] | ||
else: | ||
raise Failed(f"Mdblist Error: Method {method} not supported") |