From 09c28e434dd46b954a7149a0200d41c0a3d28a7e Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 23 Mar 2025 18:12:08 -0700 Subject: [PATCH] Check Pushover attachment under 5MB limit Fixes #2396 --- plexpy/notifiers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index e12fa58f..21002dd2 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -3391,8 +3391,11 @@ class PUSHOVER(Notifier): image = pretty_metadata.get_image() if image: - files = {'attachment': image} - headers = {} + if len(image[1]) <= 5242880: # 5MB max attachment size + files = {'attachment': image} + headers = {} + else: + logger.warn("Tautulli Notifiers :: Image size exceeds 5MB limit for {name}.".format(name=self.NAME)) return self.make_request('https://api.pushover.net/1/messages.json', headers=headers, data=data, files=files)