Last.FM Node: dynamic node based on last.fm 2020.04.19 [MM3][MM4]

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

Moderators: Peke, Gurus

Morten
Posts: 1092
Joined: Thu Aug 11, 2005 11:31 am
Location: Norway

Post by Morten »

I think you can use the Installation package to install that icon as well Teknojunky.
Best regards,
Morten
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

@ RedX: yea, I tested it seems to work ok with the relative paths, just the PNG did not work (altho I thought I tested that initially)

@ Morten: yes a MMIP pack would which I hope to get something done soon, I wanted to make sure you could update in place without re-starting MM and the save/load functionality put in..

@ all I think I will implement saving/loading nodes similar to magic nodes/favorite nodes does, by saving to mediamonkey.ini.. altho I think that too much stored in the mediamonkey.ini will eventually be bad.. Perhaps all script related INI settings should have a 'scriptsettings.ini' so that mediamonkey.ini doesn't get filled up with script options..

Also, I have updated script and implented one last function as a surprise.. just play a track and select the root 'Last.FM Node' and see what happens... 8)
aidan_cage
Posts: 291
Joined: Mon Dec 11, 2006 9:45 pm

Post by aidan_cage »

I still am having a hard time believing you just willed this script into existence

WOW

PEACE

:)
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish »

What? No black icon for the Paint It Black crew? For shame! ;)

Image

Borrowed from the Greasemonkeys group Favicon Changer thread.
Last edited by spacefish on Sun Jan 27, 2008 11:29 pm, edited 1 time in total.
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

oh nice, I will have find/make an .ICO version of that... I use the black style also.
Diabolic-Destiny
Posts: 223
Joined: Sun Apr 29, 2007 9:45 pm

Post by Diabolic-Destiny »

amazin thanks tek
Image
Image
Onweerwolf
Posts: 705
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Post by Onweerwolf »

Amazing script Teknojnky!
Image
miki4000
Posts: 15
Joined: Sun May 22, 2005 7:34 am

Post by miki4000 »

This is gold! :lol:

m
--
baard
istanbul
Posts: 15
Joined: Tue Oct 02, 2007 11:51 am

Post by istanbul »

What an excellent idea! I'm impressed.

I desperately want to get this script working, but get the following error message when clicking on the name of the artist, tag etc. I've entered:

There was a problem querying the database:
42000:[Microsoft][ODBC Microsoft Access Driver] Syntaksfeil(operator mangler) i spørreuttrykket Songs.IDAlbum=Albums.ID AND Songs.IDArtists=Artists.ID AND Alb.Art.ID=Albums.IDArtist
Artist LIKE '%damien rice' AND SongTitle LIKE '%9 crimes'

The Norwegian bit translated: Syntax error (operand missing) in the query...

Upon clicking 'cancel':

Error #-2147418113 - SongsDB.SDBDatabase
42000:[Microsoft][ODBC Microsoft Access Driver] Syntaksfeil(operator mangler) i spørreuttrykket Songs.IDAlbum=Albums.ID AND Songs.IDArtists=Artists.ID AND Alb.Art.ID=Albums.IDArtist
Artist LIKE '%damien rice' AND SongTitle LIKE '%9 crimes'
File: ".....last.vbs", Line: 1039, Column: 8


I am using version 2.5.3.968.
dressen
Posts: 13
Joined: Tue Feb 13, 2007 3:09 am
Location: Seattle, WA

Reducing CPU usage

Post by dressen »

Awesome script Teknojnky!

Can I make a small suggestion to reduce CPU usage/overhead when waiting for the XML to come back?

In LoadXML, add a SDB.Tools.Sleep call, e.g.

Code: Select all

  Do While xmlDoc.readyState <> 4 And (Timer-StartTimer) < Timeout
    SDB.Tools.Sleep 10
Above that, reduce the MaxValue of LoadXMLBar so that the progress bar still shows progress, e.g.

Code: Select all

  LoadXMLBar.MaxValue = 500
Both the Sleep and MaxValue values can be tuned as needed, but this will knock down CPU usage to almost nil since the Loop iterations are a lot less. The new Sleep function in MM3 is very handy!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I agree that adding "Sleep" will be very useful for looping like this, but alternatively you could use a timer. I guess the trouble with using a timer is that you have to store all the objects globally so you can access them in the ontimer sub.

Anyway, I generally "sleep" for 100 when calling Last.Fm - this will still check every 10th of a second!! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

Wow I was not aware of the sleep method.. I will have to try it..

I am not really getting much cpu use with the ReadState loop... most of the processing occurs with the songquery loop. I set the maxvalue very high so it actually appears to progress, otherwise it maxed out almost instantly. I will experiment with the sleep call tho, sounds like a good solution.

Normaly the xml ready is very short unless last.fm is lagged or down. I added the timer count to the statusbars and logs so I could time what portions were taking the longest to better optimize in the future.

@ Istanbul this script requires Mediamonkey Version 3 and it appears you have MM 2...

You can find the latest release canidate for 3.02 in the beta testing forum sticky, the last post in the thread has the latest release.

edit:

I tried out the sleep function, it seemed to work fine without bogging down the UI.

I settled on sleep of 100 and maxvalue of 250, the current time out being 25 seconds, this matches up nicely between the time out and the progress filling up.. later once I add options Ill set the maxvalue based on timeout * 100 for neatness.
Last edited by Teknojnky on Wed Jan 30, 2008 11:39 am, edited 1 time in total.
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

Does anyone know of a better way to transfer from one songlist to another songlist besides a loop doing one track at a time? Basically I want to combine from one songlist to another in one fast method.

I am building 2 song lists.. one is the list from last.fm of tracks that are found in your library, the other is the list of results from the qry (which can return multiple hits)..

The way I started out doing this worked with one list because I had the qry as part of the list building stage.

Later I had to break out the qry as a separate function (because the last.fm xml feed's have different structures) and now I have the list from the qry (that can return multiple matches) and the total songlist of all matched tracks..

So I want to add the results of the qry to the running total of matched, without doing each song individually via loop.
istanbul
Posts: 15
Joined: Tue Oct 02, 2007 11:51 am

Post by istanbul »

I've hesitated until now to make the transition to MM3, but this script made me do it - works like a dream now! Thanks!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Unfortunately I think you'll need to loop through the songlist. It should be reasonably fast though.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply