[gnome-music/wip/mschraal/goa-music-disabled: 1/2] scrobbler: Use provider_type in last.fm check



commit 5f4d83aa2915d9e731493d789aa6342460a4f508
Author: Marinus Schraal <mschraal gnome org>
Date:   Mon Feb 5 17:25:05 2018 +0100

    scrobbler: Use provider_type in last.fm check
    
    provider_type property should be more reliable as it is not the
    user facing name.

 gnomemusic/scrobbler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/scrobbler.py b/gnomemusic/scrobbler.py
index bee6d61..617ae37 100644
--- a/gnomemusic/scrobbler.py
+++ b/gnomemusic/scrobbler.py
@@ -70,7 +70,7 @@ class LastFmScrobbler(GObject.GObject):
 
             for obj in accounts:
                 account = obj.get_account()
-                if account.props.provider_name == "Last.fm":
+                if account.props.provider_type == "lastfm":
                     self._authentication = obj.get_oauth2_based()
                     return
         except Exception as e:


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