Available COM interface

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Available COM interface

Post by PetrCBR »

These COM commands/events will be implemented in MM5 next build (2061) :
  • SDBApplication Events
    NotifyFinish, CallDeviceFileCopiedEvent, CallDeviceSyncCompletedEvent, CallDeviceSyncStartedEvent, CallDownloadFinishedEvent, CallPartyModeEnabledEvent, DoAppIdle, DoBeforeTracksMove, DoFilterChange, DoNowPlayingModified, DoNowPlayingSelectionChanged, DoOptionsChange, DoPlaybackCompleteEnd, DoPlaybackEnd, DoPlaybackSeeked, DoPlaylistAdded, DoPlaylistChanged, DoPlaylistRemoved, DoRepeatClicked, DoSelectionChanged, DoShuffleClicked, DoTrackAdded, DoTrackConverted, DoTrackDeleting, DoTrackDoubleClick, DoTrackEnd, DoTrackListFilled, DoTrackListFilling, DoTrackListModified, DoTrackListSelectionChanged, DoTrackPlaybackPaused, DoTrackPlaybackStarted, DoTrackPlaybackStopped, DoTrackPropertiesEvent
    SDBApplication
    VersionString, VersionHigh, VersionLo, VersionRelease, Localize, LocalizeGen, toASCII, IsRunning, ApplicationPath, MyMusicPath, EqualizerPath, IconsPath, PluginsPath, ScriptsPath, SkinsPath, Format, LocalizedFormat, runJSCode, fromJSON (since 2089)
    SDBApplication.Player
    CurrentPlaylist, CurrentSong, CurrentSongIndex, Panning, Volume, PlaylistClear, Next, Pause, Previous, Stop, isPlaying, isPaused, CurrentSongLength, PlaybackTime, isAutoDJ, isRepeat, isShuffle, isCrossfade, isStartingPlayback, PlaylistSelected, PlaylistFocused, StopAfterCurrent
    SDBApplication.Database
    ExecSQL, OpenSQL (returns result as JSON string), BeginTransaction (since 2066), Commit (since 2066), ForceCommit (since 2066)
Last edited by PetrCBR on Tue Dec 12, 2017 1:46 am, edited 2 times in total.
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
TIV73
Posts: 229
Joined: Sat Nov 12, 2011 1:31 pm

Re: Available COM interface

Post by TIV73 »

I just installed build 2061 and tried to import the mediamonkey com object in visual studio, but could only find a reference to the object of version 4. I suppose this makes sense as it's only a portable installation, so the needed assemblies probably aren't registered. Do you know if there is any way to get the needed reference or some way to manually register the new MM5 interface in order to be able to use it in .net applications?

Besides, since MM5 seems to focus on cross-platform compatibility - is com the recommended interface for external applications/scripts or should we be using something else entirely?
PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: Available COM interface

Post by PetrCBR »

You can register using REGCOMSERVER command line parameter. JavaScript/HTML scripting is highly recommended.
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
Barry4679
Posts: 2408
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: Available COM interface

Post by Barry4679 »

PetrCBR wrote:These COM commands/events will be implemented in MM5 next build (2061) :
  • ...
    SDBApplication.Database
    ExecSQL, OpenSQL (returns result as JSON string)
Are you also going to do BeginTransaction and Commit?
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: Available COM interface

Post by PetrCBR »

Will implement them.
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
pgrimmer
Posts: 17
Joined: Thu Jun 26, 2008 12:19 am

Re: Available COM interface

Post by pgrimmer »

I am very confused. I recently decided to write some scripts (actually using COM within Visual Basic 6 and VBA inside of Excel) and I see that MM5 is not going to use COM any more. I think that's not a smart move but that's not the basis of this post.

IN the first post of this thread it says "These COM commands/events will be implemented in MM5 next build (2061)".

My confusion is that this is in the MM5 developer forum but it is talking about new COM commands and events but the other posts I read say that COM is not part of MM5. So is COM/ActiveX part of MM5 or not? Thanks.
PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: Available COM interface

