From b1242a5cb143c6e7b48b94366ca1f2c474d98774 Mon Sep 17 00:00:00 2001
From: Christian Pointner <equinox@helsinki.at>
Date: Fri, 17 Apr 2015 15:23:46 +0000
Subject: convert democracy now locally before import - this fixes wrong
 samplerate detection


diff --git a/rhimport-dn b/rhimport-dn
index 0c5fb8e..47933f4 100755
--- a/rhimport-dn
+++ b/rhimport-dn
@@ -191,6 +191,16 @@ unless($IGNORE_HEADLINE) {
   print "\n";
 }
 
+print "converting $file ... ";
+my $infile = $file;
+$file =~ s/\.mp3$/.wav/;
+system("ffmpeg", "-i", $infile, "-acodec", "pcm_s16le", $file);
+if( $! != 0) {
+  die "ffmpeg returned with error: " . $!;
+}
+print "ok\n";
+unlink $infile;
+
 print "will import $file to dropbox $dropbox (cart=$to_cart)\n\n";
 
 my $error_cb = sub {
-- 
cgit v0.10.2