diff --git a/Application/PlaybackEventController.m b/Application/PlaybackEventController.m index e12a09546..d9dc69eb6 100644 --- a/Application/PlaybackEventController.m +++ b/Application/PlaybackEventController.m @@ -122,12 +122,23 @@ typedef enum NSUserNotification *notif = [[NSUserNotification alloc] init]; notif.title = [pe title]; + 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]; + } else { + subtitle = @""; + } + if ([defaults boolForKey:@"notifications.itunes-style"]) { - notif.subtitle = [NSString stringWithFormat:@"%@ - %@", [pe artist], [pe album]]; + notif.subtitle = subtitle; [notif setValue:@YES forKey:@"_showsButtons"]; } else { - notif.informativeText = [NSString stringWithFormat:@"%@ - %@", [pe artist], [pe album]]; + notif.informativeText = subtitle; } if ([notif respondsToSelector:@selector(setContentImage:)]) {