1 # -*- coding: utf-8 -*-
2 """Add playing tracks to history
5 # standart library import
6 #from select import select
8 # third parties componants
11 from ..lib.plugin import Plugin
13 class History(Plugin):
17 def __init__(self, daemon):
18 Plugin.__init__(self, daemon)
20 self.player = daemon.player
23 self.log.info('Cleaning database')
24 self.sdb.purge_history()
25 self.sdb.clean_database()
27 def callback_next_song(self):
28 current = self.player.current
29 self.log.debug('add history: "{}"'.format(current))
30 self.sdb.add_history(current)
34 # vim: ai ts=4 sw=4 sts=4 expandtab