X-Git-Url: https://git.kaliko.me/?p=mpd-goodies.git;a=blobdiff_plain;f=mtopls;h=e1d5dace9c86f6b867069cdf2a9c0e2b31fb7bd3;hp=d44788920dc61d33cb898d3057e143022a66d5ca;hb=3a2a74abe7f1e9916b12cd4f7f90ff6bfc12e890;hpb=f903dca83b8628faf433c3cf3fd0b8959bcfc79f diff --git a/mtopls b/mtopls index d447889..e1d5dac 100755 --- a/mtopls +++ b/mtopls @@ -48,7 +48,6 @@ class MtoPls(object): self.cli = mconnect() self.current = self.cli.currentsong() self.cli.disconnect() - print self.current self._consume_sopt() self._create_playlist() self._controls_perm() @@ -91,6 +90,7 @@ class MtoPls(object): def _create_playlist(self): if not isfile(self.pls_path): + # TODO: add M3U header sys.stdout.write('Create new playlist: %s\n' % self.pls_path) open(self.pls_path, 'a').close() @@ -108,8 +108,10 @@ class MtoPls(object): def _run(self): """""" + # TODO: controls file is not already in playlist fd = open(self.pls_path, 'a') fd.write(self.current.get('file')) + fd.write('\n') fd.close() # Script starts here