diff --git a/xbmc/network/upnp/UPnPServer.cpp b/xbmc/network/upnp/UPnPServer.cpp index 90449af2a6275..c8152937cfbf6 100644 --- a/xbmc/network/upnp/UPnPServer.cpp +++ b/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; iGetPath().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);