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

library: fix race conditional crash which could be triggered by uploading > 20...

library: fix race conditional crash which could be triggered by uploading > 20 small files with parseable meta data
parent b1b8f447
......@@ -260,11 +260,13 @@
NSUInteger count = album.tracks.count;
NSMutableString *string = [[NSMutableString alloc] init];
if (anyTrack) {
[string appendString:anyTrack.artist];
[string appendString:@" — "];
if (anyTrack.artist.length > 0) {
[string appendString:anyTrack.artist];
[string appendString:@" — "];
}
}
[string appendString:[NSString stringWithFormat:(count > 1) ? NSLocalizedString(@"LIBRARY_TRACKS", @"") : NSLocalizedString(@"LIBRARY_SINGLE_TRACK", @""), count]];
if (album.releaseYear)
if (album.releaseYear.length > 0)
[string appendFormat:@" — %@", album.releaseYear];
self.subtitleLabel.text = string;
self.mediaIsUnreadView.hidden = YES;
......
......@@ -244,11 +244,13 @@
NSUInteger count = album.tracks.count;
NSMutableString *string = [[NSMutableString alloc] init];
if (anyTrack) {
[string appendString:anyTrack.artist];
[string appendString:@" — "];
if (anyTrack.artist.length > 0) {
[string appendString:anyTrack.artist];
[string appendString:@" — "];
}
}
[string appendString:[NSString stringWithFormat:(count > 1) ? NSLocalizedString(@"LIBRARY_TRACKS", @"") : NSLocalizedString(@"LIBRARY_SINGLE_TRACK", @""), count]];
if (album.releaseYear)
if (album.releaseYear.length > 0)
[string appendFormat:@" — %@", album.releaseYear];
self.subtitleLabel.text = string;
self.mediaIsUnreadView.hidden = YES;
......
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