Page 5 of 24

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 5:38 am
by AndréVonDrei
Works like a charm. Thank you very much.
Just have to say: AutoRateAccurate, here I come...

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 5:43 am
by Psyker7
AndréVonDrei wrote:Works like a charm. Thank you very much.
Just have to say: AutoRateAccurate, here I come...
Glad to hear it!

And that's the exact reason I wrote the script to start with :D

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 6:58 am
by cotp
Hello everyone,

I can't seem to make the script work, I am getting an error message (tried 1.7 and 1.8 ) here:

Image

Hope you can try and help me. Is it because my usename contains some "-" caracters ? Or is it another problem ?

Cotp

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 7:04 am
by Psyker7
cotp wrote:Hello everyone,

I can't seem to make the script work, I am getting an error message (tried 1.7 and 1.8 ) here:

Image

Hope you can try and help me. Is it because my usename contains some "-" caracters ? Or is it another problem ?

Cotp
Mind PM'ing me your last.fm username then?
It's a little strange that error, because that function should exist as long as you have windows installed...

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 7:08 am
by Psyker7
Peke wrote:2. Psyker7 Ask Trixmoto , Big_Berny, Bex or search their scripts to implement correct FormatURL Function top avoid future Unicode -> URL issues. Last.fm support URL format is like IE (at least that one work the best) using "%??" format for invalid chars.
Thanks, ironic thing is I'm already using a URL correction function found in one of Tknojnky's scripts, allegedly written by psyxnova and trixmoto :D

Code: Select all

Function fixurl(sRawURL)
	' Original psyxonova improved by trixmoto
Sadly the issue here wasn't with badly encoded URLs, but rather with badly encoded XML strings, caused by a combination of badly tagged music originally (which happens) and last.fm not sanity checking scrobbles / XML output for invalid ASCII characters.

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 10:25 am
by Funkafonik
That's great that the script now updates the LastPlayed field!

Only thing though is I've since updated the playcounts of my favorite bands and albums by hand in MM and I don't wanna risk running this script to get the LastPlayed and have all my work overwritten. Is there a way to ONLY update the LastPlayed and not the playcounts?

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 11:25 am
by AndréVonDrei
Funkafonik wrote:That's great that the script now updates the LastPlayed field!

Only thing though is I've since updated the playcounts of my favorite bands and albums by hand in MM and I don't wanna risk running this script to get the LastPlayed and have all my work overwritten. Is there a way to ONLY update the LastPlayed and not the playcounts?
If you only want to update the LastPlayed, it might be a good idea to check out Bex's AddRemove PlayStat script. Combine those two scripts, and you propably get what you are looking for.

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 11:34 am
by Funkafonik
AndréVonDrei wrote:
If you only want to update the LastPlayed, it might be a good idea to check out Bex's AddRemove PlayStat script. Combine those two scripts, and you propably get what you are looking for.
Really? That's what I use to change the playcounts, how can I update the LastPlayed from Last.FM with it?

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 2:51 pm
by Psyker7
Funkafonik wrote:That's great that the script now updates the LastPlayed field!

Only thing though is I've since updated the playcounts of my favorite bands and albums by hand in MM and I don't wanna risk running this script to get the LastPlayed and have all my work overwritten. Is there a way to ONLY update the LastPlayed and not the playcounts?
This script does not currently update the last played time so not sure what's happening there :p
With all the other scripts out there to do so and all the crap with play histories and stuff I thought it might be best to leave it out of this one. If enogih people do want it I'll take another look though, understand it's not likely to be particuarly accurate as it will only know what week a song was last played during.

Re: Last.fm Playcount Import [MM3]

Posted: Sun Mar 01, 2009 7:37 pm
by Psyker7
' Changes: 1.9
' - Fix: Last.FM usernames not parsing correctly if containing special chars

What I get for copy pasting other peoples code, the function name is actually supposed to be "Hex" not "DecToHex"
Go figure.

http://psykar.com/scripts/LastFmImport.mmip

Re: Last.fm Playcount Import [MM3]

Posted: Mon Mar 02, 2009 7:08 am
by cotp
Psyker7 wrote:' Changes: 1.9
' - Fix: Last.FM usernames not parsing correctly if containing special chars

What I get for copy pasting other peoples code, the function name is actually supposed to be "Hex" not "DecToHex"
Go figure.

http://psykar.com/scripts/LastFmImport.mmip
Thanks for the fix Psyker7. Worked well :)

Now when I use Tagging Inconsistencies 3.9.4 (2009-01-10), it says More Playcount than in MM internal history (try it)... Something missing ?

Cotp

Re: Last.fm Playcount Import [MM3]

Posted: Mon Mar 02, 2009 11:09 pm
by Psyker7
cotp wrote:
Now when I use Tagging Inconsistencies 3.9.4 (2009-01-10), it says More Playcount than in MM internal history (try it)... Something missing ?

Cotp
Due to the fact that Tagging inconsistancies and the Playstat editor exist, I'm leaving internal history plays and last played time alone for the moment, mainly due to the fact that you cannot accurately get the exact played time of a track from last.fm if it's more than a month ago.
If this isn't an issue for people I can start looking into it, but it's likely to take a while, as I'll have to compare current histories in MM vs. weekly histories on last.fm and what to do if we can't reconcile them etc.

Any ideas on how you would like this to work are welcome!

Re: Last.fm Playcount Import [MM3]

Posted: Fri Mar 06, 2009 12:57 pm
by Unfoldingdrama
Hi,

Your script looks excellent, however I'm unable to get it to fully execute. When downloading the weekly charts I receive an error on week 93.

"You have an error: An invalid character was found in text content."

This is then followed by a series of runtime errors that Media Monkey throws up. My Last.fm username is the same as my username on this board.

Re: Last.fm Playcount Import [MM3]

Posted: Tue Mar 10, 2009 7:36 am
by Psyker7
Unfoldingdrama wrote:Hi,

Your script looks excellent, however I'm unable to get it to fully execute. When downloading the weekly charts I receive an error on week 93.

"You have an error: An invalid character was found in text content."

This is then followed by a series of runtime errors that Media Monkey throws up. My Last.fm username is the same as my username on this board.
Fixed, sorry it took so long.

Does anyone know a definitive list of invalid XML characters? I can't seem to find one anywhere :|

' Changes: 1.10
' - Fix: More invalid xml characters checked

http://psykar.com/scripts/LastFmImport.mmip

Re: Last.fm Playcount Import [MM3]

Posted: Tue Mar 10, 2009 8:50 am
by Unfoldingdrama
No need to apologize, It's your own time, sweat and tears. I am eternally grateful for this though. It works perfectly and I have been able to retrieve a lot of playcounts for files that became corrupted when I reorganised my library over a year ago.

The plugin works perfectly and I just wanted to say thank you for all the work you put into it.