mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-20 14:40:38 +01:00
update DisplayParent
This commit is contained in:
@@ -93,10 +93,10 @@ namespace MediaBrowser.Dlna.Didl
|
||||
}
|
||||
else
|
||||
{
|
||||
var parent = item.DisplayParent;
|
||||
if (parent != null)
|
||||
var parent = item.DisplayParentId;
|
||||
if (parent.HasValue)
|
||||
{
|
||||
element.SetAttribute("parentID", GetClientId(parent, null));
|
||||
element.SetAttribute("parentID", GetClientId(parent.Value, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,14 +499,21 @@ namespace MediaBrowser.Dlna.Didl
|
||||
{
|
||||
container.SetAttribute("id", clientId);
|
||||
|
||||
var parent = context ?? folder.DisplayParent;
|
||||
if (parent == null)
|
||||
if (context != null)
|
||||
{
|
||||
container.SetAttribute("parentID", "0");
|
||||
container.SetAttribute("parentID", GetClientId(context, null));
|
||||
}
|
||||
else
|
||||
{
|
||||
container.SetAttribute("parentID", GetClientId(parent, null));
|
||||
var parent = folder.DisplayParentId;
|
||||
if (!parent.HasValue)
|
||||
{
|
||||
container.SetAttribute("parentID", "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
container.SetAttribute("parentID", GetClientId(parent.Value, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1059,7 +1066,12 @@ namespace MediaBrowser.Dlna.Didl
|
||||
|
||||
public static string GetClientId(BaseItem item, StubType? stubType)
|
||||
{
|
||||
var id = item.Id.ToString("N");
|
||||
return GetClientId(item.Id, stubType);
|
||||
}
|
||||
|
||||
public static string GetClientId(Guid idValue, StubType? stubType)
|
||||
{
|
||||
var id = idValue.ToString("N");
|
||||
|
||||
if (stubType.HasValue)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user