mirror of
https://github.com/vale981/clay
synced 2025-03-04 09:11:37 -05:00
Implement suggestions.
This commit is contained in:
parent
32d6af835c
commit
aeeb3008af
2 changed files with 2 additions and 13 deletions
13
clay/gp.py
13
clay/gp.py
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue