bakes82 86 Posted November 27, 2020 Share Posted November 27, 2020 Is there a way for me to edit the media source items from the API? I want to update the "Name" to a more predicable format based on meta data items. I see an IMediaSourceManager but now update end point. Is there a better way to do it like hooking into some system event instead? { "MediaSources": [ { "Protocol": "File", "Id": "2690e2cc243fbc3ea69257a5f5039372", "Path": "/home/plex/media/TV4K/13 Reasons Why (2017)/Season 1/13 Reasons Why (2017) - S01E01 - Tape 1 Side A PLAYREADY WEBDL-2160p.mkv", "Type": "Default", "Container": "mkv", "Size": 6314248224, "Name": "(2017) - S01E01 - Tape 1 Side A PLAYREADY WEBDL-2160p", "IsRemote": false, "RunTimeTicks": 31899200000, "SupportsTranscoding": true, "SupportsDirectStream": false, "SupportsDirectPlay": false, "IsInfiniteStream": false, "RequiresOpening": false, "RequiresClosing": false, "RequiresLooping": false, "SupportsProbing": false, "MediaStreams": [ { "Codec": "hevc", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "ColorSpace": "bt709", "TimeBase": "1/1000", "CodecTimeBase": "1001/24000", "VideoRange": "SDR", "DisplayTitle": "4K HEVC", "IsInterlaced": false, "BitRate": 15835502, "BitDepth": 10, "RefFrames": 1, "IsDefault": true, "IsForced": false, "Height": 2160, "Width": 3840, "AverageFrameRate": 23.976025, "RealFrameRate": 23.976025, "Profile": "Main 10", "Type": "Video", "AspectRatio": "16:9", "Index": 0, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "PixelFormat": "yuv420p10le", "Level": 150, "IsAnamorphic": false }, { "Codec": "ac3", "Language": "eng", "TimeBase": "1/1000", "CodecTimeBase": "1/48000", "DisplayTitle": "English AC3 5.1 (Default)", "DisplayLanguage": "English", "IsInterlaced": false, "ChannelLayout": "5.1", "BitRate": 384000, "Channels": 6, "SampleRate": 48000, "IsDefault": true, "IsForced": false, "Type": "Audio", "Index": 1, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File" }, { "Codec": "subrip", "Language": "eng", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "English", "DisplayTitle": "English (Default SUBRIP)", "DisplayLanguage": "English", "IsInterlaced": false, "IsDefault": true, "IsForced": false, "Type": "Subtitle", "Index": 2, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "ara", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Arabic", "DisplayTitle": "Arabic (SUBRIP)", "DisplayLanguage": "Arabic", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 3, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "chi", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Chinese (Simplified)", "DisplayTitle": "Chinese (SUBRIP)", "DisplayLanguage": "Chinese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 4, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "chi", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Chinese (Traditional)", "DisplayTitle": "Chinese (SUBRIP)", "DisplayLanguage": "Chinese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 5, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "dan", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Danish", "DisplayTitle": "Danish (SUBRIP)", "DisplayLanguage": "Danish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 6, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "dut", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Dutch", "DisplayTitle": "Dutch (SUBRIP)", "DisplayLanguage": "Dutch", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 7, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "ger", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "German", "DisplayTitle": "German (SUBRIP)", "DisplayLanguage": "German", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 8, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "gre", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Greek", "DisplayTitle": "Greek, Modern (1453-) (SUBRIP)", "DisplayLanguage": "Greek, Modern (1453-)", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 9, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "fin", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Finnish", "DisplayTitle": "Finnish (SUBRIP)", "DisplayLanguage": "Finnish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 10, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "fre", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "French", "DisplayTitle": "French (SUBRIP)", "DisplayLanguage": "French", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 11, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "heb", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Hebrew", "DisplayTitle": "Hebrew (SUBRIP)", "DisplayLanguage": "Hebrew", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 12, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "ita", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Italian", "DisplayTitle": "Italian (SUBRIP)", "DisplayLanguage": "Italian", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 13, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "jpn", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Japanese", "DisplayTitle": "Japanese (SUBRIP)", "DisplayLanguage": "Japanese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 14, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "kor", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Korean", "DisplayTitle": "Korean (SUBRIP)", "DisplayLanguage": "Korean", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 15, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "nor", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Norwegian", "DisplayTitle": "Norwegian (SUBRIP)", "DisplayLanguage": "Norwegian", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 16, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "pol", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Polish", "DisplayTitle": "Polish (SUBRIP)", "DisplayLanguage": "Polish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 17, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "por", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Portuguese (Brazilian)", "DisplayTitle": "Portuguese (SUBRIP)", "DisplayLanguage": "Portuguese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 18, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "por", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Portuguese (European)", "DisplayTitle": "Portuguese (SUBRIP)", "DisplayLanguage": "Portuguese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 19, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "rum", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Romanian", "DisplayTitle": "Romanian (SUBRIP)", "DisplayLanguage": "Romanian", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 20, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "spa", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Spanish (European)", "DisplayTitle": "Spanish (SUBRIP)", "DisplayLanguage": "Spanish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 21, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "spa", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Spanish (Latin America)", "DisplayTitle": "Spanish (SUBRIP)", "DisplayLanguage": "Spanish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 22, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "swe", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Swedish", "DisplayTitle": "Swedish (SUBRIP)", "DisplayLanguage": "Swedish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 23, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "tha", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Thai", "DisplayTitle": "Thai (SUBRIP)", "DisplayLanguage": "Thai", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 24, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "tur", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Turkish", "DisplayTitle": "Turkish (SUBRIP)", "DisplayLanguage": "Turkish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 25, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "vie", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Vietnamese", "DisplayTitle": "Vietnamese (SUBRIP)", "DisplayLanguage": "Vietnamese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 26, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" } ], "Formats": [], "Bitrate": 15835502, "RequiredHttpHeaders": {}, "DirectStreamUrl": "/videos/813/master.m3u8?DeviceId=802f2824-a5c6-4f25-99f1-341191ff2cba&MediaSourceId=2690e2cc243fbc3ea69257a5f5039372&PlaySessionId=bb17edab24a64dc8a056edd4922547dc&api_key=e26b9bfcc21c42369f45875b9c9995c5&VideoCodec=h264&AudioCodec=aac&VideoBitrate=1116000&AudioBitrate=384000&AudioStreamIndex=1&SubtitleStreamIndex=2&SubtitleMethod=Hls&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline&h264-level=52&TranscodeReasons=ContainerBitrateExceedsLimit", "TranscodingUrl": "/videos/813/master.m3u8?DeviceId=802f2824-a5c6-4f25-99f1-341191ff2cba&MediaSourceId=2690e2cc243fbc3ea69257a5f5039372&PlaySessionId=bb17edab24a64dc8a056edd4922547dc&api_key=e26b9bfcc21c42369f45875b9c9995c5&VideoCodec=h264&AudioCodec=aac&VideoBitrate=1116000&AudioBitrate=384000&AudioStreamIndex=1&SubtitleStreamIndex=2&SubtitleMethod=Hls&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline&h264-level=52&TranscodeReasons=ContainerBitrateExceedsLimit", "TranscodingSubProtocol": "hls", "TranscodingContainer": "ts", "ReadAtNativeFramerate": false, "DefaultAudioStreamIndex": 1, "DefaultSubtitleStreamIndex": 2 }, { "Protocol": "File", "Id": "0dbb0fedf9be21a87c36877dbc1bc1c2", "Path": "/home/plex/media/TVShowsCurrent/13 Reasons Why/Season 1/13 Reasons Why 2017 - S01E01 - Tape 1 Side A VLAD WEBRip-1080p.mkv", "Type": "Grouping", "Container": "mkv", "Size": 6426235097, "Name": "2017 - S01E01 - Tape 1 Side A VLAD WEBRip-1080p", "IsRemote": false, "RunTimeTicks": 31776320000, "SupportsTranscoding": true, "SupportsDirectStream": false, "SupportsDirectPlay": false, "IsInfiniteStream": false, "RequiresOpening": false, "RequiresClosing": false, "RequiresLooping": false, "SupportsProbing": false, "MediaStreams": [ { "Codec": "h264", "TimeBase": "1/1000", "CodecTimeBase": "1001/48000", "VideoRange": "SDR", "DisplayTitle": "1080p H264", "NalLengthSize": "4", "IsInterlaced": false, "IsAVC": true, "BitRate": 16178676, "BitDepth": 8, "RefFrames": 1, "IsDefault": true, "IsForced": false, "Height": 1080, "Width": 1920, "AverageFrameRate": 23.976025, "RealFrameRate": 23.976025, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": 0, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "PixelFormat": "yuv420p", "Level": 41, "IsAnamorphic": false }, { "Codec": "subrip", "Language": "eng", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "DisplayTitle": "English (Default SUBRIP)", "DisplayLanguage": "English", "IsInterlaced": false, "IsDefault": true, "IsForced": false, "Type": "Subtitle", "Index": 1, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "spa", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "DisplayTitle": "Spanish (SUBRIP)", "DisplayLanguage": "Spanish", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 2, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "fre", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "DisplayTitle": "French (SUBRIP)", "DisplayLanguage": "French", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 3, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "chi", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Traditional", "DisplayTitle": "Chinese (SUBRIP)", "DisplayLanguage": "Chinese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 4, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "subrip", "Language": "chi", "TimeBase": "1/1000", "CodecTimeBase": "0/1", "Title": "Simplified", "DisplayTitle": "Chinese (SUBRIP)", "DisplayLanguage": "Chinese", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 5, "IsExternal": false, "DeliveryMethod": "Hls", "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File" }, { "Codec": "ac3", "Language": "eng", "TimeBase": "1/1000", "CodecTimeBase": "1/48000", "DisplayTitle": "English AC3 5.1 (Default)", "DisplayLanguage": "English", "IsInterlaced": false, "ChannelLayout": "5.1", "BitRate": 384000, "Channels": 6, "SampleRate": 48000, "IsDefault": true, "IsForced": false, "Type": "Audio", "Index": 6, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File" } ], "Formats": [], "Bitrate": 16178676, "RequiredHttpHeaders": {}, "DirectStreamUrl": "/videos/813/master.m3u8?DeviceId=802f2824-a5c6-4f25-99f1-341191ff2cba&MediaSourceId=0dbb0fedf9be21a87c36877dbc1bc1c2&PlaySessionId=bb17edab24a64dc8a056edd4922547dc&api_key=e26b9bfcc21c42369f45875b9c9995c5&VideoCodec=h264&AudioCodec=aac&VideoBitrate=1116000&AudioBitrate=384000&AudioStreamIndex=6&SubtitleStreamIndex=2&SubtitleMethod=Hls&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline&h264-level=52&TranscodeReasons=ContainerBitrateExceedsLimit", "TranscodingUrl": "/videos/813/master.m3u8?DeviceId=802f2824-a5c6-4f25-99f1-341191ff2cba&MediaSourceId=0dbb0fedf9be21a87c36877dbc1bc1c2&PlaySessionId=bb17edab24a64dc8a056edd4922547dc&api_key=e26b9bfcc21c42369f45875b9c9995c5&VideoCodec=h264&AudioCodec=aac&VideoBitrate=1116000&AudioBitrate=384000&AudioStreamIndex=6&SubtitleStreamIndex=2&SubtitleMethod=Hls&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline&h264-level=52&TranscodeReasons=ContainerBitrateExceedsLimit", "TranscodingSubProtocol": "hls", "TranscodingContainer": "ts", "ReadAtNativeFramerate": false, "DefaultAudioStreamIndex": 6, "DefaultSubtitleStreamIndex": 2 } ], "PlaySessionId": "bb17edab24a64dc8a056edd4922547dc" } Link to comment Share on other sites More sharing options...
Luke 36884 Posted November 27, 2020 Share Posted November 27, 2020 It's not possible at this time. That text is generated on the fly. Link to comment Share on other sites More sharing options...
bakes82 86 Posted November 27, 2020 Author Share Posted November 27, 2020 1 hour ago, Luke said: It's not possible at this time. That text is generated on the fly. How long till it would be possibly editable/configurable, currently the multi versions pick list uses it and well its kinda pointless since its some random position based on "-" I think. Doesnt work for non standard naming conventions. Is it in the database or just on the DTO when show the data? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now