Commit f31aeec5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

UPnP: remove iOS 7 compatiblity code (closes #166)

parent 0c95d1ae
......@@ -236,39 +236,19 @@
if (evaluatedObject == nil || ![evaluatedObject isKindOfClass:[NSString class]])
return NO;
if ([evaluatedObject respondsToSelector:@selector(containsString:)]) {
if ([evaluatedObject containsString:kVLCUPnPVideoProtocolKey])
return YES;
if ([evaluatedObject containsString:kVLCUPnPAudioProtocolKey])
return YES;
} else {
NSRange foundRange = [evaluatedObject rangeOfString:kVLCUPnPVideoProtocolKey];
if (foundRange.location != NSNotFound)
return YES;
foundRange = [evaluatedObject rangeOfString:kVLCUPnPAudioProtocolKey];
if (foundRange.location != NSNotFound)
return YES;
}
if ([evaluatedObject containsString:kVLCUPnPVideoProtocolKey])
return YES;
if ([evaluatedObject containsString:kVLCUPnPAudioProtocolKey])
return YES;
return NO;
}]];
// Check for multiple URIs.
if ([mediaItem.uriCollection count] > 1) {
for (NSString *key in mediaItem.uriCollection) {
if ([key respondsToSelector:@selector(containsString:)]) {
if ([key containsString:kVLCUPnPVideoProtocolKey] || [key containsString:kVLCUPnPAudioProtocolKey]) {
mediaItem.uri = [mediaItem.uriCollection objectForKey:key];
}
} else {
NSRange foundRage = [key rangeOfString:kVLCUPnPVideoProtocolKey];
if (foundRage.location != NSNotFound) {
mediaItem.uri = [mediaItem.uriCollection objectForKey:key];
} else {
foundRage = [key rangeOfString:kVLCUPnPAudioProtocolKey];
if (foundRage.location != NSNotFound) {
mediaItem.uri = [mediaItem.uriCollection objectForKey:key];
}
}
if ([key containsString:kVLCUPnPVideoProtocolKey] || [key containsString:kVLCUPnPAudioProtocolKey]) {
mediaItem.uri = [mediaItem.uriCollection objectForKey:key];
}
}
}
......
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