XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)

Started by yagood,

Xander

Strange... I can submit the track correctly.

I have isolated a clean environment, only with XMPlay 3.5.1 (the one from the website) and the plugin v0.9.6; the artist is recognized correctly, there's nothing wrong in the tags (http://openpaste.org/en/20913/).

Are you still having problems with missing letters? If so I've built a version of the plugin which creates an additional file ("State.txt") with some info. Please use this one and play a track that is not being recognized correctly, then post the contents of the file. You may play several tracks if you want, info on each track would appear, but State.txt is re-created each time XMPlay starts.

Here is the plugin: xmp-scrobbler.dll

eidam

lol??

this is very funny. the letters are not stripped with this version :D what the hell is happening?

state.txt:

Plugin data:
 - State: On
 - Ever configured: Yes
 - Fetch: Delayed (5)


http://openpaste.org/en/20929/

just when i thought i understand computers... :D

Xander

It is strange indeed, I didn't change anything in the plugin you downloaded (and have not changed the libraries nor the compiler), I only added this new file to know more about what was happening.

The part you posted is the first part of the state file, which gives some info on the plugin state. The second part appears when the plugin gets the info on the tracks, prints there the artist and title in hex. That was to know which letters there were really as I couldn't get it to fail here, but there is no need for this part right now.

Anyway, I'm glad it works now (sort of... I'd like to know what could be causing that behaviour). Using the "no-state" version of the plugin works too right?

eidam

it's not a first part; that's the whole content of the file. (wtf? :))

maybe the sole reinstalling of the plugin helped? :D

but i see a pattern here - turn on debug mode = scrobble all tracks, use state printing version = scrobble all letters.. :D

personally, i didn't try to revert the plugin, as i am happy with the functionality now :) but as i know how bug hunting feels like, i can try it during this week, if you want.

Xander

Well, there shouldn't be any problem with either the version posted in the first post of this thread or the one that creates the state file (as I said I only added the creation of the file, didn't change anything else in the code).

Quote from: eidamit's not a first part; that's the whole content of the file. (wtf? :))
Sure fair enough, I only added it for tracks with ID3v2 tracks (and not being in library); in the beginning it was thought for a quick diag of the situation and worked for me. If you wish to see that output you may re-download the file.

Quote from: eidampersonally, i didn't try to revert the plugin, as i am happy with the functionality now :) but as i know how bug hunting feels like, i can try it during this week, if you want.
I have revised the code, and there shouldn't be any problem of this kind (the original dev allowed to use for the artist and title up to 256 characters each). I don't really know what could have happened there. It must have been something temporary, don't worry ;).

eidam

damn, and just when i wanted to mark this issue resolved, i suddenly got Paramor in my library  :D :o ???

2010-05-03 08:00:07 [DEBUG] DSP_NewTrack (OPEN)
2010-05-03 08:00:08 [DEBUG] DSP_SetFormat( 1, 44100, 2 )
2010-05-03 08:00:11 [DEBUG] XMP_FetchInfo -- start
2010-05-03 08:00:11 [WARNING] No valid MusicBrainz ID found, consider using MusicBrainz taggers to tag this file properly!
2010-05-03 08:00:11 [DEBUG] XMP_FetchInfo -- end
2010-05-03 08:00:11 [DEBUG] len = 90, diff = 3
2010-05-03 08:00:11 [INFO] Current track: Paramor - Misguided Ghosts (Brand New Eyes)
2010-05-03 08:00:11 [INFO] Submitting in 87 seconds...
2010-05-03 08:00:31 [DEBUG] DSP_SetFormat( 1, NULL )
2010-05-03 08:00:31 [DEBUG] DSP_StopTrack
2010-05-03 08:00:31 [INFO] Track stopped
2010-05-03 08:00:31 [DEBUG] DSP_NewTrack (CLOSE)

Xander

That makes no sense...  ???

Did you re-download the state file plugin? If not, please do and use that one. Whenever you come across this again please upload that file (it should have both parts I mentioned now).

I'm afraid in the end there I may need to send you a more detailed build to gather more info on what's going on. What other plugins are you using?

eidam

re-downloaded from here http://dl.dropbox.com/u/2368102/xmp-scrobbler.dll

state.txt still has the only one part (how should i proceed to make it produce the other part?) - same as before (i promise i don't make this up! :))

aaand the letter gets stripped

2010-05-03 23:36:25 ----
2010-05-03 23:36:25 [INFO] Hello, this is xmp-scrobbler 0.9.6
2010-05-03 23:36:25 [DEBUG] GetVersion() = 393347078 (6.0, build 6002)
2010-05-03 23:36:25 [DEBUG] curl_version() = libcurl/7.20.0 OpenSSL/1.0.0 zlib/1.2.4
2010-05-03 23:36:32 [DEBUG] DSP_NewTrack (OPEN)
2010-05-03 23:36:32 [DEBUG] XMP_ScrobInit() started
2010-05-03 23:36:32 [DEBUG] CacheManager::Load()
2010-05-03 23:36:32 [INFO] Number of entries in the cache: 0
2010-05-03 23:36:32 [DEBUG] Scrobbler::init() - cache loaded, doing handshake...
2010-05-03 23:36:32 [DEBUG] XMP_ScrobInit() finished
2010-05-03 23:36:32 [DEBUG] DSP_SetFormat( 1, 44100, 2 )
2010-05-03 23:36:33 [DEBUG] Handshaking: Client up to date.
2010-05-03 23:36:33 [DEBUG] http://195.24.233.58:80/protocol_1.1
2010-05-03 23:36:33 [DEBUG] Submit interval set to 1 second(s).
2010-05-03 23:36:33 [DEBUG] Handshake successful.
2010-05-03 23:36:33 [INFO] Handshake with Last.fm server successful!
2010-05-03 23:36:36 [DEBUG] XMP_FetchInfo -- start
2010-05-03 23:36:36 [WARNING] No valid MusicBrainz ID found, consider using MusicBrainz taggers to tag this file properly!
2010-05-03 23:36:36 [DEBUG] XMP_FetchInfo -- end
2010-05-03 23:36:36 [DEBUG] len = 127, diff = 3
2010-05-03 23:36:36 [INFO] Current track: Paramor - Brick By Boring Brick (Brand New Eyes)
2010-05-03 23:36:36 [INFO] Submitting in 124 seconds...
2010-05-03 23:36:54 [DEBUG] DSP_SetFormat( 1, NULL )
2010-05-03 23:36:54 [DEBUG] DSP_StopTrack
2010-05-03 23:36:54 [INFO] Track stopped
2010-05-03 23:36:56 [DEBUG] DSP_NewTrack (CLOSE)
2010-05-03 23:37:08 [DEBUG] DSP_NewTrack (OPEN)
2010-05-03 23:37:08 [DEBUG] DSP_SetFormat( 1, 44100, 2 )
2010-05-03 23:37:11 [DEBUG] XMP_FetchInfo -- start
2010-05-03 23:37:11 [WARNING] No valid MusicBrainz ID found, consider using MusicBrainz taggers to tag this file properly!
2010-05-03 23:37:11 [DEBUG] XMP_FetchInfo -- end
2010-05-03 23:37:11 [DEBUG] len = 133, diff = 3
2010-05-03 23:37:11 [INFO] Current track: Paramor - The Only Exception (Brand New Eyes)
2010-05-03 23:37:11 [INFO] Submitting in 130 seconds...

plugins i use - the two default, xmp-scrobbler, winamp plugin wrapper. and in it, there is the shoutcast source 1.9.1. in the input section there is Advanced Audio Coding (rev. 6), CD Audio (rev 10b), FLAC (rev. 7) and Windows Media Audio (rev. 12)

Xander

Quote from: eidamstate.txt still has the only one part (how should i proceed to make it produce the other part?) - same as before (i promise i don't make this up! :))
Maybe the file was still cached by your browser, here you have a new one: debug.zip

In this one the state file should have 3 parts:
1. State of the plugin: if it's configured and which delay is being used in fetch.
2. Message block about the current playing track.
3. Current playing track info (only if not CUE).

To get 2 and 3 you have to wait the delay (if you didn't change it, 5 seconds). There will be 2 and 3 for each track played and the file will be overridden whenever XMPlay starts.

Let's hope we can track the problem, I'm sorry for all the problems it's causing to you :(.

eidam

whoa; i guess i forgot that windows machines need to be restarted once in 24 hours (apparently)

the state is here http://openpaste.org/en/20970/ - i played few files that get misspelled, some files however are correct; however, i can't spot any pattern.

plus i have to say that the advantage of a community this small and one-man-plugin-project is that i never got this intensive feedback from any developer yet ;) so, as you keep trying to figure out what's happening, i will keep trying to be as helpful as i can be.

Dotpitch

Quote from: eidamthe state is here http://openpaste.org/en/20970/ - i played few files that get misspelled, some files however are correct; however, i can't spot any pattern.
The failing files all have the Artist tag as the last ID3v2 entry, the others don't.

Xander

Quote from: eidamthe advantage of a community this small and one-man-plugin-project is that i never got this intensive feedback from any developer yet
Well yes, the plugin is small really :), collaboration between users and devs is easy under these characteristics. In bigger projects it's often complicated to get in touch with developers and expose issues and suggestions.

Quote from: DotpitchThe failing files all have the Artist tag as the last ID3v2 entry, the others don't.
You're right, but the behaviour seems to be arbitrary, I can't get it to fail here with files that are failing there. The current plugin doesn't use the GetTag function XMPlay offers but instead gets the whole message block and parses it. From the state file I can see the message block is ok, the problem must be when parsing it.

Here there are 2 more binaries:
 - Debug 2: Changed the 2nd part of the state file, now shows 2 strings for the artist to let me know more about what's happening there. Use this one and paste the contents of the state file please.
 - Different: In this one I changed how the tag is extracted, should be equivalent really, but I made use of different functions. Check this one out and tell if there are still missing letters.

Let's see how that goes... ;)

eidam

i just wonder - am i the only one with this problem? :D

state2 - http://openpaste.org/en/20999/ (the last two cranberries are different songs)

different - http://openpaste.org/en/21000/ (it's supposed to generate the state.txt too, isn't it?)

still cuts off the last letters :/

Xander

Quote from: eidami just wonder - am i the only one with this problem? :D
At least no one else reported it... The problem with this is that it appears to be random, so maybe in other computers it's working correctly and nobody came across this behaviour.

I've made a change that may fix the issue and is harmless to anyone not experiencing it (if only I could reproduce it...). Use this binary and tell us if everything is correct, if it's not... we'll have to deal with it later, I might not be able to work on it until this weekend.

This one generates a state file too, I didn't change that part yet; when everything is right and stable the changes will be in 0.9.7.

eidam

yay :) all works fine now :) i'll let you know if not, but it should be okay now :)

