lastfm / lastfm-desktop

The official Last.fm desktop application suite
http://www.last.fm
GNU General Public License v3.0
462 stars 94 forks source link

Now Playing Tab Doesn't Work on Linux #21

Closed CLloyd24 closed 11 years ago

CLloyd24 commented 11 years ago

The Now Playing tab does not work on Linux when playing music from third party players. I can see info when using the radio but not for example Spotify/Banshee, regardless of whether I enable their scrobblers or not in the third party player or whether or not I enable Fingerprinting in the Scrobbler.

Using the Scrobbler on Mac the Now Playing tab correctly reports information about the currently playing song on iTunes/Spotify using fingerprinting.

eartle commented 11 years ago

Yep, as @jstamp said, none of the Linux media players scrobble through us so we aren't able to show now playing information. We can only fetch what you're listening to by making a web service call to Last.fm and I don't want to have to poll that service to keep the now playing app updated. Users will get upset if we're making API calls every few seconds in the background whenever you have the app open and it would also be a strain on our servers if every user with the app was making that many calls.

We made a prototype a while ago that used a real-time streaming API to keep the now playing tab updated to whatever you're scrobbling which would do what you want. Unfortunately the API is not production ready, but I'm trying to get it moved up the priority list as I'd love to see this feature across all platforms.

CLloyd24 commented 11 years ago

But the weird thing is that on Mac, the Scrobbler reports (but doesn't record) the currently playing song, whether scrobbling is enabled or not in Spotify. I thought it was doing this by using the fingerprinting ability. Why would Spotify notify the Scrobbler on Mac but not Linux? I guess I just have to hope to hope that Linux players get updated or Last.fm updates their API.

Thanks.

eartle commented 11 years ago

We have ways of finding out what the Spotify app is doing on Windows (text in the window title) and Mac (AppleScript interface) and we use that to display what you're listening to. It's the only app, other than the ones that have Scrobbler plugins, that we display in the Now Playing and it happens because we are sniffing around, not because Spotify is telling us specifically.

As I said, if the desktop app talked to the Last.fm servers we'd be able to find out about all music from all apps that you are scrobbling from, but that would be quite a large task to make production ready. It's something I'd really like to do though.

lephuongbg commented 11 years ago

Why won't you use MPRIS2 interface to detect the currently playing song on any players in Linux? Almost all media players support that.

jstamp commented 11 years ago

This works well for me, but it'd be nice if someone else tried it out too: #35

@eartle: Note I had to make a small change to a translated string in ProgressBar.