playlist converter

General
2010-05-04
2013-04-16
  • Jeffrey Button
    Jeffrey Button
    2010-05-04

    simple php script to convert from an xmms playlist file to an mp3blaster playlist file

    <xmp>
    <?php
    $me=fopen('./playlist.pls','r');
    $met=fopen('./playlist.lst','w');
    $count=0;
    while ($line=fgets($me)) {
        if (strstr($line,'playlist')) {
            echo '<GLOBAL PLAYMODE="allgroups">';
            fwrite($met,'<GLOBAL PLAYMODE="allgroups">');
        } elseif(strstr($line,'NumberOfEntries')) {
        } else {
            $linestuff=explode('=',$line);
            echo $linestuff[1];
            fwrite($met,$linestuff[1]);
        }
        $count++;
    }
    ?>
    </xmp>