Commit 154031c7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

fix 2 runtime exceptions

parent 77f2355c
...@@ -392,6 +392,9 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl ...@@ -392,6 +392,9 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl
fileItem.lastAudioTrack = @(_mediaPlayer.currentAudioTrackIndex); fileItem.lastAudioTrack = @(_mediaPlayer.currentAudioTrackIndex);
fileItem.lastSubtitleTrack = @(_mediaPlayer.currentVideoSubTitleIndex); fileItem.lastSubtitleTrack = @(_mediaPlayer.currentVideoSubTitleIndex);
if ([fileItem isKindOfType:kMLFileTypeAudio])
return;
if (position > .95) if (position > .95)
return; return;
......
...@@ -388,6 +388,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; ...@@ -388,6 +388,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
NSString *folderLocation = [[mediaObject.url path] stringByDeletingLastPathComponent]; NSString *folderLocation = [[mediaObject.url path] stringByDeletingLastPathComponent];
NSArray *allfiles = [fileManager contentsOfDirectoryAtPath:folderLocation error:nil]; NSArray *allfiles = [fileManager contentsOfDirectoryAtPath:folderLocation error:nil];
NSString *fileName = [mediaObject.path.lastPathComponent stringByDeletingPathExtension]; NSString *fileName = [mediaObject.path.lastPathComponent stringByDeletingPathExtension];
if (!fileName)
return;
NSIndexSet *indexSet = [allfiles indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { NSIndexSet *indexSet = [allfiles indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return ([obj rangeOfString:fileName].location != NSNotFound); return ([obj rangeOfString:fileName].location != NSNotFound);
}]; }];
......
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