Commit ea74e651 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

restore b134b45e2 lost in merge conflcit

parent 90328ea6
......@@ -288,8 +288,7 @@
[request setSortDescriptors:@[descriptor]];
NSArray *matches = [moc executeFetchRequest:request error:nil];
if (matches.count > 0)
matchedFile = matches[0];
matchedFile = matches.firstObject;
}
}
if (matchedFile.lastPosition)
......@@ -402,7 +401,7 @@
} else {
NSArray *files = [MLFile fileForURL:[[_mediaPlayer.media url] absoluteString]];
if (files.count > 0) {
MLFile *fileFromList = files[0];
MLFile *fileFromList = files.firstObject;
fileFromList.lastPosition = @([_mediaPlayer position]);
fileFromList.lastAudioTrack = @(_mediaPlayer.currentAudioTrackIndex);
fileFromList.lastSubtitleTrack = @(_mediaPlayer.currentVideoSubTitleIndex);
......@@ -707,8 +706,7 @@
return mediaFile;
} else if (self.mediaList) {
NSArray *results = [MLFile fileForURL:_mediaPlayer.media.url.absoluteString];
if (results.count > 0)
return results[0];
return results.firstObject;
}
return nil;
......@@ -735,8 +733,7 @@
item = self.fileFromMediaLibrary;
else if (self.mediaList) {
NSArray *matches = [MLFile fileForURL:[_mediaPlayer.media.url absoluteString]];
if (matches.count > 0)
item = matches[0];
item = matches.firstObject
}
if (item) {
......
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