diff --git a/Application/PlaybackEventController.m b/Application/PlaybackEventController.m index e0c56a387..64f02741e 100644 --- a/Application/PlaybackEventController.m +++ b/Application/PlaybackEventController.m @@ -174,37 +174,6 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response content.sound = nil; content.categoryIdentifier = @"play"; - if ([defaults boolForKey:@"notifications.show-album-art"] && [pe albumArtInternal]) { - NSError *error = nil; - NSFileManager *fileManager = [NSFileManager defaultManager]; - NSURL *tmpSubFolderURL = [[NSURL fileURLWithPath:NSTemporaryDirectory()] - URLByAppendingPathComponent:@"cog-artworks-cache" isDirectory:true]; - if ([fileManager createDirectoryAtPath:[tmpSubFolderURL path] - withIntermediateDirectories:true - attributes:nil - error:&error]) { - NSString *tmpFileName = [[NSProcessInfo.processInfo globallyUniqueString] stringByAppendingString:@".jpg"]; - NSURL *fileURL = [tmpSubFolderURL URLByAppendingPathComponent:tmpFileName]; - NSImage *image = [pe albumArt]; - CGImageRef cgRef = [image CGImageForProposedRect:NULL context:nil hints:nil]; - NSBitmapImageRep *newRep = [[NSBitmapImageRep alloc] initWithCGImage:cgRef]; - NSData *jpgData = [newRep representationUsingType:NSBitmapImageFileTypeJPEG - properties:@{NSImageCompressionFactor: @0.5f}]; - [jpgData writeToURL:fileURL atomically:YES]; - - UNNotificationAttachment *icon = [UNNotificationAttachment attachmentWithIdentifier:@"art" - URL:fileURL - options:nil - error:&error]; - if (error) { - // We have size limit of 10MB per image attachment. - NSLog(@"%@", error.localizedDescription); - } else { - content.attachments = @[icon]; - } - } - } - UNNotificationRequest * request = [UNNotificationRequest requestWithIdentifier:@"PlayTrack" content:content trigger:nil]; [center addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) { diff --git a/Preferences/General/Base.lproj/Preferences.xib b/Preferences/General/Base.lproj/Preferences.xib index 59a8d00b3..2b9a6c667 100644 --- a/Preferences/General/Base.lproj/Preferences.xib +++ b/Preferences/General/Base.lproj/Preferences.xib @@ -11,7 +11,6 @@ - @@ -401,12 +400,12 @@ - +