[gnome-music/wip/mschraal/lastfm-scrobble-prop: 2/2] player: Minor cleanups



commit 50afc90fdb90ce2050bddada230649e25725e12d
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Jan 10 00:39:03 2018 +0100

    player: Minor cleanups
    
    Do not retrieve current_media needlessly again.
    
    _lastfm.scrobble and arguments can be on one line.

 gnomemusic/player.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index ddd3698..d8798d2 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -955,10 +955,9 @@ class Player(GObject.GObject):
                         # playlists here but removing it may introduce
                         # a bug. So, we keep it for the time being.
                         playlists.update_all_static_playlists()
-                        grilo.bump_play_count(self.get_current_media())
+                        grilo.bump_play_count(current_media)
                         grilo.set_last_played(current_media)
-                        self._lastfm.scrobble(
-                            current_media, self._time_stamp)
+                        self._lastfm.scrobble(current_media, self._time_stamp)
 
             except Exception as e:
                 logger.warn("Error: %s, %s", e.__class__, e)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]