]> git.sesse.net Git - ccbs/blobdiff - parse/parse-ddrfreak-songlist.pl
Make the DDRFreak parse script also add the songs to machinesongs.
[ccbs] / parse / parse-ddrfreak-songlist.pl
index 9e404cfd85c27a64a150d31d20c1b1959c96ef67..a880275b6f13a9022ebaba1b2568d0a005709580 100644 (file)
@@ -92,6 +92,8 @@ while (<>) {
        # Insert the song only if it doesn't already exist
        printf "INSERT INTO songs SELECT nextval('songs_song_seq') AS song, '%s' AS title, '%s' AS artist, 0 AS minbpm, 0 AS maxbpm WHERE '%s' NOT IN ( SELECT title FROM songs );\n",
                $songname, $artist, $songname;
        # Insert the song only if it doesn't already exist
        printf "INSERT INTO songs SELECT nextval('songs_song_seq') AS song, '%s' AS title, '%s' AS artist, 0 AS minbpm, 0 AS maxbpm WHERE '%s' NOT IN ( SELECT title FROM songs );\n",
                $songname, $artist, $songname;
+       printf "INSERT INTO machinesongs SELECT ( SELECT song FROM songs WHERE title='%s' ), ( SELECT machine FROM machines WHERE machinename='%s' );\n",
+               $songname, $machine;
        
        for my $t (['single', 'beginner', $sb],
                    ['single', 'standard', $ss],
        
        for my $t (['single', 'beginner', $sb],
                    ['single', 'standard', $ss],