Last.FM Node: dynamic node based on last.fm 2020.04.19 [MM3][MM4]
If you have problems installing on vista or windows 7, try shutting down MM and then right click the MM shortcut and RUN AS ADMIN, then double click the last.fm MMIP installation file
You can change some of the options @ tools > options > library > last.fm nodes (mouse over the controls to see what they do) to suite your preference.
To add your favorite artists, tags, etc... use the last.fm menu icon on the main toolbar.
To remove them, you will have to shutdown MM and edit the lastfmnode.vbs.ini file in the mm\scripts\auto folder.
Download @ https://www.mediamonkey.com/addons/brow ... discovery/
' * fixed error 424 during similar track search
' * not sure what I screwed up with fixurl, but I added some hardcoded codes to help bjork etc
' * added option for last.fm key, see Tools > options > library > last.fm node
' * you must enter a key, either your own or a publicly available one (see forum)'
' or https://www.last.fm/api/account/create'
' * updated api urls and changed to HTTPS'
' * added some more logging, also added logging for tracks not found in library
' potentially useful to see what artists/tracks you might be interested in'
' that you don't already have'
' * removed group and location nodes'
' * added global top tracks under 'users' node'
' * added user recently played tracks under a favorite user node
* added QuickQueue from last.fm menu, selected tracks will be queried and
each of their similar tracks will be queued (using the queue # in options)
* added dj queue option (queue multiple similar tracks at one time)
* added avoid twofers option (avoid playing 2 songs by the same artist in a row)
* Optimized auto-dj mode retries (hopefully)'
* Last.FM node now indicates what track will be used if you click the root node'
* Misc stuff I've forgotten'
* fixed a couple event errors'
* disabled some unnecessary database transactions'
* implemented favorites saving and usage (edit/remove not yet functional)'
* favorite nodes are stored in Auto\LastFmNode.vbs.ini'
* added menu and dialog to save favorites to the Last.FM toolbar button/menu'
* Fixed control names in options sheet
* Fixed dropdown lists in options sheet and added a couple more sorts'
* Partially fixed enable dj mode from option sheet (still works from the toolbar menu)'
* Updated SQL's to use current filter settings. Useful if you want to prevent
in-accessible or other tracks from being queried'
* Finally implemented preference saving to ini, you no longer need to manually
modify the variables at the top of the script. Options > Library > Last.FM Node (note this does not yet include default/favorite nodes)
* Updated QueryLibrary() to avoid some case sensitivity and increase speed.
thx to Bex, ZvezanD and chx for the interesting discussion about it
* added check for similar artist exists in library before trying to find their
tracks when similar tracks fails (prevents searching for tracks not in lib)
* added Order variable to set the preferred sort order when searching for tracks
must be a valid ORDER BY <songfield> sql qualifier, default is sort by bitrate
DESC so the highest bitrate track is used first. Other alternatives might be
Rating DESC, DateAdded ASC/DESC, PlayCounter ASC/DESC, Year ASC/DESC,
or Random(). Sort order only matters when you might have multiple copies
of a track. The previous unspecified behavior appeared to be by songid.
NOTE: if you choose Random(), you might get a repeat play of a track early
because a different version may have been played previously.
* add db commits before sql iterators to avoid some database errors when multiple scripts are running or tags are being updated in the background
* updated the sql query with many thanks to Bex for a much much faster and less resource intensive query
* fixed artist check so that differing case doesn't matter (I noticed NoFX vs NOFX)'
* implemented group tracks/artists, enjoy and don't forget to join "Media Monkey"
* updated most of the last.fm nodes to be more consistent with stuff I learned later
* should use new events instead of old onclick stuff'
* added default variables to customize the prompts to your preferences,
saving options to ini should be coming soon I hope.
* I think I have all functionality I originally envisioned and even some I didn't.
Work soon to start on save/load nodes, optionsheet and whatever optimzations'
* Oh, also added get current play track for fav artist and tags
* added a real PAINT IT BLACK icon based on image from Spacefish, Thanks!'
* functionalized the dj restrictions (shouldn't really have any discernable effect)
* add qry check for artist before searching artist+title
I am interested in knowing if this is any noticible improvement
especially for smaller libraries (shouldn't search for artists you don't have)
* added check for min rating and size in qry (rating uses 'djminrating' variable)
this affects the regular nodes to keep crappy tracks out, feedback requested'
* misc improvements & logging tweaks/details (be sure to delete log occasionally)'
' * implemented related artist + random related artist top tracks failover
' if related tracks comes up empty.
' * implemented last chance add random track from library if all else fails'
It's not the most pretty, but it seems to be working OK.. try it out and let me know how it works for you!
Minor update to script:
' Recent Updates:
' * implemented artist time limit (keeps artist from repeating within # hours)
' * implemented retry counter, script will now try to find more tracks by temporarily
' loosening restrictions (track/artist repeat timer, turn off dupe avoidance)'
While I still have not finished implentation of save/load, I have added a new feature which I am very excited about and I think you will be too.
Last.FM DJ Mode
When enabled, this will auto-enqueue related tracks based on the 'related tracks' feed from last.fm. This is slightly different from scrobbler dj, where the related artists was chosen then a top track from the related artist was chosen.
Using the related tracks feed is more accurate, but can possibly lead to a potentially smaller pool of tracks to choose from.
To enable DJ mode, select it from the Last.FM icon on the standard toolbar.
In the future, additional modes will be added to fall back on if insufficient usable tracks occurs.
I also tried my hand at a MMIP installation package, download here.
This script is compatible with Mediamonkey 3, older versions are not supported.
Script is still a work in progress, not all features are implemented and errors could occur.
Feedback, bugs, improvement ideas are welcomed.
Thanks go out to Psyxonova, the creator of the ScrobblerDJ script which has been a favorite and inspiration.
Thanks also go out to the Mediamonkey Dev Team and the Community Scripters who make Mediamonkey such a wonderful tool.
OK well here is the first somewhat usable release.. there is still lots to do, but the favorite artists node appears to function perfectly (but still no save/load).
Try it out, I'm looking forward to hearing any comments/suggestions!
All Nodes appear to be fully functional, still no save/load yet, I'll start figuring out how to do that soon.
Code: Select all
code removed, use MMIP installer
So, I was thinkin what else would be super cool to have in mediamonkey...
An auto-playlist/node of an artist's top tracks based on their top tracks at last.fm...
There are already a few scripts out there that do last.fm related stuff, this would be somewhat of a combination of some of them, but would provide an interesting and dynamic view not really available in mm..
So, a new node could be created "Last.fm" or some such, under this node the user could add various particular/favorite artists, once added and clicked on, the script would dynamically load the artists top tracks that you have in your library.
Now really the most interesting thing that this does differently from other last.fm scripts, is that it simply populates a node tracklist and does not enqueue anything at all. From the resulting tracklist you could enqueue or rate or burn or edit or whatever you wish to do.
To build on the above, even cooler would be the ability to right click one of these artist nodes or tracks and have related artists added as subnodes along with their dynamic track lists matched up between last.fm and your library.
Here's sort of a visual example as how I was thinking...
MM tree nodes
- Now Playing
- Library & subnodes
- Last.fm Artist Dyamic Playlists
[**] Nine Inch Nails (clicking this node would load Nine Inch Nails Top tracks that you have in your library
[***] Tool (related sub nodes off of NIN with their resulting top tracks)
[***] A Perfect Circle
[****] Deftones (related artist sub node of A Perfect Node)
[****] Nine Inch Nails
[***] Marilyn Manson
I am sure some limit would have to be made to how deep a set of subnodes you could make, and it might be prudent to filter duplicates within a tree of related artists (so NIN wouldn't appear under a subnode of itself), but hopefully the idea is to be able to a tree of related artists and their applicable top tracks.
To add an artist to the root tree, a context menu could be added 'add to last.fm node' and/or type the artist name into a small input box initiated via script menu or toolbar icon, or better yet just clicking the root node would ask you what artist to add.
I don't really have the time to research and make this script, tho it could probly done by combining code from several of the existing scripts, so I'm just putting the idea out there in case anyone else see's the usefulness and has the time/ability to take the idea and run with it.
Here is a screenshot of how it looks so far.. right now the artist is hard coded into the script, but eventually you will be able to add/remove artists dynamically...