Fix NullReferenceException in GetPathProtocol when path is null

This commit is contained in:
theguymadmax
2025-11-10 02:30:49 -05:00
parent 3b2d64995a
commit 511223aac4

View File

@@ -226,6 +226,11 @@ namespace Emby.Server.Implementations.Library
/// <inheritdoc />>
public MediaProtocol GetPathProtocol(string path)
{
if (string.IsNullOrEmpty(path))
{
return MediaProtocol.File;
}
if (path.StartsWith("Rtsp", StringComparison.OrdinalIgnoreCase))
{
return MediaProtocol.Rtsp;