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