Post by PetrCBR »

MM5 is moved to chromium so main scripting language is JavaScript. Some basic MM4 COM API is implemented, but we do not plan to implement complete COM API.
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
pgrimmer
Posts: 17
Joined: Thu Jun 26, 2008 12:19 am

Re: Available COM interface

Post by pgrimmer »

Thanks. Is there somewhere I can go to find out what COM is planned to be included and what is going to be excluded (at least v4 things that won't be available in v5)? Thanks.
PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: Available COM interface

Post by PetrCBR »

No we do not have such a list.
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
Barry4679
Posts: 2408
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: Available COM interface

Post by Barry4679 »

Could you please consider a COM call to return the current result contents of a specified MM auto-playlist?

Either something where I passed the IDPlaylist or PlayListName of an autoplaylist, and a target playlist name, and the call exported a static playlist into PlaylistSongs,

Or return a rowset with the current content of the passed autoplaylist, with columns as per PlaylistSongs.

?
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Ludek
Posts: 4958
Joined: Fri Mar 09, 2007 9:00 am

Re: Available COM interface

Post by Ludek »

Hi, why do you need this?

You can just get the tracklist of the auto-playlist to get the content, isn't it?
Barry4679
Posts: 2408
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: Available COM interface

Post by Barry4679 »

Ludek wrote:Hi, why do you need this?

You can just get the tracklist of the auto-playlist to get the content, isn't it?
How?

I know how do it via the UI, but how do I do it via an application attached to your db via COM?

ie. The track list is|was a member in SDBPlayList, and you haven't said that you will implement that.

The definition of an autoplaylist is in the QueryData column of the Playlist table, but it is in a propriety format. It is not very robust to reverse engineer this.

I was hoping for a COM call which would populate a target static playlist from the autoplaylist definition, ie populate the current playlist entries into a target static playlist in the Playlist & PlayListSongs tables.

Or have something which triggered output like ExecSQL; ie. I passed it the ID of a autoplaylist, then you generated the sql from your priopriety QueryData definition, ran the query, then passed back the track rows in something like PlayListSongs format.

Or pass back the sql statements, so I could run the query myself
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Ludek
Posts: 4958
Joined: Fri Mar 09, 2007 9:00 am

Re: Available COM interface

Post by Ludek »

OK,
at first I don't know your reasons why you are not using the native MM5 scripting engine and its method getTracklist ( http://www.mediamonkey.com/webhelp/MM5P ... tTracklist )

Anyhow looking into our code you seem to be right that SDBPlayList is not fully implemented, most of the code of the corresponding properties/methods is commented out.
Seems to make sense to add them, going to discuss with other devs and look into it.

Just keep in mind that COM interface in MM5 will never be so powerful and so maintained as the native scripting interface (and won't be cross platform)
Barry4679
Posts: 2408
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: Available COM interface

Post by Barry4679 »

Ludek wrote:Just keep in mind that COM interface in MM5 will never be so powerful and so maintained as the native scripting interface (and won't be cross platform)
Just trying keep something running on MM5, something which already exists.

Thanks for considering this.
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Barry4679
Posts: 2408
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: Available COM interface

Post by Barry4679 »

The new documentation looks sweet.

I haven't yet figured out how it relates to the COM facilities.

You would need to also make sure that the PlaylistByID method was implemented
http://www.mediamonkey.com/wiki/index.p ... aylistByID

These would be good also

SDBApplication.PlaylistByTitle
SDBApplication.Database.Path
SDBApplication.IniFile.Path

http://www.mediamonkey.com/wiki/index.p ... istByTitle
http://www.mediamonkey.com/wiki/index.p ... base::Path
http://www.mediamonkey.com/wiki/index.p ... File::Path

SDBApplication.VersionHigh is on your list but should be VersionHi.
VersionRelease is also on the list, but returns a blank. ? because MM5 not released?
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Post Reply