Scripting Functionality Thread (NO Script Requests Here!)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Fellow scripters/coders/...: Do you feel the need for a wishlist for enhanced scripting functionality?

You may select 1 option

 
 
View results

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

A useful event would be OnPlaylistAdd. This would be fired when a track is added to a playlist.

It would either be attached to SDB and provide the SDBPlaylist and SDBSongData, or be attached directly to SDBPlaylist and provide the SDBSongData.
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.
DaledeSilva
Posts: 893
Joined: Sun May 28, 2006 4:22 am
Location: Australia
Contact:

Post by DaledeSilva »

Hi, trixmoto, previously you said this when I was asking about creating an autoplaylist via scripting:
In the Playlists table:

isAutoPlaylist should be 1
QueryData should contain the criteria.

If you set a few up first when you look at the database you'll get an idea of how the criteria should be saved.
I've since tried it and can't get itt o work... if you have a chance.. could you please take a look at this thread and help me out?

http://www.mediamonkey.com/forum/viewto ... 2624#52624


thanks,
Dale.
My Plugins: PrettyPictures [v0.9.2], Forget Crossfade [v1.0], Behind Titlebars [v0.9], Filter Nodes [v1.0.1], View Mode [1.0], BPM.tapper [v1.0]
My Site: http://www.ublik-om.net
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

On the Track Properties -> info tab I would like the

song ID and Album ID

Maybe some others
Artist ID
Genre ID

Can make Debugging alot quicker, plus I don't have MS Access :)

Sub Titled "Database Info" or similar
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

MoDementia wrote:I don't have MS Access :)
http://www.openoffice.org/ is a free 'MS Access' application. Not really Access but allow you to browse the tables and do queries.
Image
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

Thanks, have it up and running (just Base) but I was also thinking that it would be an easy way to communicate with users.

e.g.

User: No album art showing in browse by art

Scripter: have a look in properties -> info and find the album ID, then look in ...\skins\auto\artwork there should be a .jpg with that id eg. 1234.jpg

User: yes it is (or no it isn't)

Scripter: ok so it has (hasn't) cached it, ......
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Yes, I've often thought this would be useful information to have in the Properties tab. Although maybe it should be an advanced option because I think it might confuse users if they didn't know what it was there for.
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.
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

Please make fso.CorrectFilename() remove trailing full stops from directories.

Album Name = "All the Way..."

Mask = \Album Name\Title

fso.CreateFolder() = \All the Way\

fso.CreateTextFile() = error (looking for \All the Way...\)
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

For the second time in a week this issue has crippled a script I would like to/am writing.

I changed the auto dj add tracks from playlist to use but can't read the new value from the script until I restart MM :( :x :cry:

Example here http://www.mediamonkey.com/forum/viewtopic.php?t=11146
Steegy wrote:Thought about this a long time ago, but now finnaly really pushing the "submit" button...

I would like it to be possible to change MediaMonkey's INI configuration settings, while MediaMonkey is running, and in such a way that MediaMonkey doesn't simply overwrite those changes when it shuts down.
Maybe this would be possible with an exta ISDBIniFile.StringValue method that would apply the changes directly to MediaMonkey's instance too (so updating MM's internal loaded variables).

This would make it possible to:
Make a lost internal player visible again
Clear history lists, mask lists, ...
.. and other things that aren't directly accessible through MM.

This would allow us to make those changes with a script (or "advanced" options panel) within MediaMonkey. For most changes, probably MM would have to be restarted for changes to take effect.

But it would probably be more useful and easier for everyone (both dev's and scripters) if these "advanced" options were available through a built-in options panel. So I'm sorry if I should've posted this in the normal wishlist forum.

Cheers
Steegy
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

I'd really like an event like OnTrackPropertiesChange/OnTrackInformationChange. So if something somefield of a song in the database gets change the event gets started. This could for example be the playcounter or everything else.

That would be very powerful because you could also run scripts when a song gets changed by synching with a portable player.

What do you think about that?
Big_Berny
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Not a big wish, but it would be nice if the UI controls (ie. SDBUIEdit) dimmed when they were disabled. This would make it clearer to the user that they were not-enabled. (The SDBDropDown already does this if the Style=2.)
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.
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Contact:

Post by Steegy »

I'd like to request a event: Common.OnResized (or something similar like OnAfterResize)

This event would only trigger when the resizing operation is complete, compared to the current Common.OnResize, thus without causing high cpu%, flickering and mouse problems (program thinks that mouse button is still clicked after releasing the mouse button for a dragging-resize operation).

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

It would be REALLY useful if the "OnTrackProperties" function returned two lists of tracks, the first being the tracks before the changes were made and the second being the tracks after the changes. This would allow a comparison of the changes to be made.
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.
Peke
Posts: 13451
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Post by Peke »

If I got whole topic right.
Trix, why dont you create var with first result update and then compare with updated result, with some UI this can make mirackles.
But from the other side I could be wrong?
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I'm trying to see if the user has changed the rating. So I don't want to run the code everytime the user updates the properties, only if they have updated the properties including changing the rating value.
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.
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Would you not have the Before value somewhere already? Dunno what you want to use it for, so I'm just guessing.

I've just noticed the OnTrackProperties was perfect in v2.5.2 and somehow not in later versions. I'm afraid of loosing speed and functionality in all the great stuff that's already available. I guess things like this is putting the toe into the bloated area.

Sure there's no other way?
Image
Post Reply