aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs')
-rw-r--r--MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
index 563f9c59a..7a374aff3 100644
--- a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
+++ b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
@@ -241,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", id == "0" ? "1" :totalCount.ToString(_usCulture)),
+ new KeyValuePair<string,string>("TotalMatches", DidlBuilder.IsIdRoot(id) ? "1" :totalCount.ToString(_usCulture)),
new KeyValuePair<string,string>("UpdateID", _systemUpdateId.ToString(_usCulture))
};
}
@@ -535,10 +535,7 @@ namespace MediaBrowser.Dlna.ContentDirectory
private BaseItem GetItemFromObjectId(string id, User user)
{
- return string.IsNullOrWhiteSpace(id) || string.Equals(id, "0", StringComparison.OrdinalIgnoreCase)
-
- // Samsung sometimes uses 1 as root
- || string.Equals(id, "1", StringComparison.OrdinalIgnoreCase)
+ return DidlBuilder.IsIdRoot(id)
? user.RootFolder
: ParseItemId(id, user);