From 2622a0896eec60ed0647175cdc42be5a971aeab0 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Wed, 14 Dec 2022 12:56:33 -0500 Subject: [PATCH] Fixed Plex webhook trying to search for subtitles for pre-roll video. #2013 --- bazarr/api/webhooks/plex.py | 3 +++ 1 file changed, 3 insertions(+) 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']: