From 83ab812ea560f5f327ea2df00f8f0292d96b1795 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 4 Jan 2016 09:51:41 +0000 Subject: player: replaygain: avoid unnecessary ignoring It is possible for a file to only have one of the ReplayGain tags we need and not the previous-required REPLAYGAIN_TRACK_GAIN tag. So do not reject the entire series of tags if a file has the one we want. --- lib/dtas/replaygain.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/dtas/replaygain.rb') diff --git a/lib/dtas/replaygain.rb b/lib/dtas/replaygain.rb index b94ded2..635e96e 100644 --- a/lib/dtas/replaygain.rb +++ b/lib/dtas/replaygain.rb @@ -40,7 +40,7 @@ class DTAS::ReplayGain # :nodoc: def initialize(comments) comments or return - # the replaygain standard specifies 89.0 dB, but maybe some apps are + # the ReplayGain standard specifies 89.0 dB, but maybe some apps are # different... @reference_loudness = check_gain(comments["REPLAYGAIN_REFERENCE_LOUDNESS"]) @@ -50,8 +50,8 @@ class DTAS::ReplayGain # :nodoc: @album_peak = check_float(comments["REPLAYGAIN_ALBUM_PEAK"]) end - def self.new(comments) - tmp = super - tmp.track_gain ? tmp : nil + def self.new(comments, field) + tmp = super(comments) + tmp.__send__(field) ? tmp : nil end end -- cgit v1.2.3-24-ge0c7