From bb01141cfc9715ed9d87b66aae74ac390cf700b2 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 20 May 2022 10:48:14 -0700 Subject: [PATCH] Fix parsing Windows path on Linux for notification filename parameter --- plexpy/notification_handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index b8a4b902..e747f3ae 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -35,7 +35,6 @@ import os import re from string import Formatter import threading -import time import musicbrainzngs @@ -1140,7 +1139,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m 'subtitle_language': notify_params['subtitle_language'], 'subtitle_language_code': notify_params['subtitle_language_code'], 'file': notify_params['file'], - 'filename': os.path.basename(notify_params['file']), + 'filename': os.path.basename(notify_params['file'].replace('\\', os.sep)), 'file_size': helpers.human_file_size(notify_params['file_size']), 'indexes': notify_params['indexes'], 'guid': notify_params['guid'],