self.cli = mconnect()
self.current = self.cli.currentsong()
self.cli.disconnect()
- print self.current
self._consume_sopt()
self._create_playlist()
self._controls_perm()
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()
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