aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2014-08-30 13:57:00 -0400
committerLuke <luke.pulverenti@gmail.com>2014-08-30 13:57:00 -0400
commit85e3a9039863c8bfdfee3ceeb20252a566230ce0 (patch)
tree9c94614cbb532998835f4645f54ed63f98a6483a /MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
parent9d36f518182bc075c19d78084870f5115fa62d1e (diff)
parentd0ac58768f9544ee85dd54fc351c7438ec8ec351 (diff)
Merge pull request #906 from 7illusions/fork
Fork
Diffstat (limited to 'MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs')
-rw-r--r--MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
index 6d5ed9eb8..563f9c59a 100644
--- a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
+++ b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
@@ -190,6 +190,8 @@ namespace MediaBrowser.Dlna.ContentDirectory
if (string.Equals(flag, "BrowseMetadata"))
{
+
+
var folder = item as Folder;
if (folder == null)
@@ -198,10 +200,12 @@ namespace MediaBrowser.Dlna.ContentDirectory
}
else
{
+
+
var childrenResult = (await GetChildrenSorted(folder, user, sortCriteria, start, requested).ConfigureAwait(false));
totalCount = childrenResult.TotalRecordCount;
- result.DocumentElement.AppendChild(_didlBuilder.GetFolderElement(result, folder, totalCount, filter));
+ result.DocumentElement.AppendChild(_didlBuilder.GetFolderElement(result, folder, totalCount, filter, id));
}
provided++;
}
@@ -237,7 +241,7 @@ namespace MediaBrowser.Dlna.ContentDirectory
{
new KeyValuePair<string,string>("Result", resXML),
new KeyValuePair<string,string>("NumberReturned", provided.ToString(_usCulture)),
- new KeyValuePair<string,string>("TotalMatches", totalCount.ToString(_usCulture)),
+ new KeyValuePair<string,string>("TotalMatches", id == "0" ? "1" :totalCount.ToString(_usCulture)),
new KeyValuePair<string,string>("UpdateID", _systemUpdateId.ToString(_usCulture))
};
}