musicfix

music file renamer and tagger
git clone git://git.2f30.org/musicfix
Log | Files | Refs | README | LICENSE

commit 033d36bcba914864170a3dcc7b3bf6b5695927a6
parent a7a2807be762db07d947f9c81155a08384ae6212
Author: lostd <lostd@2f30.org>
Date:   Tue, 24 Sep 2013 08:27:26 +0000

Another take to release format strings

Diffstat:
Mbin/musicfix | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/bin/musicfix b/bin/musicfix @@ -95,7 +95,10 @@ end # Make a sane format string also using format description def mkformat format if format.descriptions - "#{format.descriptions.first} #{format.name}" + # Too general + format.descriptions.delete "Album" + format.descriptions.delete "Vinyl" + "#{format.name} #{format.descriptions.join ' '}" else "#{format.name}" end @@ -103,12 +106,9 @@ end # Shorten certain common words that appear in format strings def mkshort n - n = n.gsub "Album CD", "CD" - n = n.gsub "LP Vinyl", "LP" - n = n.gsub "EP Vinyl", "EP" - n = n.gsub "Mini-Album Vinyl", "MiniLP" - n = n.gsub '12" Vinyl', '12inch' - n = n.gsub '7" Vinyl', '7inch' + n = n.gsub "Mini-Album", "MiniLP" + n = n.gsub '12"', '12inch' + n = n.gsub '7"', '7inch' n = n.gsub "Cassette", "Cass" n = n.gsub "Limited Edition", "Ltd" n = n.gsub "Compilation", "Comp"