Commit b50e950a authored by Pierre SAGASPE's avatar Pierre SAGASPE Committed by Felix Paul Kühne

ftp : displaying subtitles files in browser

(cherry picked from commit 2dc59b1b)
parent f2525a50
......@@ -100,8 +100,27 @@
for (NSUInteger x = 0; x < count; x++) {
NSDictionary *dict = rawList[x];
if (![[dict objectForKey:(id)kCFFTPResourceName] hasPrefix:@"."])
[filteredList addObject:[[VLCNetworkServerBrowserItemFTP alloc] initWithDictionary:dict baseURL:self.url]];
if ([[dict objectForKey:(id)kCFFTPResourceName] isSupportedSubtitleFormat])
[subtitleList addObject:[dict objectForKey:(id)kCFFTPResourceName]];
for (NSUInteger x = 0; x < count; x++) {
NSDictionary *dict = rawList[x];
NSString *filename = [dict objectForKey:(id)kCFFTPResourceName];
BOOL container = [[dict objectForKey:(id)kCFFTPResourceType] intValue] == 4;
if (![filename hasPrefix:@"."])
NSURL *subtitleURL = nil;
if ([filename isSupportedAudioMediaFormat] || [filename isSupportedMediaFormat])
subtitleURL = [self searchSubtitleForFile:filename inSubtitleList:subtitleList];
else if ((!container) && ![filename isSupportedSubtitleFormat])
[filteredList addObject:[[VLCNetworkServerBrowserItemFTP alloc] initWithDictionary:dict baseURL:self.url subtitleURL:subtitleURL]];
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
@synchronized(_items) {
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