API Docs for: 0.0.1
Show:

App Class

Main app support classes and functions

Methods

allowCollect

()

Allow app to collect garbage.

closeApp

()

Close application.

createWindow

(
  • url
  • params
)

Creates new window with URL. Currently these parameters are supported: left, top, width, height - position and size of the window posSaveName - save/restore name of the window isPopup (true/false) - is popup window

Parameters:

  • url String

    URL to be opened in new window

  • params Object

    Parameters (optional)

Returns:

SharedWindow

currentLayout

() String

Get current layout name.

Returns:

String:

currentSkin

() String

Get current skin name.

Returns:

String:

flushState

()

Stores all persistent values to hard drive

getAddonList

(
  • archiveType
)
AddonList

Get list of addons. As archiveType parameter script can set type of addons to retrieve or 'all' for all addons.

Parameters:

  • archiveType String

    Type of the addon

Returns:

AddonList:

getCurrentPlayer

() Integer

Get's current player type. Possible values: 0 - main player 1 - micro player 2 - mini player

Returns:

Integer:

getIniFile

() IniFileAccess

Creates new SharedIniFile interface to be used for reading and writing values from/to MediaMonkey.ini

Returns:

getLayouts

() SharedList

Get {StringList} of available layouts. Selected item in this list is current layout.

Returns:

getObject

(
  • objectType
  • JS
)
Promise

Gets object by its type and additional info. Can return nil only if passed JS object contains parameter canReturnEmpty: true

Parameters:

  • objectType String

    like 'album', 'genre'

  • JS Object

    object with specifying info in its properties, like id, name, mbgid

Returns:

Promise:

getSkins

() StringList

Get {StringList} of available skins. Selected item in this list is current skin.

Returns:

getValue

(
  • id
  • object
)
Object

Gets JS value/object previously stored by setValue,

Parameters:

  • id String

    unique id of the stored value

  • object Object

    object to pass (default value)

Returns:

Object:

object (modified object from the second parameter)

inSafeMode

() Boolean

Return true when app is on safe mode where scripts are not loaded and default skin/layout is set.

Returns:

Boolean:

installAddonAsync

(
  • path
)
Promise

Install new addon.

Parameters:

  • path String

    Filename of the addon to install

Returns:

Promise:

listen

(
  • object
  • event
  • callback
  • capture
)

Sets event listener of the object. Event function MUST be binded to object's window class.

Parameters:

  • object Object

    Object where to set listener

  • event String

    Event of the listener

  • callback Method

    Method for callback dispatch

  • capture Boolean

    Capture mode

Returns:

Method

loadLayout

(
  • name
)

Load defined layout.

Parameters:

  • name String

    Name of the layout to load

ODS

(
  • string
)

Send debug string to event list.

Parameters:

  • string String

    debug string

preventCollect

()

Prevent app to collect garbage (must be in pair with allowCollect).

selectSkin

(
  • name
)

Load defined skin.

Parameters:

  • name String

    Name of the skin

setValue

(
  • id
  • value
)

Stores JS value/object to be persistent

Parameters:

  • id String

    unique id of the stored value

  • value Object

switchToMainPlayer

()

Switch to player in main window.

switchToMicroPlayer

()

Switch to player in tray bar.

switchToMiniPlayer

()

Switch to player in separate mini window.

uninstallAddonAsync

(
  • addon
)
Promise

Uninstall addon.

Parameters:

  • addon Addon

    Addon to uninstall

Returns:

Promise:

unlisten

(
  • object
  • event
  • callback
)

Removed event listener of the object.

Parameters:

  • object Object

    Object of the listener

  • event Event

    Event of the listener (optional)

  • callback Method

    Method to be removed (optional)

Properties

backgroundTasks

BackgroundTasks

Gets background tasks manager

collections

Collections

Gets collections manager class

db

DB

Gets Database support class

devices

Devices

Gets portable devices manager class

dialogs

Dialogs

Gets dialogs class

downloader

Downloader

Download manager class

fileFormats

FileFormats

Gets class for operating file formats

filesystem

Filesystem

Gets class for filesystem operations

hotkeys

Hotkeys

Gets hotkeys class

importer

TImporter

Gets class for importer operations

inPartyMode

Boolean

Gets/Sets whether app is in party mode

masks

Masks

Gets class for masks operations

platform

String

Gets application platform, possible values are 'win', 'mac'

player

Player

Gets Player object

playlists

Playlists

Gets playlists manager class

podcasts

Podcasts

Gets podcasts manager class

settings

Settings

Gets settings class

sharing

Sharing

Gets media sharing (UPnP/DLNA) manager class

sleeper

Shutdowner

Sleep timer class

trackOperation

TrackOperation

Gets Track operations class

trayIcon

TrayIcon

Gets class for tray icon operations

utils

Utils

Gets utils class