Skip to content
This repository
Browse code

jsonrpc: don't try to retrieve extra metadata for UPnP paths in Files…

….GetDirectory/GetFileDetails (fixes #13595)

UPnP sources can't be added to the library and they most likely already
provide nay available metadata (especially when the UPnP server is another
XBMC instance). Therefore looking for additional metadata is useless.

Furthermore calling CDirectory::Exists() on an UPnP path seems to trigger a
bug in Platinum's caching behaviour.
  • Loading branch information...
commit a8e9c49a76fd346ba3e11ad8f91aa7316a3a15b3 1 parent d63420e
Sascha Montellese authored
6  xbmc/interfaces/json-rpc/FileOperations.cpp
@@ -128,7 +128,8 @@ JSONRPC_STATUS CFileOperations::GetDirectory(const CStdString &method, ITranspor
128 128
       if ((media == "video" && items[i]->HasVideoInfoTag()) ||
129 129
           (media == "music" && items[i]->HasMusicInfoTag()) ||
130 130
           (media == "picture" && items[i]->HasPictureInfoTag()) ||
131  
-           media == "files")
  131
+           media == "files" ||
  132
+           URIUtils::IsUPnP(items.GetPath()))
132 133
       {
133 134
         if (items[i]->m_bIsFolder)
134 135
           filteredDirectories.Add(items[i]);
@@ -212,7 +213,8 @@ JSONRPC_STATUS CFileOperations::GetFileDetails(const CStdString &method, ITransp
212 213
     return InvalidParams;
213 214
 
214 215
   CFileItemPtr item = items.Get(file);
215  
-  FillFileItem(item, *item.get(), parameterObject["media"].asString());
  216
+  if (!URIUtils::IsUPnP(file))
  217
+    FillFileItem(item, *item.get(), parameterObject["media"].asString());
216 218
 
217 219
   // Check if the "properties" list exists
218 220
   // and make sure it contains the "file"

0 notes on commit a8e9c49

Please sign in to comment.
Something went wrong with that request. Please try again.