Last.FM Node: dynamic node based on last.fm 2020.04.19 [MM3][MM4]
@ 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...
@ 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...
New script: Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
-
- Posts: 291
- Joined: Mon Dec 11, 2006 9:45 pm
What? No black icon for the Paint It Black crew? For shame!
Borrowed from the Greasemonkeys group Favicon Changer thread.
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.
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
oh nice, I will have find/make an .ICO version of that... I use the black style also.
New script: Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
-
- Posts: 705
- Joined: Tue Dec 12, 2006 5:32 pm
- Location: The Netherlands
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.
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.
Reducing CPU usage
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.
Above that, reduce the MaxValue of LoadXMLBar so that the progress bar still shows progress, e.g.
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!
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
Code: Select all
LoadXMLBar.MaxValue = 500
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!!
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
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.
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.
New script: Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
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.
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.
New script: Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
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.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.