mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Enable TreatWarningsAsErrors for MediaBrowser.Model
This commit is contained in:
@@ -12,6 +12,18 @@ namespace MediaBrowser.Model.Dto
|
||||
{
|
||||
public class MediaSourceInfo
|
||||
{
|
||||
public MediaSourceInfo()
|
||||
{
|
||||
Formats = Array.Empty<string>();
|
||||
MediaStreams = new List<MediaStream>();
|
||||
MediaAttachments = Array.Empty<MediaAttachment>();
|
||||
RequiredHttpHeaders = new Dictionary<string, string>();
|
||||
SupportsTranscoding = true;
|
||||
SupportsDirectStream = true;
|
||||
SupportsDirectPlay = true;
|
||||
SupportsProbing = true;
|
||||
}
|
||||
|
||||
public MediaProtocol Protocol { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
@@ -31,6 +43,7 @@ namespace MediaBrowser.Model.Dto
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the media is remote.
|
||||
/// Differentiate internet url vs local network.
|
||||
/// </summary>
|
||||
public bool IsRemote { get; set; }
|
||||
@@ -95,16 +108,28 @@ namespace MediaBrowser.Model.Dto
|
||||
|
||||
public int? AnalyzeDurationMs { get; set; }
|
||||
|
||||
public MediaSourceInfo()
|
||||
[JsonIgnore]
|
||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||
|
||||
public int? DefaultAudioStreamIndex { get; set; }
|
||||
|
||||
public int? DefaultSubtitleStreamIndex { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public MediaStream VideoStream
|
||||
{
|
||||
Formats = Array.Empty<string>();
|
||||
MediaStreams = new List<MediaStream>();
|
||||
MediaAttachments = Array.Empty<MediaAttachment>();
|
||||
RequiredHttpHeaders = new Dictionary<string, string>();
|
||||
SupportsTranscoding = true;
|
||||
SupportsDirectStream = true;
|
||||
SupportsDirectPlay = true;
|
||||
SupportsProbing = true;
|
||||
get
|
||||
{
|
||||
foreach (var i in MediaStreams)
|
||||
{
|
||||
if (i.Type == MediaStreamType.Video)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void InferTotalBitrate(bool force = false)
|
||||
@@ -134,13 +159,6 @@ namespace MediaBrowser.Model.Dto
|
||||
}
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||
|
||||
public int? DefaultAudioStreamIndex { get; set; }
|
||||
|
||||
public int? DefaultSubtitleStreamIndex { get; set; }
|
||||
|
||||
public MediaStream GetDefaultAudioStream(int? defaultIndex)
|
||||
{
|
||||
if (defaultIndex.HasValue)
|
||||
@@ -175,23 +193,6 @@ namespace MediaBrowser.Model.Dto
|
||||
return null;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public MediaStream VideoStream
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (var i in MediaStreams)
|
||||
{
|
||||
if (i.Type == MediaStreamType.Video)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public MediaStream GetMediaStream(MediaStreamType type, int index)
|
||||
{
|
||||
foreach (var i in MediaStreams)
|
||||
|
||||
Reference in New Issue
Block a user