ODS Change Suggestion

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

Moderators: jiri, drakinite, Addon Administrators

MyVikes
Posts: 91
Joined: Sun Jul 02, 2017 1:20 am

ODS Change Suggestion

Post by MyVikes »

I've recently been experimenting with using the MM5 ODS function ( https://www.mediamonkey.com/wiki/Import ... ons%29#ODS ) and the MS DebugView for my console messages. The format for the javascript console messages i've been using is along the lines of using the comma as follows:

Code: Select all

console.log("Variable varName value is:", varName)
where the output would then be, for example, "Variable varName value is: 55".

So at the start of my script i simply added this:

Code: Select all

console.log = ODS; 
It kinda worked as i see my mesages in MS DebugView except that the commas are ignored and i only see "Variable varName value is:". if i change the , to a + then of course it works.

It seems like it might be a simple ask to have the ODS function append all the values separated by commas in the parenthesis to be more like console.log and so as others like myself would not to have to rewrite all my console.log messages.

:D
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: ODS Change Suggestion

Post by drakinite »

Try this:

Code: Select all

function debugLog(...params) {
    ODS(params.join(', '));
}
Better not override the default console.log, in case it causes errors or unexpected behavior for other addons. Replace your console.log() calls with debugLog(), and it'll join all the parameters together into one string then call ODS.
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
MyVikes
Posts: 91
Joined: Sun Jul 02, 2017 1:20 am

Re: ODS Change Suggestion

Post by MyVikes »

Sounds good...thx
Post Reply