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 647026 - Last.fm fingerprinting plugin keeps prompting for login information
Last.fm fingerprinting plugin keeps prompting for login information
Status: RESOLVED WONTFIX
Product: banshee
Classification: Other
Component: Community Extensions
2.0.0
Other Linux
: Normal normal
: 1.x
Assigned To: olivier dufour
Banshee Maintainers
gnome[unmaintained]
: 662521 664704 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-07 12:20 UTC by Nathaniel Sherry
Modified: 2020-03-17 09:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nathaniel Sherry 2011-04-07 12:20:09 UTC
I've tried authorizing the plugin with Last.fm, and the web page says that it has been authorized, but every time I run it, it asks for the username and password again and again.

I already have a last.fm account set up with the song-reporting plug-in, so I would have thought that it could use that. Maybe that part should be a separate bug report?

Ubuntu 10.10 32-bit, authorizing with Last.fm from Epiphany (Webkit) 2.30.2
Comment 1 Michael Martin-Smucker 2011-04-07 12:53:38 UTC
I can confirm this.  Banshee was already authorized with my Last.fm account for scrobbling purposes, but Fingerprinting still asked for my login information every time.
Comment 2 olivier dufour 2011-04-08 13:01:28 UTC
Hi,

It is because last.fm api use 2 kind of authentication process:
1) for regular webservice
2) for the fingerprint api

I use both to get artist, album,...
So have to ask login/passwork on last.fm and autorize banshee on website.
So you have to fillful both.
It will been ask 1 time by session.
It is reset if exception is throw during process.

The only thing, we can do next to store it is use gnome keyring /similar api on other system...
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2011-05-07 12:57:10 UTC
Any progress on this? I would like to help, if needed.
Comment 4 olivier dufour 2011-05-08 07:28:11 UTC
It is exactly the same need for podcast https://bugzilla.gnome.org/show_bug.cgi?id=492900
Anyway, we need to use standard solution to store password.
2 solutions :
- use keystorage.net (external lib to add as dependancy) check licence compatibility...
- provide our own access to keyring :
         >DPAPI on Windows
         >Keychain Services API on Mac OS X
         >GNOME-Keyring on Linux
gabriel, if you see this what is best according you?
Comment 5 Gabriel Burt 2011-05-09 19:31:03 UTC
Hrm, KeyStorage.Net looks interesting - already has GNOME keyring support, is MIT/X11 licensed.  It's GNOME keyring support does depend on gnome-keyring# though, where I think we should transition to the new FDO secrets DBUS api instead.  AFAICT keystorage.net isn't packaged on Linux anywhere either, which is a problem.
Comment 6 magowiz 2011-06-01 14:20:47 UTC
(In reply to comment #4)
> It is exactly the same need for podcast
> https://bugzilla.gnome.org/show_bug.cgi?id=492900
> Anyway, we need to use standard solution to store password.
> 2 solutions :
> - use keystorage.net (external lib to add as dependancy) check licence
> compatibility...
> - provide our own access to keyring :
>          >DPAPI on Windows
>          >Keychain Services API on Mac OS X
>          >GNOME-Keyring on Linux
> gabriel, if you see this what is best according you?

does the patch in #492900 fixes also authentication for lastfm fingerprint ?
Comment 7 olivier dufour 2011-06-02 20:48:13 UTC
no it do not store password in keyring but in db currently...
Comment 8 magowiz 2011-06-04 05:26:23 UTC
There is a last.fm command line client that works without password,
you can grab it here : 

svn://svn.audioscrobbler.net/recommendation/MusicID/lastfm_fplib


It is released under LGPL so I think you can use it .


Perhaps you could use it and wrap into fingerprinting extension, or you can study and eventually copy some code from it or again simply determine how this plugin connects to lastfm.
Comment 9 olivier dufour 2011-06-04 08:20:49 UTC
My first version come from that tool.

If you do more than 3 requests, you will be temporary banned.
So you have to authorize banshee. The bad news is that it used old auth system and not standard one. We have to send user/pwd with request.

The second auth is to get more detail else I only get artist and title (no album). it just need a token from last.fm. So you connect and authorize banshee and that s all.
Comment 10 magowiz 2011-06-04 15:51:53 UTC
(In reply to comment #5)
> Hrm, KeyStorage.Net looks interesting - already has GNOME keyring support, is
> MIT/X11 licensed.  It's GNOME keyring support does depend on gnome-keyring#
> though, where I think we should transition to the new FDO secrets DBUS api
> instead.  AFAICT keystorage.net isn't packaged on Linux anywhere either, which
> is a problem.

regarding this point I think you could create an  auth interface that depending on operating system and the environment calls the supported auth method.
Doing so the extension doesn't need to know it, it simply pass the auth parameters to the interface.
What do you think?
Comment 11 ubuntumuntu 2011-09-09 01:41:41 UTC
I'm not entirely sure that authentication is required *at all* for fingerprinting.

http://www.last.fm/api/show?service=441
track.getFingerprintMetadata

<quote>
Auth
This service does not require authentication.
</quote>

...but API key's required (not sure if gnome/banshee has/need it's own unique value, or already has one).
If push comes to shove, I'll apply for my own key & load it in a confg file, if required.
Comment 12 ubuntumuntu 2011-09-09 01:53:50 UTC
I'm not entirely sure that authentication is required *at all* for fingerprinting.

http://www.last.fm/api/show?service=441
track.getFingerprintMetadata

<quote>
Auth
This service does not require authentication.
</quote>

...but API key's required (not sure if gnome/banshee has/need it's own unique value, or already has one).
If push comes to shove, I'll apply for my own key & load it in a confg file, if required.
Comment 13 olivier dufour 2011-09-09 08:03:11 UTC
As written upper, without auth you can only send 3 requests in before banned for a moment....
Comment 14 ubuntumuntu 2011-09-10 00:03:37 UTC
I'm not all that clued up on the inner-working, but can only go on what is publicly documented.

