Author Topic: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)  (Read 539953 times)

Xander

  • Posts: 32
One thing that's been bothering me is the tag handling. xmp-scrobbler, looks for ID3v2, ID3v1, WMA and then for other tags. Like XMPlay, it should be looking for overridden tags (the 'Library' data block) first, then APE, ID3v2, ID3v1, WMA and other (Ogg, FLAC, etc.). I don't use overridden tags myself, but I do think they should be scrobblable (is that even a word? ;D). Could you squeeze that in there?

Sure, these are new builds contemplating that change, now the plugin looks for the tags in library first (both title and artist must be set to use the ones in library) and if it doesn't succeed looks for them in other tag blocks.

Also, it's now allowed to use a tag name as part of a tag. This can be difficult to understand so I'll write an example: if you have a title like this one ":Night APEv2:" (yes, I know it's really hard to have a title or album like this one, but the word "library" is more common :)) the old plugin might fail handling the data blocks, should be correct now.
« Last Edit: 7 Mar '10 - 16:10 by Xander »

Xander

  • Posts: 32
And if anyone is using SSL proxys this is the binary you should use. It has IPv6 and SSL enabled (so WinXP+ is required, if you need one with just SSL support tell me and I'll upload it).

This binary is bigger than the other ones because of the OpenSSL library, there're no things I could do :-\.

Fentiger

  • Posts: 14
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #602 on: 11 Mar '10 - 20:58 »
Thanks, Sounds v interesting, but I keep getting errors when opening the Zip files  :(

Dotpitch

  • Posts: 2871
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #603 on: 11 Mar '10 - 21:20 »
Thanks, Sounds v interesting, but I keep getting errors when opening the Zip files  :(
Use Firefox to download the files properly, or use gzip to unpack the 'invalid' zip files (Start > Run 'cmd' > execute 'gzip -d Recommended.zip' and rename the remaining Recommended file to xmp-scrobbler.dll).

Fentiger

  • Posts: 14
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #604 on: 11 Mar '10 - 21:43 »
Thanks for the info. I use Firefox anyway :) I'll give gzip a go now. I normally use 7-Zip to unzip files.

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #605 on: 12 Mar '10 - 15:03 »
For those that are having trouble downloading the attachments with particular browsers, the "gzip" encoding should now be disabled on attachments, so please try again.

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #606 on: 12 Mar '10 - 20:36 »
It was an odd thing, I tried to download them before the change with Opera and IE and both came up with that strange stream sort of compressed (because 7-Zip is able to handle gzip compression but could not handle the files).

I guess it may be a bug in SMF or some kind of incompatibilities among it and some browsers.

Anyway the downloads work now with those browsers :).

Dotpitch

  • Posts: 2871
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #607 on: 12 Mar '10 - 21:23 »
It was an odd thing, I tried to download them before the change with Opera and IE and both came up with that strange stream sort of compressed (because 7-Zip is able to handle gzip compression but could not handle the files).
The lighttpd server this forum is running on sends the zip inside a gzip stream (same to all browsers), but it looks like only FF actually decompresses that stream.
The file is compressed without a gzip header on transfer, since the HTTP header already tells the browser gzip is used. 7-Zip reads the file and encounters a regular zip header, but it has no idea of the additional gzip layer and fails at decompression.
For those that are having trouble downloading the attachments with particular browsers, the "gzip" encoding should now be disabled on attachments, so please try again.
Works properly now. Certainly an unexpected malfunction, are more SMF fora having this problem that you know of?

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #608 on: 13 Mar '10 - 00:38 »
Works properly now. Certainly an unexpected malfunction, are more SMF fora having this problem that you know of?

Not directly, I've read about some problems people had with corrupted downloads but there were several things that could be causing it, with PHP and different web servers among them, so it might be the current LightTPD and PHP 5.1.6 combination.

I've just tested some other SMF fora and attachments could be correctly extracted (compression was enabled in SMF, servers were Apaches and IISs).

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #609 on: 15 Mar '10 - 16:28 »
As far as I can see, it's a small oversight in SMF. Compression is disabled in the SMF config here, and is instead enabled server-wide in the PHP config (zlib.output_compression). SMF doesn't currently consider that scenario in its attachment sending (eg. it still sends a "Content-Length" header with the uncompressed size), so I just added an "ini_set" call there to disable the compression.

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #610 on: 18 Mar '10 - 15:58 »
For convenience, Xander's latest version (0.9.3) is now available in the 1st post. It's the build with SSL support enabled but not IPv6, so it should be compatible with all Windows versions.

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #611 on: 18 Mar '10 - 22:23 »
For convenience, Xander's latest version (0.9.3) is now available in the 1st post. It's the build with SSL support enabled but not IPv6, so it should be compatible with all Windows versions.

Thank you very much for everything Ian.

In case anyone wants to know, the difference between 0.9.2 (posted above) and this one is that now the plugin is set to be a "general" one (so it's excluded from saved settings) and version info was added to the file so that you can be notified of new versions via XMPlay's update notifications.

Also, in case anyone needs IPv6 support just let me know and I'll post it here.

Dotpitch

  • Posts: 2871
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #612 on: 19 Mar '10 - 12:21 »
... now the plugin is set to be a "general" one (so it's excluded from saved settings) ...
Oh. I've actually been using saved settings to load xmp-scrobbler when playing from my library folder and to not load it when playing from temporary folders, since the plugin has no option to not scrobble tracks from specific folders.

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #613 on: 20 Mar '10 - 11:12 »
Oh. I've actually been using saved settings to load xmp-scrobbler when playing from my library folder and to not load it when playing from temporary folders.

Oh, I didn't think of that use for it, please use this one instead which lets you use it in saved settings.

Dotpitch

  • Posts: 2871
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #614 on: 20 Mar '10 - 16:21 »
Oh, I didn't think of that use for it, please use this one instead which lets you use it in saved settings.
Thanks for the quick response :).

There's still a small deadlock in xmp-scrobbler. I have some files with cue sheets, which are scrobbled properly. If I however close XMPlay after a cue-track is scrobbled and later resume playback, I get this:
Code: [Select]
[INFO] CUE sheet found, current file contains 17 track(s)
[INFO] Current track: [artist] - [track]
[INFO] Submitting in -19 seconds...
xmp-scrobbler will wait until the submission timer reaches zero before doing anything, so it won't scrobble again until XMPlay opens the next file (not the next cue-track!) and the DSP chain is reset. Obviously, xmp-scrobbler should assume the track is already scrobbled and wait for a title change.

amit

  • Posts: 723
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #615 on: 20 Mar '10 - 18:23 »
Hello Xander. Thanks for taking over the development of this plugin.

Can you add support for wav files tags - streaming and regular? Some info can be found in the discussion held in 'suggestions to v3.5' here.

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #616 on: 22 Mar '10 - 19:34 »
Hello Xander. Thanks for taking over the development of this plugin.
You're welcome :).
Can you add support for wav files tags - streaming and regular?
I think it's done, but I'm not sure for streaming files, try the binary attached to this post and tell me if it works please.

There's still a small deadlock in xmp-scrobbler. I have some files with cue sheets, which are scrobbled properly. If I however close XMPlay after a cue-track is scrobbled and later resume playback, I get this:
Code: [Select]
[INFO] CUE sheet found, current file contains 17 track(s)
[INFO] Current track: [artist] - [track]
[INFO] Submitting in -19 seconds...

That's fixed too, now there shouldn't be any problem when closing XMPlay and resuming the playback.

I've also made some more changes, these are the significant ones:
 - CUE files: Now it's possible to seek through them either using the next track / previous track buttons or manually. Doing it manually won't disable the submission of the rest of the tracks there are anymore.
 - CUE files: Seeking or changing the playing track before the file info is fetched will no longer prevent the whole CUE listing from being submitted.
 - Restarting a track (pressing the stop button and then the play one) after seeking will no longer prevent it from being submitted.

Although I've tested its behaviour I've made some inner changes so if you find something strange please let me know. The binary is the general one, no processor nor OS requirements and SSL support.

EDIT: This one doesn't identify itself as a general plugin and can be used with saved settings.
« Last Edit: 22 Mar '10 - 21:01 by Xander »

Dotpitch

  • Posts: 2871
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #617 on: 22 Mar '10 - 21:42 »
That's fixed too, now there shouldn't be any problem when closing XMPlay and resuming the playback. I've also made some more changes, these are the significant ones: ...
Thanks :). I'll give it a go tomorrow and see if anything weird comes up.

amit

  • Posts: 723
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #618 on: 22 Mar '10 - 21:59 »
Can you add support for wav files tags - streaming and regular?
I think it's done, but I'm not sure for streaming files, try the binary attached to this post and tell me if it works please.

So far I have checked a few wav streams and it seems to be working only for shorter tracks. Loading wav streams takes longer so the tags  take about 10-20 seconds until available (the tags are stored in the end of files). May this be the problem?

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #619 on: 23 Mar '10 - 15:58 »
[So far I have checked a few wav streams and it seems to be working only for shorter tracks. Loading wav streams takes longer so the tags  take about 10-20 seconds until available (the tags are stored in the end of files). May this be the problem?

Yes, that is the problem. The plugin had a 10 second delay before getting the info so that's why shorter tracks were submitted correctly (from what I know this delay was introduced so that the plugin works in slow machines too).

I've modified the plugin and added a new checkbox to the plugin config dialog. By default there will be a 10 second delay before fetching the info on the track, you can increase this time, reduce it or use no delay at all (use this last option with care, the default setting is the best way to go in my opinion). If "Delay info fetch" is ticked the edit box next to it will ask you for a number of seconds to use (if left empty the delay will be 0, the same as not ticking this option). You may enter any number, but only the first 3 digits will be used (so in practice, the delay may be 0-999 seconds).

In your case try setting this value to 20 or 30 seconds, or whatever you deem appropriate; but take in mind that any track with less duration than this value will not be submitted (i.e. value set to 90 and 1 minute track).

Due to the changes, the internal data the plugin saves was changed, so if the plugin is just updated its configuration will be messed up (i.e. incomplete username, incorrect settings, ...). My recommendation is to remove the plugin from the plugins list, update it, and then add it again (and reconfigure it).

The attached binary can be used in saved settings and is the usual (SSL enabled, no restrictions).
« Last Edit: 23 Mar '10 - 20:52 by Xander »

Dotpitch

  • Posts: 2871
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #620 on: 23 Mar '10 - 18:59 »
Due to the changes the internal data the plugin saves was changed, so if the plugin is just updated its configuration will be messed up (i.e. incomplete username, incorrect settings, ...). My recommendation is to remove the plugin from the plugins list, update it, and then add it again (and reconfigure it).
Yeah, I've had some trouble getting it running again, but it works now (like the rest of the day). Perhaps the 'bad authorization'-message should be a warning and not just debug information?

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #621 on: 23 Mar '10 - 20:52 »
Yeah, I've had some trouble getting it running again, but it works now (like the rest of the day). Perhaps the 'bad authorization'-message should be a warning and not just debug information?

Sorry about that, new variables were needed to allow users change the delay, I hope the info message (bad authorization) gets people to the config. You're right, when there's a problem using the username and password provided a warning should be posted in the log to let the user know there's a problem in the login info so it's now added. I've updated the binary in the post.

Regarding the CUE related changes, I've made some more tests today and everything seems to be fine. I'll give a few days though until the update is notified to all users :).
« Last Edit: 23 Mar '10 - 20:55 by Xander »

amit

  • Posts: 723
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #622 on: 23 Mar '10 - 21:52 »
I've modified the plugin and added a new checkbox to the plugin config dialog. By default there will be a 10 second delay before fetching the info on the track, you can increase this time, reduce it or use no delay at all (use this last option with care, the default setting is the best way to go in my opinion). If "Delay info fetch" is ticked the edit box next to it will ask you for a number of seconds to use (if left empty the delay will be 0, the same as not ticking this option). You may enter any number, but only the first 3 digits will be used (so in practice, the delay may be 0-999 seconds).

Thanks. It works great now. This new checkbox can also define the shortest track that will be sent. This can be used to stop short intro or intermediate tracks from being sent. Right?

Another but minor issue : when moving by tab between different input areas in the plugin options gui they switch randomly without any order. Is there a way to order them more logically? ;)

Xander

  • Posts: 32
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #623 on: 24 Mar '10 - 18:45 »
This new checkbox can also define the shortest track that will be sent. This can be used to stop short intro or intermediate tracks from being sent. Right?

I'm afraid not, one of the points of the protocol 1.1 is: "Each song should be posted to the server when it is 50% or 240 seconds complete, whichever comes first."

That point is important for this matter, the plugin will get the tags of the current track once the delay is over (this only applies to the first track of a CUE sheet). At that time, a "submission timer" is set to either 50% of the song or 240 seconds and when that timer reaches 0 if the track is not dirty (by seeking for example) it will be submitted to the server.

XMPlay allows playback resuming, so you may be resuming the playback of a song already submitted. To prevent double submissions (among other things), I used the current position at the time of fetching the tags to identify whether the track should already been submitted or not. So, for example, if the fetching time is 64 seconds and the track lasts 2 minutes that track wont be submitted. The plugin will recognize that track as already submitted (half the time of the song would be 60 seconds, but the tags would be read 4 seconds after that time).

In the current version of the protocol the submission point was moved to the end of the track (or when another track begins to play) so this problem will not be present :).

When moving by tab between different input areas in the plugin options gui they switch randomly without any order. Is there a way to order them more logically?

There should be a way, I'll look into it :).

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)
« Reply #624 on: 9 Apr '10 - 16:57 »
Xander's latest update (0.9.6) is now available in the 1st post.