[26] better mdblist error

pull/811/head
meisnate12 3 years ago
parent e05db11b02
commit 9a1a1adf33

BIN
.github/git.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -17,11 +17,12 @@ jobs:
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
title: Plex Meta Manager Nightly Commits
title: Nightly Commits
commits: "true"
username: Metabot
avatar_url: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/nightly/.github/pmm.png
author: Github Nightly
author: Github
author_icon_url: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/nightly/.github/git.png
- name: Check Out Repo
uses: actions/checkout@v3

@ -1 +1 @@
1.16.2-develop25
1.16.2-develop26

@ -1,4 +1,5 @@
from datetime import datetime
from json import JSONDecodeError
from modules import util
from modules.util import Failed
from urllib.parse import urlparse
@ -171,6 +172,9 @@ class Mdblist:
url_base = parsed_url._replace(query=None).geturl()
url_base = url_base if url_base.endswith("/") else f"{url_base}/"
url_base = url_base if url_base.endswith("json/") else f"{url_base}json/"
try:
return [(i["imdb_id"], "imdb") for i in self.config.get_json(url_base, headers=headers, params=params)]
except JSONDecodeError:
raise Failed(f"Mdblist Error: Invalid Response")
else:
raise Failed(f"Mdblist Error: Method {method} not supported")

Loading…
Cancel
Save