[Playback Notifications] Fix empty hyphen on tags

This change needed to be applied in two places, oops, forgot the modern
macOS case.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-18 19:03:25 -07:00
parent 3a1599d22e
commit 404d354918
1 changed files with 8 additions and 6 deletions

View File

@ -177,12 +177,14 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
content.title = @"Now Playing";
NSString *subtitle;
if([pe artist] && [pe album]) {
subtitle = [NSString stringWithFormat:@"%@ - %@", [pe artist], [pe album]];
} else if([pe artist]) {
subtitle = [pe artist];
} else if([pe album]) {
subtitle = [pe album];
NSString *artist = (pe.artist && [pe.artist length]) ? pe.artist : nil;
NSString *album = (pe.album && [pe.album length]) ? pe.album : nil;
if(artist && album) {
subtitle = [NSString stringWithFormat:@"%@ - %@", artist, album];
} else if(artist) {
subtitle = artist;
} else if(album) {
subtitle = album;
} else {
subtitle = @"";
}