Permalink
Browse files

[UPnP] hide addons node

  • Loading branch information...
1 parent e01f929 commit 2924e3eb0c45c72b0c3065923e00c278fbbbf813 @alcoheca alcoheca committed Oct 23, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 xbmc/network/upnp/UPnPServer.cpp
@@ -237,10 +237,7 @@ CUPnPServer::Build(CFileItemPtr item,
goto failure;
}
- } else if (path.StartsWith("addons://"))
- // don't serve addon listings for now
- goto failure;
- else {
+ } else {
// db path handling
NPT_String file_path, share_name;
file_path = item->GetPath();
@@ -624,6 +621,14 @@ CUPnPServer::BuildResponse(PLT_ActionReference& action,
thumb_loader->Initialize();
}
+ // this isn't pretty but needed to properly hide the addons node from clients
+ if (items.GetPath().Left(7) == "library") {
+ for (int i=0; i<items.Size(); i++) {
+ if (items[i]->GetPath().Left(6) == "addons")
+ items.Remove(i);
+ }
+ }
+
// won't return more than UPNP_MAX_RETURNED_ITEMS items at a time to keep things smooth
// 0 requested means as many as possible
NPT_UInt32 max_count = (requested_count == 0)?m_MaxReturnedItems:min((unsigned long)requested_count, (unsigned long)m_MaxReturnedItems);

0 comments on commit 2924e3e

Please sign in to comment.