Revert "Platinum - allow sub classes of PltSyncMediaBrowser to specify property filte...
authorAlasdair Campbell <alcoheca@gmail.com>
Wed, 24 Oct 2012 11:19:21 +0000 (12:19 +0100)
committerAlasdair Campbell <alcoheca@gmail.com>
Thu, 25 Oct 2012 15:33:29 +0000 (16:33 +0100)
This reverts commit aa93b7516cabe08eafe8b7c2ea15500c6bae128c.

Conflicts:

lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.cpp

lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.cpp
lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
xbmc/filesystem/UPnPDirectory.cpp

index 0763b59..bea1064 100644 (file)
@@ -202,8 +202,8 @@ PLT_SyncMediaBrowser::BrowseSync(PLT_BrowseDataReference& browse_data,
                                  const char*              object_id, 
                                  NPT_Int32                index, 
                                  NPT_Int32                count,
-                                 const char*              filter, 
                                  bool                     browse_metadata,
+                                 const char*              filter, 
                                  const char*              sort)
 {
     NPT_Result res;
@@ -236,8 +236,7 @@ PLT_SyncMediaBrowser::BrowseSync(PLT_DeviceDataReference&      device,
                                  PLT_MediaObjectListReference& list,
                                  bool                          metadata, /* = false */
                                  NPT_Int32                     start, /* = 0 */
-                                 NPT_Cardinal                  max_results, /* = 0 */
-                                 const char*                   filter)
+                                 NPT_Cardinal                  max_results /* = 0 */)
 {
     NPT_Result res = NPT_FAILURE;
     NPT_Int32  index = start;
@@ -264,7 +263,6 @@ PLT_SyncMediaBrowser::BrowseSync(PLT_DeviceDataReference&      device,
             (const char*)object_id,
             index,
             metadata?1:200, // DLNA recommendations for browsing children is no more than 30 at a time
-            filter,
             metadata);         
         NPT_CHECK_LABEL_WARNING(res, done);
         
index 605ea31..e628af9 100644 (file)
@@ -106,8 +106,7 @@ public:
                           PLT_MediaObjectListReference& list,
                           bool                          metadata = false,
                           NPT_Int32                     start = 0,
-                          NPT_Cardinal                  max_results = 0,
-                          const char*                   filter = "dc:date,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:album,upnp:artist,upnp:author,searchable,childCount"); // explicitely specify res otherwise WMP won't return a URL!
+                          NPT_Cardinal                  max_results = 0); // 0 means all
 
     const NPT_Lock<PLT_DeviceMap>& GetMediaServersMap() const { return m_MediaServers; }
     bool IsCached(const char* uuid, const char* object_id);
@@ -118,8 +117,8 @@ protected:
                           const char*              object_id,
                           NPT_Int32                index, 
                           NPT_Int32                count,
-                          const char*              filter,
                           bool                     browse_metadata = false,
+                          const char*              filter = "dc:date,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:album,upnp:artist,upnp:author,searchable,childCount", // explicitely specify res otherwise WMP won't return a URL!
                           const char*              sort = "");
 private:
     NPT_Result Find(const char* ip, PLT_DeviceDataReference& device);
index 50739ec..a4af8e8 100644 (file)
@@ -355,15 +355,10 @@ CUPnPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
         }
 #endif
 
-
-        // Browse and wait for result
-        PLT_MediaObjectListReference list;
-        NPT_Result res;
-        // we want all properties, so send empty filter
-        res = upnp->m_MediaBrowser->BrowseSync(device, object_id, list, false, 0, 0, "");
-
         // if error, return now, the device could have gone away
         // this will make us go back to the sources list
+        PLT_MediaObjectListReference list;
+        NPT_Result res = upnp->m_MediaBrowser->BrowseSync(device, object_id, list);
         if (NPT_FAILED(res)) goto failure;
 
         // empty list is ok