Last.fm Loved Tracks Playlist Creator

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

Last.fm Loved Tracks Playlist Creator

Post 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
'
Last edited by Psyker7 on Sun Mar 20, 2011 6:07 pm, edited 3 times in total.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post 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?
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Loved Tracks Playlist Creator

Post 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)
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post 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
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Loved Tracks Playlist Creator

Post 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.
Last edited by Psyker7 on Tue Dec 08, 2009 8:00 am, edited 1 time in total.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post by nynaevelan »

I think the link is still pointing to version 1.0.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Loved Tracks Playlist Creator

Post 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.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post 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:
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post by nynaevelan »

I get the following error:

Image
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Loved Tracks Playlist Creator

Post 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 :|
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post 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??
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Ashran
Posts: 34
Joined: Wed Nov 19, 2008 4:10 pm

Re: Last.fm Loved Tracks Playlist Creator

Post 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 ?
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post 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.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Ashran
Posts: 34
Joined: Wed Nov 19, 2008 4:10 pm

Re: Last.fm Loved Tracks Playlist Creator

Post 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 ?
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Loved Tracks Playlist Creator

Post 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.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Post Reply