After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742336 - Last.fm integration
Last.fm integration
Status: RESOLVED DUPLICATE of bug 705070
Product: gnome-music
Classification: Applications
Component: general
3.15.x
Other Linux
: Normal enhancement
: 3.14
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-04 19:44 UTC by Nil Gradisnik
Modified: 2015-06-22 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Last.fm integration (13.50 KB, patch)
2015-01-04 19:44 UTC, Nil Gradisnik
none Details | Review

Description Nil Gradisnik 2015-01-04 19:44:33 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
Comment 1 Nil Gradisnik 2015-01-04 19:49:06 UTC
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
Comment 2 Vadim Rutkovsky 2015-01-05 13:56:24 UTC
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
Comment 3 Nil Gradisnik 2015-01-05 17:14:39 UTC
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.
Comment 4 Vadim Rutkovsky 2015-01-06 11:26:08 UTC
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 ***
Comment 5 Nil Gradisnik 2015-01-06 18:21:00 UTC
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.
Comment 6 Vadim Rutkovsky 2015-01-07 15:41:38 UTC
(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.
Comment 7 Nil Gradisnik 2015-01-07 17:20:06 UTC
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.
Comment 8 Allan Day 2015-06-22 09:26:23 UTC
(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.