musicfix

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

commit 67d1a0797b0c732fb5254cb50d02d4da8091f859
parent 67307413d593370b1daee94ee821e4c4dc8f3862
Author: lostd <lostd@2f30.org>
Date:   Sun, 25 Nov 2012 08:59:17 +0000

Support executing commands upon completion

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

diff --git a/bin/musicfix b/bin/musicfix @@ -23,6 +23,7 @@ require 'taglib' mdir = '/var/music/external' mytrack = '"#{mdir}/#{fba}-#{my}-#{fb}-#{fv}/#{d}#{fn}-#{fa}-#{ft}.#{x}"' myimage = '"#{mdir}/#{fba}-#{my}-#{fb}-#{fv}/#{zz}-#{fba}-#{fb}_cover.jpg"' +mycmd = '"mpc update external/#{fba}-#{my}-#{fb}-#{fv}"' # Naming conventions # The 'f' prefix means "normalized for filename" @@ -219,4 +220,11 @@ if imgurl then File.open(imgname, 'wb').write img end +# Execute command if provided +if mycmd then + puts "Executing finishing command" + cmd = eval mycmd + `#{cmd}` +end + # vim:set ts=4 sw=4 et: