musicfix

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

commit 9dc0b68bb864709c59505d1c314b6f30b9350038
parent 9a7afb5a6e03ed08233358773233393030e0b82a
Author: lostd <lostd@2f30.org>
Date:   Fri, 27 Mar 2015 16:24:18 +0200

Format descriptions list may be nil

Diffstat:
Mbin/musicfix | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/bin/musicfix b/bin/musicfix @@ -146,7 +146,14 @@ end # Make a sane format string also using format description def mkformat format f = [] - ([format['name']] + format['descriptions']).each do |d| + formats = [] + if format['name'] then + formats << format['name'] + end + if format['descriptions'] then + formats += format['descriptions'] + end + formats.each do |d| f << d if @ft.keys.include? d end f.join ' '