#!/usr/bin/perl
use strict;

my $line;
while ($line = <>) {
# $1 => songid
# $2 => artist
# $3 => page
# $4 => trackname
# $5 => albumname
# $6 => tracknum
# $7 => year
# $8 => mp3genre
# $9 => magnatunegenres
# $10 => seconds
# $11 => less useful info
    $line =~ s/INSERT INTO magnatune_song_info VALUES \(([0-9]+),'(.*)','(.*)','(.*)','(.*)',([0-9]+),([0-9]+),'(.*)','(.*)',([0-9]+)(.*)\);/INSERT INTO Tracks VALUES ($1,'','audio\/mpeg','$2','','$5','','','','$4','$8',$7,$6,0,$10,0.0,0.0,0.0,0.0,0,0,0,0,0);/;
    print $line;
}
