소스 검색

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 년 전
부모
커밋
5d28f196f3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      SharedSources/ServerBrowsing/UPnP/VLCNetworkServerBrowserUPnP.m

+ 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;