Commit 39b2687a authored by Felix Paul Kühne's avatar Felix Paul Kühne

server browsing: remove intrinsically broken 'IsSupported' check since we...

server browsing: remove intrinsically broken 'IsSupported' check since we can't know before actually trying if stuff plays or not
parent 96baf102
......@@ -109,21 +109,6 @@
return _byteCounterFormatter;
}
- (BOOL)isSupportedItem:(id<VLCNetworkServerBrowserItem>)item {
NSString *properObjectName = item.name;
NSString *itemURLName = item.URL.lastPathComponent;
return [properObjectName isSupportedFormat] || [itemURLName isSupportedFormat];
}
- (void)showUnsupportedFileAlertForItem:(id<VLCNetworkServerBrowserItem>)item {
VLCAlertView *alert = [[VLCAlertView alloc] initWithTitle:NSLocalizedString(@"FILE_NOT_SUPPORTED", nil)
message:[NSString stringWithFormat:NSLocalizedString(@"FILE_NOT_SUPPORTED_LONG", nil), item.name]
delegate:self
cancelButtonTitle:NSLocalizedString(@"BUTTON_CANCEL", nil)
otherButtonTitles:nil];
[alert show];
}
#pragma mark - server browser item specifics
- (void)_downloadItem:(id<VLCNetworkServerBrowserItem>)item
......@@ -330,9 +315,6 @@
if (item.isContainer) {
VLCNetworkServerBrowserViewController *targetViewController = [[VLCNetworkServerBrowserViewController alloc] initWithServerBrowser:item.containerBrowser];
[self.navigationController pushViewController:targetViewController animated:YES];
} else {
if (![self isSupportedItem:item]) {
[self showUnsupportedFileAlertForItem:item];
} else {
if (searchResult) {
[self _streamFileForItem:item];
......@@ -365,7 +347,6 @@
[self _streamMediaList:mediaList startingAtIndex:row];
}
}
}
[tableView deselectRowAtIndexPath:indexPath animated:NO];
}
......@@ -378,10 +359,6 @@
else
item = self.serverBrowser.items[[self.tableView indexPathForCell:cell].row];
if (![self isSupportedItem:item]) {
[self showUnsupportedFileAlertForItem:item];
} else {
if (item.fileSizeBytes.longLongValue < [[UIDevice currentDevice] freeDiskspace].longLongValue) {
[self _downloadItem:item];
[cell.statusLabel showStatusMessage:NSLocalizedString(@"DOWNLOADING", nil)];
......@@ -393,7 +370,6 @@
otherButtonTitles:nil];
[alert show];
}
}
}
......
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