aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Model.Tests/Dlna
diff options
context:
space:
mode:
authorNiels van Velzen <nielsvanvelzen@users.noreply.github.com>2024-03-05 00:44:54 +0100
committerGitHub <noreply@github.com>2024-03-04 16:44:54 -0700
commit407cf5d0bf9d3563ae77fd34ce29ffae5af4339f (patch)
tree2640dfb680cc4f302ec2dbeeb2a7cd9536005b80 /tests/Jellyfin.Model.Tests/Dlna
parent83d2bc3f9f13c62f6d3ef16c4fe75f0f5a18110d (diff)
Add MediaStreamProtocol enum (#10153)
* Add MediaStreamProtocol enum * Add default handling for enum during deserialization --------- Co-authored-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'tests/Jellyfin.Model.Tests/Dlna')
-rw-r--r--tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs
index 909de8f72f..183997fdbf 100644
--- a/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs
+++ b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Runtime.Serialization;
using System.Text.Json;
using System.Threading.Tasks;
+using Jellyfin.Data.Enums;
using Jellyfin.Extensions.Json;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
@@ -388,21 +389,21 @@ namespace Jellyfin.Model.Tests
// Assert.Equal("webm", val.Container);
Assert.Equal(streamInfo.Container, uri.Extension);
Assert.Equal("stream", uri.Filename);
- Assert.Equal("http", streamInfo.SubProtocol);
+ Assert.Equal(MediaStreamProtocol.Http, streamInfo.SubProtocol);
}
else if (transcodeProtocol.Equals("HLS.mp4", StringComparison.Ordinal))
{
Assert.Equal("mp4", streamInfo.Container);
Assert.Equal("m3u8", uri.Extension);
Assert.Equal("master", uri.Filename);
- Assert.Equal("hls", streamInfo.SubProtocol);
+ Assert.Equal(MediaStreamProtocol.Hls, streamInfo.SubProtocol);
}
else
{
Assert.Equal("ts", streamInfo.Container);
Assert.Equal("m3u8", uri.Extension);
Assert.Equal("master", uri.Filename);
- Assert.Equal("hls", streamInfo.SubProtocol);
+ Assert.Equal(MediaStreamProtocol.Hls, streamInfo.SubProtocol);
}
// Full transcode
@@ -488,7 +489,7 @@ namespace Jellyfin.Model.Tests
}
else if (playMethod is null)
{
- Assert.Null(streamInfo.SubProtocol);
+ Assert.Equal(MediaStreamProtocol.Http, streamInfo.SubProtocol);
Assert.Equal("stream", uri.Filename);
Assert.False(streamInfo.EstimateContentLength);