From 3a2a74abe7f1e9916b12cd4f7f90ff6bfc12e890 Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 9 Dec 2009 09:21:56 +0000 Subject: [PATCH] * write properly end lines in playlist /o\ --- mtopls | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.2