]> git.sesse.net Git - vlc/commitdiff
UPNP: Attempt to fix #4714. Not tested.
authorKonstantin Pavlov <thresh@videolan.org>
Tue, 26 Apr 2011 10:18:51 +0000 (14:18 +0400)
committerKonstantin Pavlov <thresh@videolan.org>
Thu, 14 Jul 2011 06:50:39 +0000 (10:50 +0400)
modules/services_discovery/upnp.cpp

index 3a992e5ca583a2526101378e0cfa0b0f05f967a7..afdc9c86149b1aa2f36efccf8253049dc4d61601 100644 (file)
@@ -755,36 +755,15 @@ bool MediaServer::_fetchContents( Container* p_parent )
             if ( !objectID )
                 continue;
 
-            const char* childCountStr =
-                    ixmlElement_getAttribute( containerElement, "childCount" );
-
-            if ( !childCountStr )
-                continue;
-
-            int childCount = atoi( childCountStr );
             const char* title = xml_getChildElementValue( containerElement,
                                                           "dc:title" );
 
             if ( !title )
                 continue;
 
-            const char* resource = xml_getChildElementValue( containerElement,
-                                                             "res" );
-
-            if ( resource && childCount < 1 )
-            {
-                Item* item = new Item( p_parent, objectID, title, resource, -1 );
-                p_parent->addItem( item );
-            }
-
-            else
-            {
-                Container* container = new Container( p_parent, objectID, title );
-                p_parent->addContainer( container );
-
-                if ( childCount > 0 )
-                    _fetchContents( container );
-            }
+            Container* container = new Container( p_parent, objectID, title );
+            p_parent->addContainer( container );
+            _fetchContents( container );
         }
         ixmlNodeList_free( containerNodeList );
     }