[gnome-music/wip/mschraal/scrobbling-crash-fix: 2/3] scrobbler: Use correct property notation
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/scrobbling-crash-fix: 2/3] scrobbler: Use correct property notation
- Date: Thu, 1 Oct 2020 14:14:37 +0000 (UTC)
commit 3d7830938117f2d42ff3ca2b0f8a90890f90994e
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Sep 16 09:43:33 2020 +0200
scrobbler: Use correct property notation
gnomemusic/player.py | 2 +-
gnomemusic/scrobbler.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index c0497a6e..64d29e48 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -562,7 +562,7 @@ class Player(GObject.GObject):
position = self._gst_player.props.position
if position > 0:
percentage = tick / self.props.duration
- if (not self._lastfm.scrobbled
+ if (not self._lastfm.props.scrobbled
and self.props.duration > 30.
and (percentage > 0.5 or tick > 4 * 60)):
self._lastfm.scrobble(current_song, self._time_stamp)
diff --git a/gnomemusic/scrobbler.py b/gnomemusic/scrobbler.py
index d133f2fa..c6f7defe 100644
--- a/gnomemusic/scrobbler.py
+++ b/gnomemusic/scrobbler.py
@@ -428,7 +428,7 @@ class LastFmScrobbler(GObject.GObject):
:param coresong: CoreSong to scrobble
:param time_stamp: song loaded time (epoch time)
"""
- self.scrobbled = True
+ self.props.scrobbled = True
if not self.props.can_scrobble:
return
@@ -442,7 +442,7 @@ class LastFmScrobbler(GObject.GObject):
:param coresong: CoreSong to use for now playing
"""
- self.scrobbled = False
+ self.props.scrobbled = False
if not self.props.can_scrobble:
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]