1 # -*- coding: utf-8 -*-
2 """Add playing tracks to history
5 # standard library import
7 # third parties components
10 from ...lib.plugin import Plugin
12 class History(Plugin):
16 def __init__(self, daemon):
17 Plugin.__init__(self, daemon)
21 self.log.info('Cleaning database')
22 self.sdb.purge_history()
23 self.sdb.clean_database()
25 def callback_next_song(self):
26 current = self.player.current
27 self.log.debug('add history: "{}"'.format(current))
28 self.sdb.add_history(current)
32 # vim: ai ts=4 sw=4 sts=4 expandtab