diff options
| author | joshjryan <joshjryan@gmail.com> | 2024-10-04 07:51:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-04 06:51:08 -0600 |
| commit | 3edd6ab767e2a3ae30a740ae851bc4b96e12afc6 (patch) | |
| tree | bec70758f7d416ba9df79c227ed117b940e0fd02 | |
| parent | b496f979f02c6b65a2a6f1887558d8cbd9d8d7b6 (diff) | |
Fix allow inputContainer to be null for Live TV (#12770)
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 4a666ac47..a25ddc367 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -389,9 +389,10 @@ namespace MediaBrowser.Model.Dlna /// <param name="type">The <see cref="DlnaProfileType"/>.</param> /// <param name="playProfile">The <see cref="DirectPlayProfile"/> object to get the video stream from.</param> /// <returns>The normalized input container.</returns> - public static string NormalizeMediaSourceFormatIntoSingleContainer(string inputContainer, DeviceProfile? profile, DlnaProfileType type, DirectPlayProfile? playProfile = null) + public static string? NormalizeMediaSourceFormatIntoSingleContainer(string inputContainer, DeviceProfile? profile, DlnaProfileType type, DirectPlayProfile? playProfile = null) { - if (profile is null || !inputContainer.Contains(',', StringComparison.OrdinalIgnoreCase)) + // If the source is Live TV the inputContainer will be null until the mediasource is probed on first access + if (profile is null || string.IsNullOrEmpty(inputContainer) || !inputContainer.Contains(',', StringComparison.OrdinalIgnoreCase)) { return inputContainer; } |
