def callback_next_song(self):
current = self.player.current
- self.log.debug('add history: "{}"'.format(current))
+ self.log.debug('add history: "%s"', current)
+ if not current:
+ self.log.warning('Cannot add "%s" to history (empty or missing file)', current)
self.sdb.add_history(current)
def test_boolean_type(self):
self.assertFalse(bool(Track()))
+ for trk in [{}, {'artist': 'Devolt'}, {'artist': 'Devolt', 'file':''}]:
+ self.assertFalse(bool(Track(**trk)))
def test_albumartist(self):
trk = Track(albumartist='album_artist', artist='track_artist')