2 things stand out:
* Although Auth is not required, registration is requestes as a condition for the use of the API, & an API key is provided. As stated before, if a simple mechanism is provided, I'll register for this for my own use & enter the requisite information once-off in a simple config file or dialogue
* According to the API spec & ToS:
** https://github.com/lastfm/Fingerprinter
<quote>
You can freely use fplib in your application without any restriction (see license.txt). Accessing the last.fm API services is restricted to our terms of services (see http://www.last.fm/api/tos). Basically you can do pretty much whatever you want as long as it's not for profit. 
</quote>
** http://www.last.fm/api/tos - section 4.4
<quote>
You will not make more than 5 requests per originating IP address per second, averaged over a 5 minute period, without prior written consent. 
</quote>

This seems to me to be a fairly modest request. 
Even if the lookups are throttled to 1 fingerprinting lookup per second (to leave requests for other last.fm functions, such as scrobbling, etc), this seems ample to do at least 60 lookups per minute.

What am I missing here?
Is it just that this particular function is not working as documented? 
If so, I'd be happy to contact last.fm to see what can be done to smooth over this process.
Comment 15 olivier dufour 2011-09-10 17:30:03 UTC
The TOS is not repespected. I have done a lot of test and still and the bnning system is far more aggressive. I post a comment on the forum on last.fm but never get any response...
Comment 16 ubuntumuntu 2011-09-10 21:56:24 UTC
@olivier (your message is slightly cryptic, sorry) - please provide a link to the forum post & I can *bump* it to try & get movement on the discussion.
Comment 17 olivier dufour 2011-09-11 06:43:19 UTC
here is the post :
http://www.lastfm.fr/group/Last.fm+Web+Services/forum/21604/_/653904
Comment 18 ubuntumuntu 2011-09-11 21:21:48 UTC
bumped the thread - maybe we can get some movement on that again.

is the API returning any error states/code that can be used for debugging the issue form the server/service-side?
Comment 19 boris boef 2011-10-13 10:35:34 UTC
I also have this problem. IS there a way around it already?
Comment 20 ubuntumuntu 2011-10-13 21:22:24 UTC
No - doesn't seem so.
I'm guessing we'll need the cooperation of the folks at last.fm, but I've not heard back from them.

I suggest that you add your voice to the last.fm forum to try & get attention on this again.
Comment 21 ubuntumuntu 2011-10-19 23:19:53 UTC
This may be a problem on the client-side.

This thread indicated that the API could be working OK with other clients: http://www.last.fm/group/Last.fm+Web+Services/forum/21604/_/751349/1

Has there been any traction on this recently?

If this problem persist, could we then please get this specific plugin downgraded from stable/release-worthy to experimental?
Comment 22 Andrés G. Aragoneses (IRC: knocte) 2011-10-19 23:48:45 UTC
(In reply to comment #21)
> could we then please get this specific plugin
> downgraded from stable/release-worthy to experimental?

This plugin is already not part of Banshee Core. It is in BansheeCommunityExtensions repository.
Comment 23 ubuntumuntu 2011-10-20 01:06:22 UTC
Thanks for the clarification - I see it in the Ubuntu Universe (i.e. community-maintained) repo, not Main.
Comment 24 olivier dufour 2011-10-20 07:17:39 UTC
It can be interesting to check with any packet sniffer (ethreal for example) what is the frame sent for the same file from other client.
Comment 25 ubuntumuntu 2011-10-20 20:34:04 UTC
good idea. think I'll do a TCP dump or wireshark intercept some time today
Comment 26 ubuntumuntu 2011-10-21 00:31:30 UTC
as per IRC request, link to last.fm forum post indicating functional API: http://www.last.fm/group/Last.fm+Web+Services/forum/21604/_/751349/1#f15594984
Comment 27 Andrés G. Aragoneses (IRC: knocte) 2011-10-23 15:25:03 UTC
*** Bug 662521 has been marked as a duplicate of this bug. ***
Comment 28 Bertrand Lorentz 2011-11-28 15:32:01 UTC
*** Bug 664704 has been marked as a duplicate of this bug. ***
Comment 29 Ismael Olea 2013-05-01 19:52:59 UTC
It is still happening with 2.7.0...

And seems after authorizing scrobbling brokes till restarting banshee.
Comment 30 André Klapper 2020-03-17 09:27:16 UTC
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather transfer the project
to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the
responsibility for active development again.
See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.