Implement suggestions.

This commit is contained in:
Valentin Boettcher 2018-10-06 14:28:24 +02:00
parent 32d6af835c
commit aeeb3008af
2 changed files with 2 additions and 13 deletions

View file

@ -206,18 +206,7 @@ class Track(object):
"callback" is called with "(track_id, error)" args after the
placount is incremented. (Optional)
"""
if gp.is_subscribed:
track_id = self.store_id
else:
track_id = self.library_id
def on_playcount_incremented(track_id, error):
if callback:
callback(track_id, error)
else:
pass
gp.increment_song_playcount_async(track_id, callback=on_playcount_incremented)
gp.increment_song_playcount_async(self.id, callback=lambda id_, error: callback(id_, error) if callback else None)
def get_url(self, callback):
"""

View file

@ -254,7 +254,7 @@ class _Player(object):
Increments the play count and advances to the next track.
"""
assert event
self.queue.get_current_track().increment_playcount_async()
self.queue.get_current_track().increment_playcount()
self.next()
def _media_position_changed(self, event):