Permalink
Browse files

upnp: not all internal upnp paths were /'d at the end

  • Loading branch information...
1 parent 7594040 commit 65a679256a2c1f97f3a8ad687e16f999e9139382 @alcoheca alcoheca committed Apr 3, 2013
Showing with 4 additions and 5 deletions.
  1. +3 −5 xbmc/filesystem/UPnPDirectory.cpp
  2. +1 −0 xbmc/network/upnp/UPnP.cpp
View
8 xbmc/filesystem/UPnPDirectory.cpp
@@ -29,6 +29,7 @@
#include "video/VideoInfoTag.h"
#include "FileItem.h"
#include "utils/log.h"
+#include "utils/URIUtils.h"
using namespace MUSIC_INFO;
using namespace XFILE;
@@ -325,11 +326,8 @@ CUPnPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
CStdString id = (char*) (*entry)->m_ObjectID;
CURL::Encode(id);
- if(pItem->m_bIsFolder) {
- pItem->SetPath(CStdString((const char*) "upnp://" + uuid + "/" + id.c_str()));
- } else {
- pItem->SetPath(CStdString((const char*) "upnp://" + uuid + "/" + id.c_str() + "/"));
- }
+ URIUtils::AddSlashAtEnd(id);
+ pItem->SetPath(CStdString((const char*) "upnp://" + uuid + "/" + id.c_str()));
items.Add(pItem);
View
1 xbmc/network/upnp/UPnP.cpp
@@ -180,6 +180,7 @@ class CMediaBrowser : public PLT_SyncMediaBrowser,
if (!NPT_StringsEqual(item_id, "0")) {
CStdString id = item_id;
CURL::Encode(id);
+ URIUtils::AddSlashAtEnd(id);
path += id.c_str();
}

0 comments on commit 65a6792

Please sign in to comment.