summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2022-12-14 12:56:33 -0500
committermorpheus65535 <[email protected]>2022-12-14 12:56:33 -0500
commit2622a0896eec60ed0647175cdc42be5a971aeab0 (patch)
treeb799f9cf942322354975b138c7fde08c1548d5a0
parent383d906749656491aedf333fda6fa8f50983c2bd (diff)
downloadbazarr-2622a0896eec60ed0647175cdc42be5a971aeab0.tar.gz
bazarr-2622a0896eec60ed0647175cdc42be5a971aeab0.zip
Fixed Plex webhook trying to search for subtitles for pre-roll video. #2013
-rw-r--r--bazarr/api/webhooks/plex.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bazarr/api/webhooks/plex.py b/bazarr/api/webhooks/plex.py
index f1b6d27a0..89cfe89aa 100644
--- a/bazarr/api/webhooks/plex.py
+++ b/bazarr/api/webhooks/plex.py
@@ -35,6 +35,9 @@ class WebHooksPlex(Resource):
args = self.post_request_parser.parse_args()
json_webhook = args.get('payload')
parsed_json_webhook = json.loads(json_webhook)
+ if 'Guid' not in parsed_json_webhook['Metadata']:
+ logging.debug('No GUID provided in Plex json payload. Probably a pre-roll video.')
+ return "No GUID found in JSON request body", 200
event = parsed_json_webhook['event']
if event not in ['media.play']: