From 2ed603f2886caa301ae11701fc7358374183766e Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sun, 16 Mar 2025 15:25:29 -0400 Subject: [PATCH 01/19] Fix typos (#2520) Found via codespell --- README.md | 2 +- Tautulli.py | 2 +- plexpy/activity_pinger.py | 2 +- plexpy/config.py | 2 +- plexpy/datatables.py | 2 +- plexpy/mobile_app.py | 2 +- plexpy/notification_handler.py | 4 ++-- plexpy/notifiers.py | 2 +- plexpy/webauth.py | 2 +- plexpy/webserve.py | 12 ++++++------ 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1f24741e..37829290 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ This is free software under the GPL v3 open source license. Feel free to do with but any modification must be open sourced. A copy of the license is included. This software includes Highsoft software libraries which you may freely distribute for -non-commercial use. Commerical users must licence this software, for more information visit +non-commercial use. Commercial users must licence this software, for more information visit https://shop.highsoft.com/faq/non-commercial#non-commercial-redistribution. diff --git a/Tautulli.py b/Tautulli.py index 200cd39d..b3cf4736 100755 --- a/Tautulli.py +++ b/Tautulli.py @@ -129,7 +129,7 @@ def main(): if args.quiet: plexpy.QUIET = True - # Do an intial setup of the logger. + # Do an initial setup of the logger. # Require verbose for pre-initilization to see critical errors logger.initLogger(console=not plexpy.QUIET, log_dir=False, verbose=True) diff --git a/plexpy/activity_pinger.py b/plexpy/activity_pinger.py index 9e8487fb..22688027 100644 --- a/plexpy/activity_pinger.py +++ b/plexpy/activity_pinger.py @@ -173,7 +173,7 @@ def check_active_sessions(ws_request=False): row_id = monitor_process.write_session_history(session=stream) if row_id: - # If session is written to the databaase successfully, remove the session from the session table + # If session is written to the database successfully, remove the session from the session table logger.debug("Tautulli Monitor :: Removing sessionKey %s ratingKey %s from session queue" % (stream['session_key'], stream['rating_key'])) monitor_process.delete_session(row_id=row_id) diff --git a/plexpy/config.py b/plexpy/config.py index c41e3b59..3e9862ff 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -568,7 +568,7 @@ class Config(object): def _upgrade(self): """ - Upgrades config file from previous verisions and bumps up config version + Upgrades config file from previous versions and bumps up config version """ if self.CONFIG_VERSION == 0: self.CONFIG_VERSION = 1 diff --git a/plexpy/datatables.py b/plexpy/datatables.py index 68c76c57..0cc94760 100644 --- a/plexpy/datatables.py +++ b/plexpy/datatables.py @@ -283,7 +283,7 @@ def extract_columns(columns=None, match_columns=None): columns_string = columns_string.rstrip(', ') # We return a dict of the column params - # column_string is a comma seperated list of the exact column variables received. + # column_string is a comma separated list of the exact column variables received. # column_literal is the text before the "as" if we have an "as". Usually a function. # column_named is the text after the "as", if we have an "as". Any table prefix is also stripped off. # We use this to match with columns received from the Datatables request. diff --git a/plexpy/mobile_app.py b/plexpy/mobile_app.py index f3c835c3..8ba075d5 100644 --- a/plexpy/mobile_app.py +++ b/plexpy/mobile_app.py @@ -132,7 +132,7 @@ def set_mobile_device_config(mobile_device_id=None, **kwargs): if str(mobile_device_id).isdigit(): mobile_device_id = int(mobile_device_id) else: - logger.error("Tautulli MobileApp :: Unable to set exisiting mobile device: invalid mobile_device_id %s." % mobile_device_id) + logger.error("Tautulli MobileApp :: Unable to set existing mobile device: invalid mobile_device_id %s." % mobile_device_id) return False keys = {'id': mobile_device_id} diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 56ac9df6..ada7dcfb 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -955,7 +955,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m now_iso = now.isocalendar() available_params = { - # Global paramaters + # Global parameters 'tautulli_version': common.RELEASE, 'tautulli_remote': plexpy.CONFIG.GIT_REMOTE, 'tautulli_branch': plexpy.CONFIG.GIT_BRANCH, @@ -1267,7 +1267,7 @@ def build_server_notify_params(notify_action=None, **kwargs): now_iso = now.isocalendar() available_params = { - # Global paramaters + # Global parameters 'tautulli_version': common.RELEASE, 'tautulli_remote': plexpy.CONFIG.GIT_REMOTE, 'tautulli_branch': plexpy.CONFIG.GIT_BRANCH, diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 2029aa01..b44caf82 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -4055,7 +4055,7 @@ class TAUTULLIREMOTEAPP(Notifier): } else: logger.warn("Tautulli Notifiers :: Cryptography library is missing. " - "Tautulli Remote app notifications will be sent unecrypted. " + "Tautulli Remote app notifications will be sent unencrypted. " "Install the library to encrypt the notifications.") payload = {'app_id': mobile_app._ONESIGNAL_APP_ID, diff --git a/plexpy/webauth.py b/plexpy/webauth.py index 05c81a81..c4b83ab7 100644 --- a/plexpy/webauth.py +++ b/plexpy/webauth.py @@ -50,7 +50,7 @@ def plex_user_login(token=None, headers=None): user_token = None user_id = None - # Try to login to Plex.tv to check if the user has a vaild account + # Try to login to Plex.tv to check if the user has a valid account if token: plex_tv = PlexTV(token=token, headers=headers) plex_user = plex_tv.get_plex_account_details() diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 6ea9aa63..0349e6e8 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -608,7 +608,7 @@ class WebInterface(object): status_message = '' else: result = None - status_message = 'An error occured.' + status_message = 'An error occurred.' return serve_template(template_name="edit_library.html", title="Edit Library", data=result, server_id=plexpy.CONFIG.PMS_IDENTIFIER, status_message=status_message) @@ -1347,7 +1347,7 @@ class WebInterface(object): status_message = '' else: result = None - status_message = 'An error occured.' + status_message = 'An error occurred.' return serve_template(template_name="edit_user.html", title="Edit User", data=result, status_message=status_message) @@ -1365,7 +1365,7 @@ class WebInterface(object): keep_history (int): 0 or 1 allow_guest (int): 0 or 1 - Optional paramters: + Optional parameters: None Returns: @@ -3031,7 +3031,7 @@ class WebInterface(object): """ Delete the Tautulli notification logs. ``` - Required paramters: + Required parameters: None Optional parameters: @@ -3056,7 +3056,7 @@ class WebInterface(object): """ Delete the Tautulli newsletter logs. ``` - Required paramters: + Required parameters: None Optional parameters: @@ -3081,7 +3081,7 @@ class WebInterface(object): """ Delete the Tautulli login logs. ``` - Required paramters: + Required parameters: None Optional parameters: From f23d3eb81c5057633eb104963d50ccccf14a2ade Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 11 Jan 2025 15:42:15 -0800 Subject: [PATCH 02/19] Fix changelog username --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5524c4..7ce76873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## v2.15.1 (2025-01-11) * Activity: - * Fix: Detection of HDR transcodes. (Thanks @chrisdecker08) (#2412, #2466) + * Fix: Detection of HDR transcodes. (Thanks @cdecker08) (#2412, #2466) * Newsletters: * Fix: Disable basic authentication for /newsletter and /image endpoints. (#2472) * Exporter: From c70381c3ff4dec8d62d7e35be811ae93a139f05a Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:30:45 -0800 Subject: [PATCH 03/19] Fix ntfy notifications not sending if provider link is blank --- plexpy/notifiers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index b44caf82..5f231a17 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -2667,7 +2667,8 @@ class NTFY(Notifier): provider_name = pretty_metadata.get_provider_name(provider) provider_link = pretty_metadata.get_provider_link(provider) - actions.append(f"view, View on {provider_name}, {provider_link}, clear=true") + if provider_link: + actions.append(f"view, View on {provider_name}, {provider_link}, clear=true") if self.config['incl_pmslink']: plex_url = pretty_metadata.get_plex_url() From 0879b848b970ab05e67ea843bca49f607a8b0a5e Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 24 Jan 2025 10:54:15 -0800 Subject: [PATCH 04/19] Add link to library page from activity card media type icon --- .../default/current_activity_instance.html | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/data/interfaces/default/current_activity_instance.html b/data/interfaces/default/current_activity_instance.html index fcc1b592..b1b7c3aa 100644 --- a/data/interfaces/default/current_activity_instance.html +++ b/data/interfaces/default/current_activity_instance.html @@ -74,6 +74,7 @@ DOCUMENTATION :: END parent_href = page('info', data['parent_rating_key']) grandparent_href = page('info', data['grandparent_rating_key']) user_href = page('user', data['user_id']) if data['user_id'] else '#' + library_href = page('library', data['section_id']) season = short_season(data['parent_title']) %>
% if data['live']: % elif data['channel_stream'] == 0: % else: