aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/ContentDirectory/ServerItem.cs
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2022-01-07 10:23:22 +0100
committercvium <clausvium@gmail.com>2022-01-07 10:23:22 +0100
commitc658a883a2bc84b46ed73d209d2983e8a324cdce (patch)
treedabdbb5ac224e202d5433e7062e0c1b6872d1af7 /Emby.Dlna/ContentDirectory/ServerItem.cs
parent2899b77cd58456470b8dd4d01d3a8c525a9b5911 (diff)
parent6b4f5a86631e5bde93dae88553380c7ffd99b8e4 (diff)
Merge branch 'master' into keyframe_extraction_v1
# Conflicts: # Jellyfin.Api/Controllers/DynamicHlsController.cs # MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs # MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
Diffstat (limited to 'Emby.Dlna/ContentDirectory/ServerItem.cs')
-rw-r--r--Emby.Dlna/ContentDirectory/ServerItem.cs19
1 files changed, 11 insertions, 8 deletions
diff --git a/Emby.Dlna/ContentDirectory/ServerItem.cs b/Emby.Dlna/ContentDirectory/ServerItem.cs
index ff30e6e4a..df05fa966 100644
--- a/Emby.Dlna/ContentDirectory/ServerItem.cs
+++ b/Emby.Dlna/ContentDirectory/ServerItem.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using MediaBrowser.Controller.Entities;
namespace Emby.Dlna.ContentDirectory
@@ -13,24 +11,29 @@ namespace Emby.Dlna.ContentDirectory
/// Initializes a new instance of the <see cref="ServerItem"/> class.
/// </summary>
/// <param name="item">The <see cref="BaseItem"/>.</param>
- public ServerItem(BaseItem item)
+ /// <param name="stubType">The stub type.</param>
+ public ServerItem(BaseItem item, StubType? stubType)
{
Item = item;
- if (item is IItemByName && item is not Folder)
+ if (stubType.HasValue)
+ {
+ StubType = stubType;
+ }
+ else if (item is IItemByName and not Folder)
{
StubType = Dlna.ContentDirectory.StubType.Folder;
}
}
/// <summary>
- /// Gets or sets the underlying base item.
+ /// Gets the underlying base item.
/// </summary>
- public BaseItem Item { get; set; }
+ public BaseItem Item { get; }
/// <summary>
- /// Gets or sets the DLNA item type.
+ /// Gets the DLNA item type.
/// </summary>
- public StubType? StubType { get; set; }
+ public StubType? StubType { get; }
}
}