Commit 1eb43dc0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

UPnP discovery: fix issue with some servers offering different transcoding...

UPnP discovery: fix issue with some servers offering different transcoding profiles where we played random file (closes #11, closes #16281)

(cherry picked from commit 9f2256d9)
parent 45052f64
2.7.2:
------
* Stability improvements
* Improved HTTP connectivity
* Improved UPnP reliability, notably with Twonky
2.7.1:
------
* Stability improvements
......
......@@ -86,15 +86,17 @@
- (VLCMediaList *)mediaList
{
VLCMediaList *mediaList = [[VLCMediaList alloc] init];
NSMutableArray *mediaArray;
@synchronized(_items) {
NSUInteger count = _items.count;
mediaArray = [NSMutableArray arrayWithCapacity:count];
for (NSInteger i = count - 1; i >= 0; i--) {
VLCMedia *media = [_items[i] media];
if (media)
[mediaList addMedia:media];
[mediaArray addObject:media];
}
}
VLCMediaList *mediaList = [[VLCMediaList alloc] initWithArray:mediaArray];
return mediaList;
}
......@@ -247,12 +249,10 @@
return YES;
return NO;
}]];
if (protocolStrings.count == 1) {
_URL = [NSURL URLWithString:[mediaItem uri]];
} else if (protocolStrings.count > 1) {
// withh multiple playable resources we simulate to be a container
_container = YES;
}
/* FIXME: on some servers, we can have more than 1 protocol string as different transcoding schemes are offered
* in previous versions, we offered a selector - maybe re-add? */
_URL = [NSURL URLWithString:[mediaItem uri]];
}
}
return self;
......
......@@ -105,10 +105,8 @@
[self update];
}
#pragma mark - server browser item specifics
- (void)didSelectItem:(id<VLCNetworkServerBrowserItem>)item index:(NSUInteger)index singlePlayback:(BOOL)singlePlayback
{
if (item.isContainer) {
......@@ -125,8 +123,6 @@
}
}
#pragma mark - table view data source, for more see super
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment