Commit 8e3c12ca authored by Felix Paul Kühne's avatar Felix Paul Kühne

library: fix incorrect artwork display for album tracks

parent d2782fba
......@@ -106,6 +106,7 @@
self.artistNameLabel.text = mediaObject.albumTrack.artist;
self.albumNameLabel.text = mediaObject.albumTrack.album.name;
self.titleLabel.text = (mediaObject.albumTrack.title.length > 0) ? mediaObject.albumTrack.title : mediaObject.title;
self.thumbnailView.image = nil;
} else if ([mediaObject isShowEpisode]) {
self.seriesNameLabel.text = mediaObject.showEpisode.show.name;
self.titleLabel.text = (mediaObject.showEpisode.name.length > 0) ? mediaObject.showEpisode.name : mediaObject.title;
......@@ -123,7 +124,7 @@
self.subtitleLabel.text = [self.subtitleLabel.text stringByAppendingFormat:@" — %@x%@", width, height];
}
}
if ([keyPath isEqualToString:@"computedThumbnail"] || !keyPath) {
if (([keyPath isEqualToString:@"computedThumbnail"] || !keyPath) && !mediaObject.isAlbumTrack) {
NSManagedObjectID *objID = mediaObject.objectID;
UIImage *displayedImage;
if ([_thumbnailCacheIndex containsObject:objID]) {
......
......@@ -92,6 +92,7 @@
self.artistNameLabel.text = mediaObject.albumTrack.artist;
self.albumNameLabel.text = mediaObject.albumTrack.album.name;
self.titleLabel.text = (mediaObject.albumTrack.title.length > 1) ? mediaObject.albumTrack.title : mediaObject.title;
self.thumbnailView.image = nil;
} else
self.titleLabel.text = mediaObject.title;
......@@ -106,7 +107,7 @@
self.subtitleLabel.text = [self.subtitleLabel.text stringByAppendingFormat:@" — %@x%@", width, height];
}
}
if ([keyPath isEqualToString:@"computedThumbnail"] || !keyPath) {
if (([keyPath isEqualToString:@"computedThumbnail"] || !keyPath) && !mediaObject.isAlbumTrack) {
NSManagedObjectID *objID = mediaObject.objectID;
UIImage *displayedImage;
if ([_thumbnailCacheIndex containsObject:objID]) {
......
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