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/rg_state.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/dtas/rg_state.rb') diff --git a/lib/dtas/rg_state.rb b/lib/dtas/rg_state.rb index 883515d..d6f8d81 100644 --- a/lib/dtas/rg_state.rb +++ b/lib/dtas/rg_state.rb @@ -111,8 +111,8 @@ class DTAS::RGState # :nodoc: unless @mode return @volume == 1.0 ? nil : to_sox_gain(vol_db) end - rg = source.replaygain or - return rg_fallback_effect("ReplayGain tags missing") + rg = source.replaygain(@mode) or + return rg_fallback_effect("ReplayGain tags missing for #@mode") val = rg.__send__(@mode) if ! val && @fallback_track && @mode =~ /\Aalbum_(\w+)/ tag = "track_#$1" -- cgit v1.2.3-24-ge0c7