Apply review suggestions

This commit is contained in:
Shadowghost
2023-02-18 14:42:35 +01:00
parent 47aa07c342
commit 0da5255f12
11 changed files with 420 additions and 372 deletions

View File

@@ -107,11 +107,8 @@ namespace MediaBrowser.Model.Dlna
public string MediaSourceId => MediaSource?.Id;
public bool IsDirectStream =>
!(MediaSource?.VideoType == VideoType.Dvd
|| MediaSource?.VideoType == VideoType.BluRay)
&& (PlayMethod == PlayMethod.DirectStream
|| PlayMethod == PlayMethod.DirectPlay);
public bool IsDirectStream => MediaSource?.VideoType is not (VideoType.Dvd or VideoType.BluRay)
&& PlayMethod is PlayMethod.DirectStream or PlayMethod.DirectPlay;
/// <summary>
/// Gets the audio stream that will be used.

View File

@@ -1,39 +1,41 @@
#nullable disable
#pragma warning disable CS1591
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.MediaInfo
namespace MediaBrowser.Model.MediaInfo;
/// <summary>
/// Represents the result of BDInfo output.
/// </summary>
public class BlurayDiscInfo
{
/// <summary>
/// Represents the result of BDInfo output.
/// Gets or sets the media streams.
/// </summary>
public class BlurayDiscInfo
{
/// <summary>
/// Gets or sets the media streams.
/// </summary>
/// <value>The media streams.</value>
public MediaStream[] MediaStreams { get; set; }
/// <value>The media streams.</value>
public MediaStream[] MediaStreams { get; set; }
/// <summary>
/// Gets or sets the run time ticks.
/// </summary>
/// <value>The run time ticks.</value>
public long? RunTimeTicks { get; set; }
/// <summary>
/// Gets or sets the run time ticks.
/// </summary>
/// <value>The run time ticks.</value>
public long? RunTimeTicks { get; set; }
/// <summary>
/// Gets or sets the files.
/// </summary>
/// <value>The files.</value>
public string[] Files { get; set; }
/// <summary>
/// Gets or sets the files.
/// </summary>
/// <value>The files.</value>
public string[] Files { get; set; }
public string PlaylistName { get; set; }
/// <summary>
/// Gets or sets the playlist name.
/// </summary>
/// <value>The playlist name.</value>
public string PlaylistName { get; set; }
/// <summary>
/// Gets or sets the chapters.
/// </summary>
/// <value>The chapters.</value>
public double[] Chapters { get; set; }
}
/// <summary>
/// Gets or sets the chapters.
/// </summary>
/// <value>The chapters.</value>
public double[] Chapters { get; set; }
}

View File

@@ -1,15 +1,14 @@
namespace MediaBrowser.Model.MediaInfo
namespace MediaBrowser.Model.MediaInfo;
/// <summary>
/// Interface IBlurayExaminer.
/// </summary>
public interface IBlurayExaminer
{
/// <summary>
/// Interface IBlurayExaminer.
/// Gets the disc info.
/// </summary>
public interface IBlurayExaminer
{
/// <summary>
/// Gets the disc info.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>BlurayDiscInfo.</returns>
BlurayDiscInfo GetDiscInfo(string path);
}
/// <param name="path">The path.</param>
/// <returns>BlurayDiscInfo.</returns>
BlurayDiscInfo GetDiscInfo(string path);
}