MM5 external interface

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

Moderators: jiri, drakinite, Addon Administrators

TIV73
Posts: 229
Joined: Sat Nov 12, 2011 1:31 pm

MM5 external interface

Post by TIV73 »

Hi everyone,
I'm currently using a rainmeter plugin I quickly hacked together after MM5 alpha builds were released to the public - with emphasis being on "hacked together". It works, but it's painful to look at. Since MM is closing in to a beta release I'm considering to rewrite the plugin, but I'm a little concerned about how future proof the whole thing is.

I'm using the chrome remote debugging api exposed by chromium on port 9222 to interact with MediaMonkey, which works really well because it basically gives me access to the chrome developer console, and from there I can execute js commands to read data or perform actions.
What I'm concerned about is whether remote debugging port will still be available in the release version of MM5 or if it's strictly an alpha/beta thing - I'd rather not invest time into completely rewriting the whole thing if I know that it will be obsolete in a couple of months anyway.

I'd appreciate if somebody could share some insight over what the plans for the future are and/or if there's any other recommended way for external tools and applications to interface with MediaMonkey 5.
Last edited by TIV73 on Mon Jul 02, 2018 11:21 am, edited 1 time in total.
PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: MM5 external interface

Post by PetrCBR »

Hi.

We've moved to chromium because of future. Our old skinning engine (MM3 & MM4) is very limited ... with HTML/JS we (and users) have almost unlimited UI options and any new feature can be developed easily in JavaScript.
About DevTools ... we're using devtools for debugging as well and it will be enabled for all debug versions (always on port 9222). For scripts development i can recommend Brackets.

Regards, Petr.
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: MM5 external interface

Post by TIV73 »

Hi PetrCBR,
I fully agree, the new engine is a massive step forward from the old one in MM3/4, no questions here.

I wasn't actually talking about that, though - let me rephrase the question. I wrote a .net library, which allows external applications to connect to mediamonkey 5. A sample application using this library is a rainmeter plugin which displays information about the currently playing song in MM5.

The library connects to chromium via the exposed remote debugging api on port 9222 and can send javascripts command to mediamonkey which I then use to read data or send remote control commands.

When writing the original version of the library I didn't really pay much attention to code quality, some of its dependencies aren't being developed anymore and need to be replaced, I wrote the thing before MM5 supported async calls which need to be implemented for performance reasons, etc.. Long story short, the project probably wouldn't pass a code review. That is why I'm thinking of rewriting it.

Hence the question - is the release versions of MM5 planned to still expose port 9222 or is this a alpha/beta thing only? Because if it won't I have to look for alternatives like WMI (which I try to avoid because it's only availale on windows).
PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: MM5 external interface

Post by PetrCBR »

DevTools will be most probably always enabled in debug build (installer with _Debug in it's name .. also this build generate a lot of debug code to be captured by DebugView), but i don't think it will be enabled in regular build. If you need to communicate somehow with MM5 from .NET, probably you can use our COM model (see here) as it's always available.
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: MM5 external interface

Post by TIV73 »

Alright, that answers it, thanks a lot for the response!
PetrCBR
Posts: 1763
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: MM5 external interface

Post by PetrCBR »

fyi after internal communication we've decided to enable remote debugging port (9222) for all builds (not just debug). So you can be sure this port will be _always_ opened and ready for use.
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: MM5 external interface

Post by TIV73 »

Oh wow, that's awesome. Thanks a lot for letting me know!
crutchcorn
Posts: 32
Joined: Sat Feb 23, 2013 11:38 pm

Re: MM5 external interface

Post by crutchcorn »

PetrCBR wrote: Mon Jul 09, 2018 4:07 am fyi after internal communication we've decided to enable remote debugging port (9222) for all builds (not just debug). So you can be sure this port will be _always_ opened and ready for use.
Thank you so much for this. I'm working on some integrations right now and this is massively helpful!
Post Reply