diff --git a/Base.lproj/InfoInspector.xib b/Base.lproj/InfoInspector.xib
index bcb54c4e7..8739c863e 100644
--- a/Base.lproj/InfoInspector.xib
+++ b/Base.lproj/InfoInspector.xib
@@ -15,16 +15,16 @@
-
+
-
+
-
+
-
+
@@ -33,7 +33,7 @@
-
+
@@ -42,7 +42,7 @@
-
+
@@ -51,7 +51,7 @@
-
+
@@ -60,7 +60,7 @@
-
+
@@ -69,7 +69,7 @@
-
+
@@ -78,7 +78,7 @@
-
+
@@ -87,7 +87,7 @@
-
+
@@ -96,7 +96,7 @@
-
+
@@ -105,7 +105,7 @@
-
+
@@ -114,7 +114,7 @@
-
+
@@ -123,7 +123,7 @@
-
+
@@ -135,7 +135,7 @@
-
+
@@ -147,7 +147,7 @@
-
+
@@ -159,7 +159,7 @@
-
+
@@ -171,7 +171,7 @@
-
+
@@ -183,7 +183,7 @@
-
+
@@ -195,7 +195,7 @@
-
+
@@ -207,7 +207,7 @@
-
+
@@ -219,7 +219,7 @@
-
+
@@ -231,7 +231,7 @@
-
+
@@ -243,7 +243,7 @@
-
+
@@ -255,7 +255,7 @@
-
+
@@ -264,7 +264,7 @@
-
+
@@ -276,7 +276,7 @@
-
+
@@ -285,7 +285,7 @@
-
+
@@ -297,7 +297,7 @@
-
+
@@ -306,7 +306,7 @@
-
+
@@ -317,8 +317,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -327,7 +348,7 @@
-
+
@@ -353,7 +374,7 @@
-
+
@@ -362,7 +383,7 @@
-
+
diff --git a/Playlist/PlaylistEntry.h b/Playlist/PlaylistEntry.h
index ba34e8a10..9b5eaec52 100644
--- a/Playlist/PlaylistEntry.h
+++ b/Playlist/PlaylistEntry.h
@@ -79,6 +79,7 @@
+ (NSSet *)keyPathsForValuesAffectingLengthText;
+ (NSSet *)keyPathsForValuesAffectingYearText;
+ (NSSet *)keyPathsForValuesAffectingCuesheetPresent;
++ (NSSet *)keyPathsForValuesAffectingGainCorrection;
@property(readonly) NSString *display;
@property(retain, readonly) NSNumber *length;
@@ -150,6 +151,8 @@
@property float replayGainTrackPeak;
@property float volume;
+@property(readonly) NSString *gainCorrection;
+
@property double currentPosition;
@property(retain) NSString *endian;
diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m
index ad3a83b1c..141319683 100644
--- a/Playlist/PlaylistEntry.m
+++ b/Playlist/PlaylistEntry.m
@@ -132,6 +132,11 @@
return [NSSet setWithObject:@"albumArtInternal"];
}
++ (NSSet *)keyPathsForValuesAffectingGainCorrection
+{
+ return [NSSet setWithObjects:@"replayGainAlbumGain", @"replayGainAlbumPeak", @"replayGainTrackGain", @"replayGainTrackPeak", @"volume", nil];
+}
+
- (NSString *)description
{
return [NSString stringWithFormat:@"PlaylistEntry %li:(%@)", self.index, self.URL];
@@ -340,6 +345,33 @@
}
}
+@dynamic gainCorrection;
+- (NSString *)gainCorrection
+{
+ if (replayGainAlbumGain)
+ {
+ if (replayGainAlbumPeak)
+ return @"Album Gain plus Peak";
+ else
+ return @"Album Gain";
+ }
+ else if (replayGainTrackGain)
+ {
+ if (replayGainTrackPeak)
+ return @"Track Gain plus Peak";
+ else
+ return @"Track Gain";
+ }
+ else if (volume)
+ {
+ return @"Volume scale";
+ }
+ else
+ {
+ return @"None";
+ }
+}
+
@dynamic positionText;
- (NSString *)positionText
{