aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-02-18 14:42:35 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-03-10 15:27:17 +0100
commit0da5255f1291ba510f829d36a3ca1a9eb65590dc (patch)
tree52792d3cdd252c72eed5a5a50fe269b9f1bfd7be /MediaBrowser.Model
parent47aa07c3424ce0041e0a79eea1ab7f6621485b94 (diff)
Apply review suggestions
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs7
-rw-r--r--MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs56
-rw-r--r--MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs21
3 files changed, 41 insertions, 43 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index fdf3afe97..0e814f036 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -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.
diff --git a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs
index 83f982a5c..d546ffccd 100644
--- a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs
+++ b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs
@@ -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; }
}
diff --git a/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs b/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs
index 5b7d1d03c..d39725301 100644
--- a/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs
+++ b/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs
@@ -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);
}