Adding Last Fm Plays from textfile 0.1

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Adding Last Fm Plays from textfile 0.1

by Gurb » Tue Mar 25, 2008 8:45 am

m0nkiii wrote:
I probably won't work with MM3. I did it for MM2 back in the days :P
Any chance of giving it a go in MM3? :roll:

by m0nkiii » Tue Mar 25, 2008 7:53 am

Gurb wrote:
Spazz wrote:Alright, I used the perl script posted here to make the text file but I get an error whenever I try to use it. I am selecting a series of songs and then activating the script through the tools menu. I get this error.

"There was a problem querying the database:
Error executing SQL " UPDATE Songs INNER JOIN Artists ON Songs.IDArtist =Artists.ID Set Songs.PLaycounter = 5 WHERE Songs.Songtitle = '...but home is nowhere' AND Artists.Artist = 'AFI'
" : near "INNER" : syntax error (1, 1)"

If I have nothing selected and I activate the script, I get a blank information box with a blank button to press which does nothing. :(

Any ideas on what's causing this?

::edit:: A second error pops up directly after the first referring to line 62, column 15
I get the same error...maybe this script is not suitable for MM3?

It's a shame though, I'd like this to work too, as I lost all play counts recently
I probably won't work with MM3. I did it for MM2 back in the days :P

by Gurb » Tue Mar 25, 2008 7:22 am

Spazz wrote:Alright, I used the perl script posted here to make the text file but I get an error whenever I try to use it. I am selecting a series of songs and then activating the script through the tools menu. I get this error.

"There was a problem querying the database:
Error executing SQL " UPDATE Songs INNER JOIN Artists ON Songs.IDArtist =Artists.ID Set Songs.PLaycounter = 5 WHERE Songs.Songtitle = '...but home is nowhere' AND Artists.Artist = 'AFI'
" : near "INNER" : syntax error (1, 1)"

If I have nothing selected and I activate the script, I get a blank information box with a blank button to press which does nothing. :(

Any ideas on what's causing this?

::edit:: A second error pops up directly after the first referring to line 62, column 15
I get the same error...maybe this script is not suitable for MM3?

It's a shame though, I'd like this to work too, as I lost all play counts recently

by onkel_enno » Mon Mar 17, 2008 2:24 am

Mthrsuperior wrote:sorry if I'm hijacking here BUT:
My dream is to be able to ditch my iPod firmware and use http://www.rockbox.org/ on my iPod.
What keeps me from doing this is that Rockbox doesn't keep a play count database that MM can read and this is important to me as all my playlists are dependant on play counts and last played dates.
Rockbox does however make a txt file of songs played for uploading to last.fm.
You can all do that with rockbox.
You can update your MM-Playcounts with the playcounts of your rockbox with my SansaMonkey. It's designed for Sandisk Sansas, but as you are using Rockbox, you can use it too.
You can also upload the .scrobbler.log from rockbox with it.

by m0nkiii » Sun Mar 16, 2008 6:59 am

Spazz wrote:Alright, I used the perl script posted here to make the text file but I get an error whenever I try to use it. I am selecting a series of songs and then activating the script through the tools menu. I get this error.

"There was a problem querying the database:
Error executing SQL " UPDATE Songs INNER JOIN Artists ON Songs.IDArtist =Artists.ID Set Songs.PLaycounter = 5 WHERE Songs.Songtitle = '...but home is nowhere' AND Artists.Artist = 'AFI'
" : near "INNER" : syntax error (1, 1)"

If I have nothing selected and I activate the script, I get a blank information box with a blank button to press which does nothing. :(

Any ideas on what's causing this?

::edit:: A second error pops up directly after the first referring to line 62, column 15
Maybe the song: Songs.Songtitle = '...but home is nowhere' AND Artists.Artist = 'AFI' doesn't exist in your database, not exactly those letters ?
It's not the perlscript that's the problem ? You get the correct txt-file from it ?

by Spazz » Sun Feb 10, 2008 5:19 pm

No idea what's wrong? :(

by Spazz » Thu Feb 07, 2008 2:54 am

Alright, I used the perl script posted here to make the text file but I get an error whenever I try to use it. I am selecting a series of songs and then activating the script through the tools menu. I get this error.

"There was a problem querying the database:
Error executing SQL " UPDATE Songs INNER JOIN Artists ON Songs.IDArtist =Artists.ID Set Songs.PLaycounter = 5 WHERE Songs.Songtitle = '...but home is nowhere' AND Artists.Artist = 'AFI'
" : near "INNER" : syntax error (1, 1)"

If I have nothing selected and I activate the script, I get a blank information box with a blank button to press which does nothing. :(

Any ideas on what's causing this?

::edit:: A second error pops up directly after the first referring to line 62, column 15

by Spazz » Wed Feb 06, 2008 5:34 pm

Hmmm.. it finds all my tracks on last.fm but won't write to the library, annoying.

by m0nkiii (not logged in) » Wed Feb 06, 2008 4:23 pm

This row in the perl-script takes all weeks you have scrobbled:
my $chartlisturl = 'http://ws.audioscrobbler.com/1.0/user/< ... rtlist.xml';

This row takes a week at a time:
my $weeklycharturl = 'http://ws.audioscrobbler.com/1.0/user/< ... t>&to=<end>';

I think the limit per week is 500 artists. So some tracks may not be included.
But it works to get almost all playcounts.

by Spazz » Wed Feb 06, 2008 3:18 pm

Unfortunatly that script only somewhat works for me, it only sees 119 playcounts from last.fm :(

edit:: script bug looks like, I grabbed the previous version and it looks to be working just fine, apparently it was only grabbing the very first week of plays and that was it.

This could take awhile @ well over 50,000 plays.

I can't wait to see how autorateaccurate deals with this information :)

by urlwolf » Wed Feb 06, 2008 11:44 am

Here's a possible hack:

Grab playcounts into itunes, then import counts from itunes to MM (I think I saw that offered somewhere, maybe when installing MM3?).

This perl script will update your itunes db with last.fm counts.

http://bios.alterlinks.fr/index.php?opt ... &Itemid=63

by urlwolf » Wed Feb 06, 2008 11:37 am

This is a great idea.
I always wanted to have playcounts synchronous with last.fm (I have >50.000 playcounts there!).

Unfortunately looking at the feeds, it looks like it's impossible to retrieve the entire playcount history for an user, only the last week.

Is that the case?
Has anyone retrieved the entire list?

Thanks

by Mthrsuperior » Fri Mar 02, 2007 8:50 pm

Thanks (for both scripts)

I understand now.
I'll play around tomorrow after I shake off the work week tonight.
:lol:

by m0nkiii » Fri Mar 02, 2007 6:52 pm

Mthrsuperior wrote:
Jugdish wrote:Just give your last.fm username as the first parameter to the script.
I'm at work right now but boy am I ever excited about this :D
I hope it works.

Um, for us Luddites: where is "the first parameter to the script"?
Does this mean I replace everywere it says "username" with my actual username or do I just need to do it on the first line??
Perl... nice :)

If I understand it right you don't run it through MM.
You have to have Perl installed and run it in the console or something.
Like this : perl lastfmscript username

Edit: grr I was a bit late, but right :)

by Jugdish » Fri Mar 02, 2007 6:51 pm

Mthrsuperior wrote:where is "the first parameter to the script"?
When you call the script from the command line, you need to give your username as the first argument. For example, suppose you saved the script into a file called "lastfmplaycounts.pl", then you would enter this at the command line:

Code: Select all

perl lastfmplaycounts.pl MyLastFMUsername
Note that you must have a Perl interpreter installed on your computer to do this. If you're using Windows, you can download one here.

Top