diff --git a/AboutCog.jp2 b/AboutCog.jp2 index 87f630bd2..d0817ce2f 100644 Binary files a/AboutCog.jp2 and b/AboutCog.jp2 differ diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index bb6fa0b8a..a883aa518 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -1221,13 +1221,27 @@ static void *playlistControllerContext = &playlistControllerContext; } - (NSArray *)filterPlaylistOnAlbum:(NSString *)album { - NSPredicate *predicate; + NSPredicate *hasUrlPredicate = [NSPredicate predicateWithFormat:@"urlString != nil && urlString != %@", @""]; + NSPredicate *deletedPredicate = [NSPredicate predicateWithFormat:@"deLeted == NO || deLeted == nil"]; + + NSPredicate *searchPredicate; if([album length] > 0) - predicate = [NSPredicate predicateWithFormat:@"album == %@", album]; + searchPredicate = [NSPredicate predicateWithFormat:@"album == %@", album]; else - predicate = [NSPredicate predicateWithFormat:@"album == nil || album == %@", @""]; + searchPredicate = [NSPredicate predicateWithFormat:@"album == nil || album == %@", @""]; - return [[self arrangedObjects] filteredArrayUsingPredicate:predicate]; + NSCompoundPredicate *predicate = [NSCompoundPredicate andPredicateWithSubpredicates:@[deletedPredicate, hasUrlPredicate, searchPredicate]]; + + NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"index" ascending:YES]; + + NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"PlaylistEntry"]; + request.predicate = predicate; + request.sortDescriptors = @[sortDescriptor]; + + NSError *error = nil; + NSArray *results = [self.persistentContainer.viewContext executeFetchRequest:request error:&error]; + + return results; } - (PlaylistEntry *)getPrevEntry:(PlaylistEntry *)pe { diff --git a/Plugins/HTTPSource/HTTPSource.m b/Plugins/HTTPSource/HTTPSource.m index 273a1ad25..1ba58ab9b 100644 --- a/Plugins/HTTPSource/HTTPSource.m +++ b/Plugins/HTTPSource/HTTPSource.m @@ -528,12 +528,12 @@ static void http_stream_reset(HTTPSource *fp) { curl_slist_free_all(headers); curl_slist_free_all(ok_aliases); } + self->curl = NULL; curl_easy_cleanup(curl); [mutex lock]; if(self->status == STATUS_ABORTED) { DLog(@"curl: thread ended due to abort signal"); - self->curl = NULL; } else { DLog(@"curl: thread ended normally"); self->status = STATUS_FINISHED; @@ -731,7 +731,7 @@ static void http_stream_reset(HTTPSource *fp) { - (void)close { need_abort = YES; content_type = nil; - while(curl != NULL && status != STATUS_FINISHED) { + while(curl != NULL) { usleep(3000); } } diff --git a/Plugins/MAD/MADDecoder.m b/Plugins/MAD/MADDecoder.m index b0a3d1cdd..44914feb7 100644 --- a/Plugins/MAD/MADDecoder.m +++ b/Plugins/MAD/MADDecoder.m @@ -499,7 +499,7 @@ } } else { // Past the end of the file. - if([_source seekable] && totalFrames <= _framesDecoded) { + if(totalFrames <= _framesDecoded) { return YES; } } diff --git a/Preferences/Preferences/ru.lproj/Preferences.strings b/Preferences/Preferences/ru.lproj/Preferences.strings index 6041fedbb..8866f96d5 100644 --- a/Preferences/Preferences/ru.lproj/Preferences.strings +++ b/Preferences/Preferences/ru.lproj/Preferences.strings @@ -21,7 +21,7 @@ "200.title" = "Следующий:"; /* Class = "NSButtonCell"; title = "Automatically check for updates on startup"; ObjectID = "207"; */ -"207.title" = "Automatically check for updates on startup"; +"207.title" = "Автоматически проверять обновления при запуске"; /* Class = "NSTextFieldCell"; title = "Output Device: "; ObjectID = "211"; */ "211.title" = "Устройство воспроизведения: "; diff --git a/Utils/SandboxBroker.m b/Utils/SandboxBroker.m index 036b85dc8..3a10a2a2d 100644 --- a/Utils/SandboxBroker.m +++ b/Utils/SandboxBroker.m @@ -410,7 +410,6 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc - (BOOL)areAllPathsSafe:(NSArray *)urls { for(NSURL *url in urls) { - if(![url isFileURL]) continue; if(![self recursivePathTest:url]) { return NO; } diff --git a/ru.lproj/MainMenu.strings b/ru.lproj/MainMenu.strings index 0d2ba65e6..d13c20d09 100644 --- a/ru.lproj/MainMenu.strings +++ b/ru.lproj/MainMenu.strings @@ -108,7 +108,7 @@ "209.headerCell.title" = "#"; /* Class = "NSMenuItem"; title = "Check for Updates..."; ObjectID = "302"; */ -"302.title" = "Check for Updates..."; +"302.title" = "Проверить обновления..."; /* Class = "NSMenuItem"; title = "Send Feedback..."; ObjectID = "303"; */ "303.title" = "Отправить обратную связь...";