
import java.util.List;

/**
 * convert playlist
 *
 * @author matecsaba
 */
public class pls2m3u {

    /**
     * the main
     *
     * @param args arguments
     */
    public static void main(String[] args) {
        if (args.length != 2) {
            playerUtil.put("usage: pls2m3u <source.pls> <target.m3u>");
            return;
        }
        playerUtil.put("reading " + args[0]);
        playerLyric txt = playerUtil.readup(args[0]);
        playerUtil.put("converting " + txt.size() + " lines");
        List<playerSong> pls = playerSong.txt2pls(null, txt);
        playerUtil.put("sorting " + pls.size() + " songs");
        playerSong.sort(pls);
        playerUtil.put("converting " + pls.size() + " songs");
        txt = playerSong.m3u2txt(pls);
        playerUtil.put("writing " + txt.size() + " lines to " + args[1]);
        playerUtil.saveas(txt, args[1]);
    }

}
