Skip to main content

Topic: foo_scrobble (Read 233 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • gix
  • [*]
foo_scrobble
foo_scrobble is a component that scrobbles to last.fm.

The old foo_audioscrobbler component is unmaintained and has various issues. This replacement:

  • Uses the current token-based submission API. You authorize the component with last.fm instead of entering your login credentials.
  • Manages the scrobble cache automatically. There is no need to manually submit the cache.
  • Handles intermittent network outages or reconnects well. No "waiting for handshake" issue.

URL: https://github.com/gix/foo_scrobble/
Use the releases tab to download.

To get started, open foobar's preferences, navigate to "Tools > Last.fm Scrobbling" and use the top button to authorize your client (it provides a tooltip with instructions).

You can post issues/requests here or on github directly.

  • TheQwertiest
  • [*][*]
Re: foo_scrobble
Reply #1
@gix:
Component works without problems so far =)

A few feature requests, if you don't mind:
  • Feature: 'Toggle Scrobbling' command in main menu.
    Description: This command enables\disables Last Fm scrobbling.
    Use cases:
    • Control scrobbling from other components, e.g. JScript panels or custom playlists.
    • Control scrobbling with keyboard shortcuts.
  • Feature: 'Elapsed % before submit' and 'Elapsed time before submit' in preferences page. Not really needed (see below).
    Description: The component scrobbles track only if one of the conditions from these fields is true.  Minimal values should be locked to something sensible though to prevent spamming.
    Use cases:
    • Some tracks might be very lengthy (e.g. over two hours), with 'Elapsed time before submit' it will be possible to submit them to LastFm even if they were not played completely.
    • 'Elapsed % before submit' helps to differentiate between skipping the track after listening it for a short time (don't want submit) and moving to the next track, when most of the track has been already played, for example when outro has started (want to submit).
  • Last Edit: 21 November, 2017, 10:08:42 AM by TheQwertiest

  • marc2003
  • [*][*][*][*][*]
  • Developer
Re: foo_scrobble
Reply #2
Last.fm already have their own guidelines in place which scrobbler authors are supposed to stick to. No matter how long a track is, you shouldn't have to listen for more than 4 minutes for it to count.

https://www.last.fm/api/scrobbling#when-is-a-scrobble-a-scrobble

Quote
When is a scrobble a scrobble?

A track should only be scrobbled when the following conditions have been met:

    The track must be longer than 30 seconds.
    And the track has been played for at least half its duration, or for 4 minutes (whichever occurs earlier.)



  • EpicForever
  • [*][*][*][*][*]
Re: foo_scrobble
Reply #3
To keep proper track of feature requests:
This plugin misses certain functionality from original one (blocking tracks from being scrobbled, based on tags). I added my own tag named "LFM_BLOCKED" and when it has value "1" or "yes" tracks are not scrobbled.
Use case:
On my PC there are ripped both my CDs and CDs of my wife. Sometimes I play her music for her from my account and honestly I don't want them to be counted on my LFM profile. Simple tag for all wife's CDs allowed me to achieve this.

  • TheQwertiest
  • [*][*]
Re: foo_scrobble
Reply #4
Last.fm already have their own guidelines in place which scrobbler authors are supposed to stick to. No matter how long a track is, you shouldn't have to listen for more than 4 minutes for it to count.
That's nice to know, thanks! Scratch that feature request from the list then =)

PS: Some of the scrobblers I've used on Android ignored those guidelines magnificently though :\

... blocking tracks from being scrobbled, based on tags ...
+1 on this.
  • Last Edit: 21 November, 2017, 10:11:15 AM by TheQwertiest

  • marc2003
  • [*][*][*][*][*]
  • Developer
Re: foo_scrobble
Reply #5
I've not tested this yet but given it has dialogs for artist/title title formatting, it should support not submitting based on tags like the old component.

Just make sure the value is blank if a certain condition is met and then the component should either not submit or last.fm will refuse the submission because of bad parameters. For example...

Code: [Select]
$ifequal(%rating%,1,,%artist%)

  • gix
  • [*]
Re: foo_scrobble
Reply #6
Tracks are only scrobbled when a next track starts or playback is stopped (and they are valid according to last.fm's guidelines). This works equally for local and streamed tracks. It would be possible to scrobble earlier but then you have to keep track of the current submission state across restarts or else you may scrobble a long track twice.

To keep proper track of feature requests:
This plugin misses certain functionality from original one (blocking tracks from being scrobbled, based on tags). I added my own tag named "LFM_BLOCKED" and when it has value "1" or "yes" tracks are not scrobbled.
Use case:
On my PC there are ripped both my CDs and CDs of my wife. Sometimes I play her music for her from my account and honestly I don't want them to be counted on my LFM profile. Simple tag for all wife's CDs allowed me to achieve this.

Just curious, where or how was this configured? I don't see this functionality in the old foo_audioscrobbler 1.4.7. Or do you mean another component?

Edit: Ah I see, it was just the fact that it ignores tracks without artist that could be used to do this.
  • Last Edit: 21 November, 2017, 10:32:51 AM by gix

  • marc2003
  • [*][*][*][*][*]
  • Developer
Re: foo_scrobble
Reply #7
Just looking at the readme, you don't need to link to the 64bit C++ redist as foobar2000 and your component are only 32bit.

  • EpicForever
  • [*][*][*][*][*]
Re: foo_scrobble
Reply #8
I've made some tests and... I think it is bit vague how this plugin works. It seems that I can not rewind track to make it scrobbled - looks like only track of which 100% of its length is listened is scrobbled, while 50% should be enough accordingly to L.fm rules, even if rewind was used - as long as total time was more than 50% of track.
Plugin says that it scrobbles something (would be nice to have information which exactly track was send - its title - just to make it more clear) and it scrobbles everything, no matter if tags are present or not - and that was confusing for me and that's why I asked for adding special functionality. Last.fm however filters tracks without title for example, so still expression
$if(%skip_lastfm%,,%title%)
put into "Field remappings - Title" causes that tracks with my special tag filled in are not visible in Last.fm . So let's say that requested functionality is de facto present in pipeline, but thanks to filtering applied on Last.fm servers, and not because it is implemented in plugin itself (plugin reports that it was scrobbled). But I suppose it shouldn't work like this. After changing it, it would be great if plugin was differentiating tracks that should not be scrobbled from others and if it was clearly printed in console ("Not scrobbling because: missing tile" or "Not scrobbling - insufficient legth" for example). Similarly to information about track being outside of ML.

  • gix
  • [*]
Re: foo_scrobble
Reply #9
I've made some tests and... I think it is bit vague how this plugin works. It seems that I can not rewind track to make it scrobbled - looks like only track of which 100% of its length is listened is scrobbled, while 50% should be enough accordingly to L.fm rules, even if rewind was used - as long as total time was more than 50% of track.
I cannot reproduce that. It tracks the total time the track has been played, regardless of any seeks (Same as foo_audioscrobbler).

Plugin says that it scrobbles something (would be nice to have information which exactly track was send - its title - just to make it more clear) and it scrobbles everything, no matter if tags are present or not - and that was confusing for me and that's why I asked for adding special functionality. [...]
Yes I was unaware that people were using these field mappings that way.

I've added a new release that allows skipping tracks based on a titleformat script and adds a mainmenu command to toggle scrobbling.


  • EpicForever
  • [*][*][*][*][*]
Re: foo_scrobble
Reply #10
I've made some tests and... I think it is bit vague how this plugin works. It seems that I can not rewind track to make it scrobbled - looks like only track of which 100% of its length is listened is scrobbled, while 50% should be enough accordingly to L.fm rules, even if rewind was used - as long as total time was more than 50% of track.
I cannot reproduce that. It tracks the total time the track has been played, regardless of any seeks (Same as foo_audioscrobbler).

(...)

OK, but it seems that foo_scrobble plugin requires that total tracked time is at least 100% length of the track. As far as I remember from my experiments foo_audioscrobbler was simply sending scrobble after half of this time was achieved. So I could listen to 20% of the song, then skip next 30% with seekbar AND on 80% of track length, track was scrobbled. And I could advance to next track at let's say - 82%. Still 50% was achieved (in 2 parts - 20% + 32% ) and everything was in accordance with the rules. In foo_scrobble, when I omit just 5% of the track - there is no scrobble. I haven't checked if I can search back and forth and scrobble is done if total listening time sums up to at least 100%. But it does not matter if scrobble should be sent after 50% (or after 4 minutes, whichever occurs first - as mentioned by marc2003).

  • gix
  • [*]
Re: foo_scrobble
Reply #11
OK, but it seems that foo_scrobble plugin requires that total tracked time is at least 100% length of the track. As far as I remember from my experiments foo_audioscrobbler was simply sending scrobble after half of this time was achieved. So I could listen to 20% of the song, then skip next 30% with seekbar AND on 80% of track length, track was scrobbled. And I could advance to next track at let's say - 82%. Still 50% was achieved (in 2 parts - 20% + 32% ) and everything was in accordance with the rules. In foo_scrobble, when I omit just 5% of the track - there is no scrobble. I haven't checked if I can search back and forth and scrobble is done if total listening time sums up to at least 100%. But it does not matter if scrobble should be sent after 50% (or after 4 minutes, whichever occurs first - as mentioned by marc2003).
As said earlier a track is submitted when the next one starts playing or playback is stopped even if the actual conditions are met earlier. This is no different than the other plugin.