From 3f6540de2e6f71a08fc1871b9b7b47f858d44488 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 5 Oct 2010 22:25:30 -0700 Subject: Replace backslashes for MP3 files as well. --- omptagger | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'omptagger') diff --git a/omptagger b/omptagger index aa8502d..5b57213 100755 --- a/omptagger +++ b/omptagger @@ -1,9 +1,9 @@ #!/usr/bin/env ruby # -# omptagger [version 1.0.3] -# http://dev.gentoo.org/~omp/omptagger/ +# omptagger +# http://github.com/omp/omptagger # -# Copyright 2007-2009 David Shakaryan +# Copyright 2007-2010 David Vazgenovich Shakaryan # Distributed under the terms of the GNU General Public License v3. # See http://www.gnu.org/licenses/gpl.txt for the full license text. # @@ -349,8 +349,10 @@ class ID3 end def generate(scheme) - val = File.basename(@file, File.extname(@file)).gsub('_', ' ') - scheme = schemesplit(scheme.gsub('_', ' '), val, KEYS.keys.join) + val = File.basename(@file, File.extname(@file)) + val = val.gsub('_', ' ').gsub('\\', '/') + scheme = scheme.gsub('_', ' ').gsub('\\', '/') + scheme = schemesplit(scheme, val, KEYS.keys.join) tagval = Array.new -- cgit v1.2.3-70-g09d2