mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-12 18:50:23 +01:00
Allow media without streams to playback
This commit is contained in:
@@ -223,12 +223,17 @@ namespace Jellyfin.Model.Tests
|
||||
// RokuSSPlus
|
||||
[InlineData("RokuSSPlus", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450
|
||||
[InlineData("RokuSSPlus", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450
|
||||
// no streams
|
||||
[InlineData("Chrome", "no-streams", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] // #6450
|
||||
public async Task BuildVideoItemWithDirectPlayExplicitStreams(string deviceName, string mediaSource, PlayMethod? playMethod, TranscodeReason why = (TranscodeReason)0, string transcodeMode = "DirectStream", string transcodeProtocol = "")
|
||||
{
|
||||
var options = await GetVideoOptions(deviceName, mediaSource);
|
||||
var streamCount = options.MediaSources[0].MediaStreams.Count;
|
||||
options.AudioStreamIndex = streamCount - 2;
|
||||
options.SubtitleStreamIndex = streamCount - 1;
|
||||
if (streamCount > 0)
|
||||
{
|
||||
options.AudioStreamIndex = streamCount - 2;
|
||||
options.SubtitleStreamIndex = streamCount - 1;
|
||||
}
|
||||
|
||||
var streamInfo = BuildVideoItemSimpleTest(options, playMethod, why, transcodeMode, transcodeProtocol);
|
||||
Assert.Equal(streamInfo?.AudioStreamIndex, options.AudioStreamIndex);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"Id": "f6eab7118618ab26e61e495a1853481a",
|
||||
"Path": "/Media/MyVideo-WEBDL-2160p.mp4",
|
||||
"Container": "mov,mp4,m4a,3gp,3g2,mj2",
|
||||
"Size": 6521110016,
|
||||
"Name": "MyVideo WEBDL-2160p",
|
||||
"ETag": "a2fb84b618ba2467fe377543f879e9bf",
|
||||
"RunTimeTicks": 34318510080,
|
||||
"SupportsTranscoding": true,
|
||||
"SupportsDirectStream": true,
|
||||
"SupportsDirectPlay": true,
|
||||
"SupportsProbing": true,
|
||||
"MediaStreams": [],
|
||||
"Bitrate": 15201382,
|
||||
"DefaultAudioStreamIndex": null,
|
||||
"DefaultSubtitleStreamIndex": null
|
||||
}
|
||||
Reference in New Issue
Block a user