diff --git a/plexpy/common.py b/plexpy/common.py index ad91ee87..24e2b478 100644 --- a/plexpy/common.py +++ b/plexpy/common.py @@ -595,6 +595,7 @@ NOTIFICATION_PARAMETERS = [ {'name': 'Subtitle Language', 'type': 'str', 'value': 'subtitle_language', 'description': 'The subtitle language of the original media.'}, {'name': 'Subtitle Language Code', 'type': 'str', 'value': 'subtitle_language_code', 'description': 'The subtitle language code of the original media.'}, {'name': 'File', 'type': 'str', 'value': 'file', 'description': 'The file path to the item.'}, + {'name': 'File Volume Label', 'type': 'str', 'value': 'file_volume', 'description': 'Label of volume where file is stored', 'help_text': 'Windows returns letter (e.g. M:) or UNC hostname and sharepoint (e.g. //host/computer), Unix returns empty string'}, {'name': 'Filename', 'type': 'str', 'value': 'filename', 'description': 'The file name of the item.'}, {'name': 'File Size', 'type': 'int', 'value': 'file_size', 'description': 'The file size of the item.'}, {'name': 'Guid', 'type': 'str', 'value': 'guid', 'description': 'The full guid for the item.'}, diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 6b55c5b7..ae38aa50 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -1189,6 +1189,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m 'subtitle_language_code': notify_params['subtitle_language_code'], 'file': notify_params['file'], 'filename': os.path.basename(notify_params['file'].replace('\\', os.sep)), + 'file_volume': os.path.splitdrive(notify_params['file'].replace('\\', os.sep))[0], 'file_size': helpers.human_file_size(notify_params['file_size']), 'indexes': notify_params['indexes'], 'guid': notify_params['guid'],