thanks a lot. what was the issue?

Xander

I'm glad it works!

The message block of a track contains several tags (for example, ID3v1, ID3v2 and APEv2), the plugin retrieves the it and chops it in these categories for later processing. The only thing I did was expanding the lower limit 1 character so that if the artist is in the last position it will have always all of its characters.

Once I investigate it further and see if it doesn't break anything it'll be in the next stable version. You may use this one if you don't want the state file to be generated by now.

Thank you very much for all your testing work :), kind regards.

eidam

hello, it's me again  ;D

don't throw rocks at me, but the 'should already been submitted' bug has reappeared! i just finished listening an album with all of the tags complete, and XMplay gave me only two scrobbles and this http://openpaste.org/en/21350/

do you think you can look onto it? i'd be very thankful :)

Xander

I think I have an idea why could that happen (even though I can't get that behaviour here), the info fetch delay is low and might be related as sometimes the seconds are not strictly counted (I'll have to look at that too).

In 0.9.7 the lower limit of the delay will be lifted from 0 to 10 seconds to avoid these problems, in the meanwhile you may increase the delay yourself which should avoid those messages.

Use the attached version of the plugin too, some things were changed and other restructured. One important part is that the messages posted in the log were changed for better understanding and will help understand situations like this, so if the delay is not what it's causing this it'll give further information.

eidam655

of course; why the hell did i turn that thing off?!

works alright now x-) and i like the verbosity of the new debug output. it's so much more... human :)

good luck onwards

EDIT: oh, and while I'm at it  - do you think you could do something to the cache? the hing is, that on weekends i am 'internet-less,' but still listen to music i would like to have scrobbled. unfortunately, i guess none of the tracks i listened to got uploaded to last.fm.
i don't know whether this is because of the 10 slot cache, or whether the cache is being cleared on every xmplay or system shutdown; but if i could request one feature, it would be this.

Dotpitch

Quote from: eidam655do you think you could do something to the cache? the hing is, that on weekends i am 'internet-less,' but still listen to music i would like to have scrobbled. unfortunately, i guess none of the tracks i listened to got uploaded to last.fm. i don't know whether this is because of the 10 slot cache, or whether the cache is being cleared on every xmplay or system shutdown; but if i could request one feature, it would be this.
Are you sure the tracks are not submitted? All non-submitted tracks should be in xmp-scrobbler.cache (which is not cleared on closing XMPlay or Windows), and they should be submitted in batches of 10 tracks once the connection with Last.fm is available again.