bin/dtas-cueedit in dtas-0.9.0 vs bin/dtas-cueedit in dtas-0.10.0
- old
+ new
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
-# Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
+# Copyright (C) 2013-2015 all contributors <dtas-all@nongnu.org>
# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
require 'tempfile'
require 'dtas/xs'
usage = "Usage: #$0 FILENAME"
editor = ENV["VISUAL"] || ENV["EDITOR"] || "vi"
@@ -47,11 +47,11 @@
x!("#{editor} #{tmp.path}")
# avoid an expensive update if the user didn't change anything
current = File.binread(tmp.path)
if current == original
- $stderr.puts "tags for #{xs(Array(file))} unchanged" if $DEBUG
+ $stderr.puts "tags for #{xs(file)} unchanged" if $DEBUG
next
end
# we must remove existing tags before importing again
if remove_existing
@@ -63,10 +63,10 @@
cmd = %W(metaflac --import-cuesheet-from=#{tmp.path} #{file})
if ! system(*cmd) && backup
warn err_msg(cmd, $?)
warn "E: restoring original from backup"
x!(*%W(metaflac --import-cuesheet-from=#{backup.path} #{file}))
- warn "E: backup cuesheet restored, #{xs(Array(file))} unchanged"
+ warn "E: backup cuesheet restored, #{xs(file)} unchanged"
exit(false)
end
ensure
tmp.close!
backup.close! if backup