X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fcore.py;h=694928fa77815ddd017aab71c4b2c9aadd2a4b78;hb=5c2b74bd18e344432a92ff20fefe68968843d61e;hp=ceaa09244ce480338309ca3a0bdfd70368ef4754;hpb=cf5fee72c57cf6b6f09b9caa78ab9e547f1d7542;p=mpd-sima.git diff --git a/sima/core.py b/sima/core.py index ceaa092..694928f 100644 --- a/sima/core.py +++ b/sima/core.py @@ -2,7 +2,7 @@ """Core Object dealing with plugins and player client """ -__version__ = '0.12.0.b' +__version__ = '0.12.0pr1' __author__ = 'kaliko jack' __url__ = 'git://git.kaliko.me/sima.git' @@ -27,6 +27,7 @@ class Sima(Daemon): self.enabled = True self.config = conf self.sdb = SimaDB(db_path=conf.get('sima', 'db_file')) + PlayerClient.database = self.sdb self.log = getLogger('sima') self.plugins = list() self.player = self.__get_player() # Player client @@ -76,9 +77,8 @@ class Sima(Daemon): if pl_callback: to_add.extend(pl_callback) if not to_add: - self.log.warning('Queue plugins returned anything!') + self.log.warning('Queue plugins returned nothing!') for plugin in self.plugins: - self.log.info('calling fb for {}'.format(plugin)) pl_callback = getattr(plugin, 'callback_need_track_fb')() if pl_callback: to_add.extend(pl_callback) @@ -115,7 +115,6 @@ class Sima(Daemon): self.log.info('The way is shut, it was made by those who are dead. ' 'And the dead keep it…') self.log.info('bye...') - sys.exit(0) def run(self): """ @@ -132,6 +131,7 @@ class Sima(Daemon): except PlayerError as err: self.log.warning('Player error: %s' % err) self.reconnect_player() + del(self.changed) def loop(self): """Dispatching callbacks to plugins