Przeglądaj źródła

upnp: add work-around for Fritzbox devices

Those devices expect a full paging implementation so by default, they will return the first 50 items only.

This patch overwrites the default and requests 1500 instead, which should be sufficient for most UPnP directories.

Instead of adding pagination using upnpx, we should move to libvlc's UPnP implementation which already supports it.
Felix Paul Kühne 5 lat temu
rodzic
commit
5d28f196f3

+ 1 - 1
SharedSources/ServerBrowsing/UPnP/VLCNetworkServerBrowserUPnP.m

@@ -61,7 +61,7 @@
         NSMutableString *outTotalMatches = [[NSMutableString alloc] init];
         NSMutableString *outUpdateID = [[NSMutableString alloc] init];
 
-        [[self.upnpDevice contentDirectory] BrowseWithObjectID:self.upnpRootID BrowseFlag:@"BrowseDirectChildren" Filter:@"*" StartingIndex:@"0" RequestedCount:@"0" SortCriteria:sortCriteria OutResult:outResult OutNumberReturned:outNumberReturned OutTotalMatches:outTotalMatches OutUpdateID:outUpdateID];
+        [[self.upnpDevice contentDirectory] BrowseWithObjectID:self.upnpRootID BrowseFlag:@"BrowseDirectChildren" Filter:@"*" StartingIndex:@"0" RequestedCount:@"1500" SortCriteria:sortCriteria OutResult:outResult OutNumberReturned:outNumberReturned OutTotalMatches:outTotalMatches OutUpdateID:outUpdateID];
 
         NSData *didl = [outResult dataUsingEncoding:NSUTF8StringEncoding];
         MediaServerBasicObjectParser *parser;