diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-08-30 17:45:04 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-08-30 17:45:04 -0400 |
| commit | 402e80dac3fcf14cbba5244f30c0f0b04dd90d1a (patch) | |
| tree | 8dc51729ad7c9ddde21a07bb74ba67a023120c92 /MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs | |
| parent | 85e3a9039863c8bfdfee3ceeb20252a566230ce0 (diff) | |
added IsIdRoot helper
Diffstat (limited to 'MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs')
| -rw-r--r-- | MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs | 7 |
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); |
