Available COM interface

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

Moderator: jiri

Available COM interface

Postby PetrCBR » Sun Feb 12, 2017 6:11 am

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.
PetrCBR
 
Posts: 1338
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech

Re: Available COM interface

Postby TIV73 » Sun Feb 26, 2017 3:14 pm

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?
TIV73
 
Posts: 43
Joined: Sat Nov 12, 2011 1:31 pm

Re: Available COM interface

Postby PetrCBR » Mon Mar 06, 2017 2:14 am

You can register using REGCOMSERVER command line parameter. JavaScript/HTML scripting is highly recommended.
PetrCBR
 
Posts: 1338
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech

Re: Available COM interface

Postby Barry4679 » Wed May 31, 2017 11:41 pm

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?
Barry4679
 
Posts: 254
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia

Re: Available COM interface

Postby PetrCBR » Thu Jun 01, 2017 1:46 am

Will implement them.
PetrCBR
 
Posts: 1338
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech

Re: Available COM interface

Postby pgrimmer » Thu Jul 27, 2017 7:01 am

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.
pgrimmer
 
Posts: 15
Joined: Thu Jun 26, 2008 12:19 am

Re: Available COM interface

Postby PetrCBR » Thu Jul 27, 2017 8:21 am

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.
PetrCBR
 
Posts: 1338
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech

Re: Available COM interface

Postby pgrimmer » Thu Jul 27, 2017 8:42 am

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.
pgrimmer
 
Posts: 15
Joined: Thu Jun 26, 2008 12:19 am

Re: Available COM interface

Postby PetrCBR » Thu Jul 27, 2017 8:57 am

No we do not have such a list.
PetrCBR
 
Posts: 1338
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech

Re: Available COM interface

Postby Barry4679 » Tue Dec 05, 2017 1:03 am

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.

?
Barry4679
 
Posts: 254
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia

Re: Available COM interface

Postby Ludek » Fri Dec 08, 2017 9:12 am

Hi, why do you need this?

You can just get the tracklist of the auto-playlist to get the content, isn't it?
Ludek
 
Posts: 2245
Joined: Fri Mar 09, 2007 9:00 am

Re: Available COM interface

Postby Barry4679 » Fri Dec 08, 2017 9:52 pm

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
Barry4679
 
Posts: 254
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia

Re: Available COM interface

Postby Ludek » Sun Dec 10, 2017 5:55 am

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)
Ludek
 
Posts: 2245
Joined: Fri Mar 09, 2007 9:00 am

Re: Available COM interface

Postby Barry4679 » Sun Dec 10, 2017 5:15 pm

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.
Barry4679
 
Posts: 254
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia

Re: Available COM interface

Postby Barry4679 » Sun Dec 10, 2017 6:28 pm

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?
Barry4679
 
Posts: 254
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia

Next

Return to MediaMonkey 5 developer forum

Who is online

Users browsing this forum: No registered users and 3 guests