diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2010-10-05 22:25:30 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2010-10-05 22:25:30 -0700 |
commit | 3f6540de2e6f71a08fc1871b9b7b47f858d44488 (patch) | |
tree | 0214ba0e795e2a46c070f928b7fcb94d54a37718 | |
parent | 584076f023c5dfe9d1fbb0a31cd179036107f66c (diff) | |
download | omptagger-3f6540de2e6f71a08fc1871b9b7b47f858d44488.tar.gz omptagger-3f6540de2e6f71a08fc1871b9b7b47f858d44488.tar.xz |
Replace backslashes for MP3 files as well.
-rwxr-xr-x | omptagger | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 <omp@gentoo.org> +# Copyright 2007-2010 David Vazgenovich Shakaryan <dvshakaryan@gmail.com> # 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 |