diff options
Diffstat (limited to 'media/pluginManager.cpp')
-rw-r--r-- | media/pluginManager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/pluginManager.cpp b/media/pluginManager.cpp index 66cf69d..1a36b4d 100644 --- a/media/pluginManager.cpp +++ b/media/pluginManager.cpp @@ -269,7 +269,11 @@ public: bool cUPnPResourceProvider::GetMetadata(const string& uri, cMetadata& metadata){ metadata.SetObjectIDByUri(uri); - metadata.SetParentIDByUri(uri.substr(0,uri.find_last_of("/"))); + if(uri.compare(GetRootContainer()) == 0){ + metadata.SetProperty(cMetadata::Property(property::object::KEY_PARENTID, string("0"))); + } else { + metadata.SetParentIDByUri(uri.substr(0,uri.find_last_of("/", uri.length()-2)+1)); + } metadata.SetProperty(cMetadata::Property(property::object::KEY_TITLE, uri.substr(uri.find_last_of("/")+1))); metadata.SetProperty(cMetadata::Property(property::object::KEY_CLASS, string("object.container"))); metadata.SetProperty(cMetadata::Property(property::object::KEY_RESTRICTED, true)); |