mirror of https://github.com/jellyfin/jellyfin
Backport pull request #15462 from jellyfin/release-10.11.z
Fix NullReferenceException in GetPathProtocol when path is null
Original-merge: 7c1063177f
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Bond_009 <bond.009@outlook.com>
This commit is contained in:
parent
2e7d7752e9
commit
e51680cf56
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue