Page 1 of 2

Last.fm Loved Tracks Playlist Creator

Posted: Mon Dec 07, 2009 6:18 am
by Psyker7
As requested here: http://www.mediamonkey.com/forum/viewto ... =2&t=44646

Creates a playlist in the root node named "Loved Tracks (last.fm username)" containing all the loved tracks of that user which could be found in the MM database.
Tells you if any tracks could not be found, and if any of the loved tracks are duplicated in your database (note they may be from different albums)
Currently it chooses the track with the highest playcount to add to the playlist.

Suggestions welcome!

======================================================
Download:
Previous versions (along with my other scripts - well... one of them):
http://psykar.com/scripts/
======================================================

' Changes 1.3:
' - Added commit after database query so playlist adding no longer fails occasionally
'
' Changes 1.2:
' - Neater logging
' - Message box on completion
'
' Changes 1.1:
' - Fixed install function
' - Added more logging options
'
' Initial Release 1.0
'

Re: Last.fm Loved Tracks Playlist Creator

Posted: Mon Dec 07, 2009 11:37 am
by nynaevelan
One minor thing, it appears the scripts info is the same as that of the LastFM Import script, my settings were knocked out for the Import script, but once I manually put them back it was ok. Where does it list the tracks that are not in the db?? In the future can you add an option to select where to save the playlist and/or log? What happens when tracks are changed on LastFM, it doesn't look like the playlist is updated to reflect the changes?

Re: Last.fm Loved Tracks Playlist Creator

Posted: Mon Dec 07, 2009 8:36 pm
by Psyker7
nynaevelan wrote:One minor thing, it appears the scripts info is the same as that of the LastFM Import script, my settings were knocked out for the Import script, but once I manually put them back it was ok.
Ooops, thought I checked everything there, will fix up
Where does it list the tracks that are not in the db?? In the future can you add an option to select where to save the playlist and/or log? What happens when tracks are changed on LastFM, it doesn't look like the playlist is updated to reflect the changes?
When the script has finished you get a message box listing the tracks which were not in the DB along with the duplicates. If there were none then you wont.
If tracks are changed on last.fm, run the script again and it will update the playlist (although it seems that the changes take a while to make it to last.fm's xml feeds in this case)

Re: Last.fm Loved Tracks Playlist Creator

Posted: Mon Dec 07, 2009 8:53 pm
by nynaevelan
Psyker7 wrote: When the script has finished you get a message box listing the tracks which were not in the DB along with the duplicates. If there were none then you wont.
If tracks are changed on last.fm, run the script again and it will update the playlist (although it seems that the changes take a while to make it to last.fm's xml feeds in this case)
I have 238 loved tracks but only 206 were added to the playlist, I assume the missing 32 were duplicates and not actually tracks that weren't in the library. Is it possible to add the duplicates to the log? Or add some message that says X amount of tracks were skipped because they are duplicates? Maybe the xml feeds are why the changes are not being reflected in the import, I will try again tomorrow to see if the changes are reflected. I did figure out how to open the script and turn on the logging. Good job by the way, this is definately going to be one of my faves. :D :D

Re: Last.fm Loved Tracks Playlist Creator

Posted: Tue Dec 08, 2009 5:52 am
by Psyker7
' Changes 1.1:
' - Fixed install function
' - Added more logging options

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

It should still give you a messagebox on completion with the tracks which had duplicates in your database, and the tracks which were not in your database.

Re: Last.fm Loved Tracks Playlist Creator

Posted: Tue Dec 08, 2009 6:15 am
by nynaevelan
I think the link is still pointing to version 1.0.

Re: Last.fm Loved Tracks Playlist Creator

Posted: Tue Dec 08, 2009 6:18 am
by Psyker7
nynaevelan wrote:I think the link is still pointing to version 1.0.
Clear your browser cache? Just checked file sizes on the server and they're def different.

Re: Last.fm Loved Tracks Playlist Creator

Posted: Tue Dec 08, 2009 6:45 am
by nynaevelan
I don't think it is my browser, it is this link but I was able to get to it from the link to your scripts in the first post:

Re: Last.fm Loved Tracks Playlist Creator

Posted: Tue Dec 08, 2009 8:13 am
by nynaevelan
I get the following error:

Image

Re: Last.fm Loved Tracks Playlist Creator

Posted: Tue Dec 08, 2009 8:17 am
by Psyker7
nynaevelan wrote:I get the following error:

Image
Bah, delete that line or redownload the script, no idea how I missed that one :|

Re: Last.fm Loved Tracks Playlist Creator

Posted: Tue Dec 08, 2009 9:12 am
by nynaevelan
Thank you for the additional logging functions, now I see that the tracks that are not being added are the ones that have multiple artists in MM but only have the first artist on LastFM. Is there an easy way to fix this?? Maybe have it only look for the first artist? How does the LastFM Import script handle multiple artists or is it skipping them also??

Re: Last.fm Loved Tracks Playlist Creator

Posted: Wed Dec 09, 2009 12:19 pm
by Ashran
It's doesn't seem to be working. I don't get a message error but it remains stuck at the same spot, loading loved track page 2 of 5. What should i do ?

Re: Last.fm Loved Tracks Playlist Creator

Posted: Wed Dec 09, 2009 12:31 pm
by nynaevelan
Are you running the latest version? That processes takes a little while on my system but it does eventually progress. Do you have alot of loved tracks, I only have @200 so maybe that is why mine is progressing more quickly.

Re: Last.fm Loved Tracks Playlist Creator

Posted: Wed Dec 09, 2009 1:40 pm
by Ashran
I have around 230 loved tracks. And after three hours, it remains at the same point. All others scripts I might try after that doesn't even start, and I can't close mediamonkey other then by killing the process in ctrl-alt-del. I'm using windows 7 64 bits. Maybe the problem comes from there ?

Re: Last.fm Loved Tracks Playlist Creator

Posted: Wed Dec 09, 2009 2:48 pm
by nynaevelan
You should open the file in a text editor and turn on logging by changing

Code: Select all

Logging = False
to

Code: Select all

Logging = True
Then you can open the \Mediamonkey\scripts\LastFmLovedPlaylist.vbs.log file to see which track it is getting stuck on.