GNOME Bugzilla – Bug 742336
Last.fm integration
Last modified: 2015-06-22 09:26:23 UTC
Created attachment 293719 [details] [review] Last.fm integration Gnome Music should be able to integrate with the last.fm music service. At the minimum it should be able to scrobble music tracks. Documentation on how to implement a desktop client can be found here: http://www.last.fm/api/desktopauth
Originally I created a pull request on github: https://github.com/GNOME/gnome-music/pull/5 The only thing that's missing in this patch is passing last.fm API key and secret to constructor in application.py:144 Whoever will create an API account on last.fm should store the credentials (preferably not in the repo) and pass them to the constructor. http://www.last.fm/api/accounts
We already have a tracking issue for Last.fm - bug 705070, can we move on that bug? Looks good to me, except I'd have the toggle setting in dconf also - people usually don't turn on and off last.fm integration too often. (In reply to comment #1) > The only thing that's missing in this patch is passing last.fm API key and > secret to constructor in application.py:144 We can do that, waiting for response from designers, as it (slightly) affects UI
Sure thing, we can move it there. There is a toggle setting in dconf it's the 'lastfm-scrobble' boolean key. I agree that people don't toggle this too often. I added the toggle action to app menu since there's no other place to put it, the app doesn't have a settings view or something similar. Honestly I don't really care where this action will be placed, that was just the easiest way to do it for me.
Thanks, the patch looks nice, though we can't apply it now and advertise this feature yet - setting a session key is way too complicated for users - and we don't want to piss them off. I'm gonna close this bug as a duplicate and re-use the patch after Last.fm integration will land in GOA (see bug 728621) *** This bug has been marked as a duplicate of bug 705070 ***
Hey Vladim, did you even try applying this patch? It has everything you need for a fully functional last.fm scrobble integration. There's no "manual setting a session key" by a user, it's all done automatically by clicking the Last.fm app menu action. I encourage you to apply the patch and pass my last.fm API credentials: key: f56cefecb72e219b58bb9018d2600617 secret: d6ba6dc209fb808a4aa90300cfe2f08a (I don't care about exposing these credentials since this is only for testing) I did this because I wanted last.fm integration for myself and I thought it would be worth sharing the code. I like the idea of GOA integration, but since it's not available yet, you could easily use my implementation and bring this functionality to gnome-music users now.
(In reply to comment #5) > It has everything you need for a fully functional last.fm scrobble integration. > I like the idea of GOA integration, but since > it's not available yet, you could easily use my implementation and bring this > functionality to gnome-music users now. It misses a critical part - UI for setting keys, as a result we can't add this code to master. But fear not - we'll reuse this as soon as GOA code will land. Otherwise I have no objections.
I see the confusion. Sorry for not being more clear. I think what you are referring as 'settings keys' are last.fm API key and secret that need to be passed to the constructor which I omitted from the patch. You generate those only once and use them only to identify an application(gnome-music) that needs access to last.fm APIs. If you have an account on last.fm go here(http://www.last.fm/api/accounts) and you'll see what I'm talking about. So it's up to a developer to set these keys, not the user. The reason I didn't include these keys with the patch is because: 1. it's unsafe having secret keys visible to public 2. I was hoping you have a way to store secret credentials outside python source and possibly pass them in at build time? 3. I figured you guys will want the control over the last.fm application account Honestly there's not real threat having secret exposed. But you are allowing 3rd party developers/hackers to potentially 'abuse' your last.fm application account identity. (malicious app could identify it self as gnome-music using last.fm API) Hope this clears things up a bit.
(In reply to Nil Gradisnik from comment #7) > I see the confusion. Sorry for not being more clear. ... Perhaps it would be best to reboot this discussion on bug 705070? I'd be happy to provide design guidance for any UI that needs to be added.