Merge pull request #15462 from theguymadmax/fix-exception-for-empty-strm-files

Fix NullReferenceException in GetPathProtocol when path is null
This commit is contained in:
Joshua M. Boniface 2025-11-10 19:30:38 -05:00 committed by GitHub
commit 7c1063177f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

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;