Last.fm Playcount Import (2010-03-28) [MM3/4]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by Psyker7 »

mcow wrote:
Psyker7 wrote:You should be able to auto-update from inside MM though (loving the new addon repo)
"No update server available." (As opposed to "No update available" seen on other extensions.)
Are you using one of the beta versions? I tested the upgrade process myself this morning and it worked fine :o
jfarr
Posts: 13
Joined: Wed Jan 20, 2010 1:54 pm

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by jfarr »

Hi there.

I have adopted an approach to the "Fuzzy Logic" matching as follows.

I have created a separate SQLite database, which I attach to the MM database when the script runs. It stores the full history of the Last FM played list. When it imports a new item, it fist of all looks it up on the MM database, and if it doesn't find it, it looks it up on the new SQLite database, to see if it's been processed before. If it has, that gives it the "mapping" if you like, to the MM track details. If it's the first time it's been played (or potentially LastFM has auto-corrected it to something else) it opens up an ActiveX control that lists first the possible artists (from MM), then the possible albums, and then the possible tracks. Any of those last steps are missed out if the LastFM details match the artist, album, or track name exactly. When the user identifies the correct track, the new table is updated, and thence if it ever comes up again, the script auto-corrects.

The script occasionally cross-checks the total number of plays in the MM database at a track level, with the new history table, and overrides those on MM if they have got out of step. This caters for scenarios where a mobile device scrobbles only when connected to WiFi, but in the meantime Sonos is scrobbling constantly - but it could also cater for the scenario where MM is scrobbling, so preventing double counting.

The ActiveX control is fairly simple, but I am not sure how easy it would be to distribute, given that it was created with VB Express (2010), and it doesn't seem to be possible to create a distribution package for dll's.

Anyway, it's an idea, and it has been working well for me for the last few days.

Jules
epiq
Posts: 7
Joined: Sun Mar 10, 2013 3:07 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by epiq »

Hello!

I'am trying to import play counters from lastFM, but got always got

Error was encountered, rerunning will resume where you left off
<class "lastfm.error.OperationFailedError'>:
Error fetching recent tracks


My LastFM contains ~1000 pages of play counters, and script always failed somewhere at first 3 hundred's , andd each time on different page.
How I can fix it?

ps. resuming also not work - every rerun begin from 1 page =\

Version: LastFmImport-3.2.mmip
MM - also last version 4.0.7.1511

Thanks,
Epiq Sty
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by Psyker7 »

What's your username on last.fm?
It's interesting that it starts from scratch each time - it should still say fetching track 1 of xxx. But xxx should be lower each time if it's making it through a couple of hundred tracks first!
epiq
Posts: 7
Joined: Sun Mar 10, 2013 3:07 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by epiq »

Hi, my LastFM name is epiq.
Last error was:

Error was encountered, rerunning will resume where you left off
<class "lastfm.error.OperationFailedError'>:Error in parsing XML: not well-formed (invalid token): line 2397, column 58


Every time , when script started - it's write the same pages number = 1013.

Where I can find this XML ? (Error in parsing XML: not well-formed (invalid token): line 2397, column 58)
epiq
Posts: 7
Joined: Sun Mar 10, 2013 3:07 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by epiq »

Now - same error , but
Error was encountered, rerunning will resume where you left off
<class "lastfm.error.OperationFailedError'>:Error in parsing XML: not well-formed (invalid token): line 2410, column 58
May be I can take that XML and fix it manually?
thiagorobis
Posts: 10
Joined: Sun Sep 30, 2012 6:08 pm

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by thiagorobis »

Is this script working well at Windows 8?
I tried with my Win8 64bits and MediaMonkey last version stable and the script dosen't work, even open after install.
I'm using python beta version. No error was showed.
Thanks
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by Psyker7 »

thiagorobis wrote:Is this script working well at Windows 8?
I tried with my Win8 64bits and MediaMonkey last version stable and the script dosen't work, even open after install.
I'm using python beta version. No error was showed.
Thanks
Can't test Windows 8 I'm afraid.

Try the current version (not the beta) - 3.2: http://psykar.com/script-files/LastFmImport-3.2.mmip
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by Psyker7 »

epiq wrote:Now - same error , but
Error was encountered, rerunning will resume where you left off
<class "lastfm.error.OperationFailedError'>:Error in parsing XML: not well-formed (invalid token): line 2410, column 58
May be I can take that XML and fix it manually?
I'm doing some testing now. The XML is what last.fm gives us, and it's damn annoying if they give us badly formed XML.
I'll see what I can do.
epiq
Posts: 7
Joined: Sun Mar 10, 2013 3:07 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by epiq »

Psyker7 wrote:
epiq wrote:Now - same error , but
Error was encountered, rerunning will resume where you left off
<class "lastfm.error.OperationFailedError'>:Error in parsing XML: not well-formed (invalid token): line 2410, column 58
May be I can take that XML and fix it manually?
I'm doing some testing now. The XML is what last.fm gives us, and it's damn annoying if they give us badly formed XML.
I'll see what I can do.
Thanks, a lot!
I will looking forward for any results ;)
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by Psyker7 »

epiq wrote:
Psyker7 wrote:
epiq wrote:Now - same error , but
Error was encountered, rerunning will resume where you left off
<class "lastfm.error.OperationFailedError'>:Error in parsing XML: not well-formed (invalid token): line 2410, column 58
May be I can take that XML and fix it manually?
I'm doing some testing now. The XML is what last.fm gives us, and it's damn annoying if they give us badly formed XML.
I'll see what I can do.
Thanks, a lot!
I will looking forward for any results ;)
Your username seems to have some quirks :P
I have at least got it to save it's current progress when the error is raised, but haven't been able to find the specific error as yet. Hoping to get a bit more time on it over the weekend!
epiq
Posts: 7
Joined: Sun Mar 10, 2013 3:07 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by epiq »

Your username seems to have some quirks
I have at least got it to save it's current progress when the error is raised, but haven't been able to find the specific error as yet. Hoping to get a bit more time on it over the weekend!
huh ;)
last few years i have used Songbird for my huge music library ( ~100k files) -they have amazing mash tape and other cute thing's but now moved to mediamonkey away from annoying repeated library crashes in Songbird.
only one thing i can't do now - make import of played counter's from last.fm - but i hope for success)
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by Psyker7 »

epiq wrote:
Your username seems to have some quirks
I have at least got it to save it's current progress when the error is raised, but haven't been able to find the specific error as yet. Hoping to get a bit more time on it over the weekend!
huh ;)
last few years i have used Songbird for my huge music library ( ~100k files) -they have amazing mash tape and other cute thing's but now moved to mediamonkey away from annoying repeated library crashes in Songbird.
only one thing i can't do now - make import of played counter's from last.fm - but i hope for success)
Well, who knows what you were actually listening to, but this is the page causing everything to hiccup (even my browser doesn't like it)

http://ws.audioscrobbler.com/2.0/?metho ... 1188601200

Unfortunately last.fm still hasn't fixed this:
http://www.last.fm/group/Last.fm+Web+Se ... 4/_/626352
epiq
Posts: 7
Joined: Sun Mar 10, 2013 3:07 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by epiq »

Well, who knows what you were actually listening to, but this is the page causing everything to hiccup (even my browser doesn't like it)

http://ws.audioscrobbler.com/2.0/?metho ... 1188601200

Unfortunately last.fm still hasn't fixed this:
http://www.last.fm/group/Last.fm+Web+Se ... 4/_/626352
I have suspected something like that, but may be we can just ignore this errors?

I think , that Vandelay add-on for Songbird (http://addons.songbirdnest.com/addon/1458) also done skipping of this errors because it's always make counter's import from my last.fm account without any error messages.
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import (2010-03-28) [MM3/4]

Post by Psyker7 »

epiq wrote:
Well, who knows what you were actually listening to, but this is the page causing everything to hiccup (even my browser doesn't like it)

http://ws.audioscrobbler.com/2.0/?metho ... 1188601200

Unfortunately last.fm still hasn't fixed this:
http://www.last.fm/group/Last.fm+Web+Se ... 4/_/626352
I have suspected something like that, but may be we can just ignore this errors?

I think , that Vandelay add-on for Songbird (http://addons.songbirdnest.com/addon/1458) also done skipping of this errors because it's always make counter's import from my last.fm account without any error messages.
Yeah I've got a work around, it's annoying and hacky though. Testing it at the moment with a fresh run on your account. It might take a while obviously, but I'd prefer it to complete before I release the update.
Post Reply