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

75
99%
1
1%
 
Total votes: 76
 

baker
Posts: 30
Joined: Thu Dec 20, 2007 1:20 pm
Contact:

Post by baker »

If possible, please add the search box to MM's scripting methods as per..

http://www.mediamonkey.com/forum/viewtopic.php?t=24681

Thx!
DaledeSilva
Posts: 893
Joined: Sun May 28, 2006 4:22 am
Location: Australia
Contact:

Post by DaledeSilva »

not sure if this thread is still active or not, so if there's a more appropriate place to post this request, please let me know.

currently, previously OnChangedSelection has let a script know whenever the tracklist has changed because it usually only changes when a new node is navigated to.

Now, however, because a user can set search to "Current Selection" the tracklist can change without changing nodes and OnChangedSelection doesn't report (logically).

I would like a specific OnChange event for the tracklist window.

currently, my prettypictures script uses onChangedSelection and everytime has to count the tracklist items to determine whether the tracklist has changed - it's also why PrettyPictures doesn't refresh if you do a search in current selection.

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:

OnTrackDeleted

Post by MoDementia »

Please :)

Sub OnTrackDeleted(DeletedTrack As SDBSongData, 0=Deleted from Library 1=Deleted from Library and Computer.)
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

OnTrackProperties column selection

Post by MoDementia »

The ability to supply a list of columns with OnTrackProperties
e.g.

Script.RegisterEvent SDB, "OnTrackProperties(Custom1, Genre, Mood)", "SDB_OnTrackProperties"

Would only be triggered when one of the columns Custom1, Genre or Mood is modified.
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

OnChangedFilter(OldFilterIndex,NewFilterIndex)

No specific application yet....
I'm sure if it was available we would find a use for it :)
ZvezdanD
Posts: 3121
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

MoDementia wrote:OnChangedFilter(OldFilterIndex,NewFilterIndex)

No specific application yet....
I'm sure if it was available we would find a use for it :)
I already need this (and asked for it):
http://www.mediamonkey.com/forum/viewto ... 602#128602
geirmala
Posts: 1
Joined: Sun May 11, 2008 2:57 am
Contact:

Wawi functionality

Post by geirmala »

Would it be possible to implement functionalit such as Wawi web interface?
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by MoDementia »

Method for translating autoplaylist querydata into SQL and vice versa.

I ran dbgview while opening the properties of a track to find out how the playlists section is being created (especially autoplaylist entries).

MM converts the querydata into an AND part of a SQL statement e.g.

Code: Select all

FROM Songs WHERE Songs.ID = 9651 AND  (Songs.PlayCounter>=1 OR Songs.LastTimePlayed<(39639.589950266))  
If a method is too complicated (Read part is already part of MM code) then an example of valid sections and how they are translated so we can write our own subroutines would surfice.

Something similar to the scripts.in or skins.ini pages on the wiki.

DaledeSilva has already asked about it (sort of) here
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by trixmoto »

I definitely support this! :)
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.
stax76
Posts: 176
Joined: Sun Mar 12, 2006 6:45 am
Contact:

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by stax76 »

I've a extension done with VB .NET, it adds support for the MCE remote, I noticed there is no way to toggle mute.
Rich66
Posts: 1
Joined: Sun Aug 03, 2008 8:37 am
Contact:

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by Rich66 »

MoDementia wrote:Method for translating autoplaylist querydata into SQL and vice versa.
I also support this request. :)

I think it would be good to have a function like:

Code: Select all

Function SDBDatabase.GetPlaylistQuery(ID As Integer) As String
It would work in the same way as GetFilterQuery() but for an auto-playlist.

This would enable things like:
- Apply filters to a playlist
- Combine playlists together
- Refine a playlist "on the fly" (e.g. select only 5 stars songs from the playslit)

Its main usage would clearly be for auto-dj scripts but we can imagine some other applications like maintenance or statistics.
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by MoDementia »

stax wrote:I've a extension done with VB .NET, it adds support for the MCE remote, I noticed there is no way to toggle mute.
Save the current volume
set volume to 0
restore saved volume.
Peke
Posts: 13680
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by Peke »

While I was making small testing Script I noticed that we are missing:

Code: Select all

Function SDBApplication.GetSongData(TrackID As Integer) As ISDBSongData
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
caasland
Posts: 8
Joined: Mon Jan 14, 2008 4:18 pm
Contact:

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by caasland »

I just started looking at the scripts this afternoon, and would like the following:

A new ISDBApplicationEvents called OnStartSync

This event would be triggered when a device is synchronized. The registered event would block the sync, running a procedure. The sync will continue when the procedure has finished. OnStartSync would receive a parameter containing device information (at a minimum, a drive letter).

Specifically, I have a Sansa running Rockbox, and am using smilerz script to import playcounts to MM (http://mediamonkey.com/forum/viewtopic. ... ox#p153922). Then I have MM set up to sync unplayed podcasts .. deleting the rest. This way, after I listen to a podcast, scrobbler records that I listened to. When I autosync, I want to be able to run smilerz script prior to MM determining what to syncronize. Without this functionality, I have can't run autosync when I connect the device - I have to plug in the device, run smilerz script, supply the drive letter, run autosync, then disconnect. With this functionality, all I need to do is plug in the device, let it sync, unmount, and I'm good to go, with no additional intervention.

For example, I'd have this autoscript:

Sub OnStartup
Script.RegisterEvent SDB, "OnStartSync", "RunAutoScrobbler"
End Sub

Sub RunAutoScrobbler(deviceInfo)
<smilerz script here, but get drive letter from deviceInfo >
End Sub

Make sense? (if this is implemented .. it would make sense to have a OnStopSync event too, called after the sync but before the device unmounts).
PartialGestalt

Re: Scripting Functionality Thread (NO Script Requests Here!)

Post by PartialGestalt »

Hopefully this is already in and I just haven't been able to find it in the documentation, but it would be quite useful to have a player or application event for when a track finishes (Player.OnTrackFinished?) -- I'd like to have some post-play processing (e.g. for some custom counters/file reorganization), but haven't been able to find a way to do it without polling Player.isPlaying.

I had thought that OnStop would do the trick, but it doesn't seem to get thrown between tracks (although OnPlay does).

Does MM already have something like that (I'm at 3.0.3.1183), or could it be added?
Post Reply