diff --git a/Playlist/PlaylistEntry.h b/Playlist/PlaylistEntry.h index 1aa8c32d0..68c17d090 100644 --- a/Playlist/PlaylistEntry.h +++ b/Playlist/PlaylistEntry.h @@ -27,6 +27,7 @@ + (NSSet *_Nonnull)keyPathsForValuesAffectingYearText; + (NSSet *_Nonnull)keyPathsForValuesAffectingCuesheetPresent; + (NSSet *_Nonnull)keyPathsForValuesAffectingGainCorrection; ++ (NSSet *_Nonnull)keyPathsForValuesAffectingUnsigned; @property(nonatomic, readonly) NSString *_Nonnull display; @property(nonatomic, retain, readonly) NSNumber *_Nonnull length; @@ -42,7 +43,7 @@ @property(nonatomic, readonly) NSString *_Nonnull yearText; -@property(nonatomic, readonly) NSString *_Nonnull title; +@property(nonatomic) NSString *_Nonnull title; @property(nonatomic, readonly) NSString *_Nonnull trackText; @@ -62,6 +63,8 @@ @property(nonatomic) NSData *_Nullable albumArtInternal; +@property(nonatomic) BOOL Unsigned; + - (void)setMetadata:(NSDictionary *_Nonnull)metadata; @end diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m index dea01c4c5..6b1271fb6 100644 --- a/Playlist/PlaylistEntry.m +++ b/Playlist/PlaylistEntry.m @@ -99,6 +99,10 @@ extern NSMutableDictionary *__artworkDictionary; return [NSSet setWithObjects:@"replayGainAlbumGain", @"replayGainAlbumPeak", @"replayGainTrackGain", @"replayGainTrackPeak", @"volume", nil]; } ++ (NSSet *)keyPathsForValuesAffectingUnsigned { + return [NSSet setWithObject:@"unSigned"]; +} + - (NSString *)description { return [NSString stringWithFormat:@"PlaylistEntry %lli:(%@)", self.index, self.url]; } @@ -457,6 +461,16 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path) { return nil; } +// Gotta love that requirement of Core Data that everything starts with a lower case letter +@dynamic Unsigned; +- (BOOL)Unsigned { + return self.unSigned; +} + +- (void)setUnsigned:(BOOL)Unsigned { + self.unSigned = Unsigned; +} + - (void)setMetadata:(NSDictionary *)metadata { if(metadata == nil) { self.error = YES;