aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/ContentDirectory/ControlHandler.cs
diff options
context:
space:
mode:
authorLinFor <linfor@gmail.com>2021-11-08 11:24:33 +0300
committerLinFor <linfor@gmail.com>2021-11-08 11:24:33 +0300
commit5c69d110cc4327d55261cdf8385117532eba2e9e (patch)
treea60ee19888c09f42b4fa3ed653def9bba598b2a0 /Emby.Dlna/ContentDirectory/ControlHandler.cs
parent3906343c9151dc0194a348bea4c256a9b5d167b1 (diff)
Samsung DLNA fixes
Diffstat (limited to 'Emby.Dlna/ContentDirectory/ControlHandler.cs')
-rw-r--r--Emby.Dlna/ContentDirectory/ControlHandler.cs27
1 files changed, 21 insertions, 6 deletions
diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs
index ac336e5dc..34e5b8a36 100644
--- a/Emby.Dlna/ContentDirectory/ControlHandler.cs
+++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs
@@ -291,9 +291,9 @@ namespace Emby.Dlna.ContentDirectory
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<Features xmlns=\"urn:schemas-upnp-org:av:avs\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:schemas-upnp-org:av:avs http://www.upnp.org/schemas/av/avs.xsd\">"
+ "<Feature name=\"samsung.com_BASICVIEW\" version=\"1\">"
- + "<container id=\"I\" type=\"object.item.imageItem\"/>"
- + "<container id=\"A\" type=\"object.item.audioItem\"/>"
- + "<container id=\"V\" type=\"object.item.videoItem\"/>"
+ + "<container id=\"0\" type=\"object.item.imageItem\"/>"
+ + "<container id=\"0\" type=\"object.item.audioItem\"/>"
+ + "<container id=\"0\" type=\"object.item.videoItem\"/>"
+ "</Feature>"
+ "</Features>";
}
@@ -800,6 +800,11 @@ namespace Emby.Dlna.ContentDirectory
}
};
+ if (limit.HasValue)
+ {
+ list = list.Take(limit.Value).ToList();
+ }
+
return new QueryResult<ServerItem>
{
Items = list,
@@ -884,6 +889,11 @@ namespace Emby.Dlna.ContentDirectory
}
};
+ if (limit.HasValue)
+ {
+ array = array.Take(limit.Value).ToArray();
+ }
+
return new QueryResult<ServerItem>
{
Items = array,
@@ -1010,6 +1020,11 @@ namespace Emby.Dlna.ContentDirectory
}
};
+ if (limit.HasValue)
+ {
+ list = list.Take(limit.Value).ToList();
+ }
+
return new QueryResult<ServerItem>
{
Items = list,
@@ -1037,7 +1052,7 @@ namespace Emby.Dlna.ContentDirectory
};
query.IsResumable = true;
- query.Limit = 10;
+ query.Limit = query.Limit ?? 10;
var result = _libraryManager.GetItemsResult(query);
@@ -1451,7 +1466,7 @@ namespace Emby.Dlna.ContentDirectory
new LatestItemsQuery
{
UserId = user.Id,
- Limit = 50,
+ Limit = query.Limit ?? 50,
IncludeItemTypes = new[] { nameof(Episode) },
ParentId = parent == null ? Guid.Empty : parent.Id,
GroupItems = false
@@ -1476,7 +1491,7 @@ namespace Emby.Dlna.ContentDirectory
new LatestItemsQuery
{
UserId = user.Id,
- Limit = 50,
+ Limit = query.Limit ?? 50,
IncludeItemTypes = new[] { nameof(Movie) },
ParentId = parent?.Id ?? Guid.Empty,
GroupItems = true