Media server (UPnP/DLNA) Accessible e.g. via app.sharing.getServers()

MediaServer

Hierarchy (view full)

Constructors

Properties

acceptExternalIP: boolean

Whether to accept connections coming outside of LAN

asJSON: string

Gets the object as serialized JSON string. Or sets serialized JSON (to fill this object's metadata by the metadata included within the JSON)

autoConvertConfig: AutoConvertSettings

Auto-convert rules config

autoShare: boolean

Whether auto share with all new devices without prompt

deleted: boolean

Set to true after deletion so that 'change' event is called and item is removed from UI lists.

dontNotify: boolean

Undocumented

enablePlayCount: boolean

Whether play counter should be updated when a track is streamed / downloaded via the server

enabled: boolean

Whether this server is enabled to auto-run

id: number

Gets integer id of the object

ip: string

IP of this server (as configured)

isObservable: boolean

Whether this object can be listened (e.g. for 'change' event)

isStatusBarSource: boolean

Is source for status bar informations.

name: string

Name of this server

objectType: string

Gets the object type as string

persistentID: string

Gets persistent id of the object

port: number

IP port

running: boolean

Whether this server runs

runningIP: string

IP of this server (when server runs)

scrobble: boolean

Scrobble to last.fm if Scrobbling is enabled

showLetterIndex: boolean

Whether to show letter indexes for categories when serving large content lists

showLetterIndexLimit: number

Amount of items in the list to hit letter indexes for categories (when serving large content lists)

statusInfo: Promise<any>

Undocumented

title: string

Gets the object title

Methods

  • Lock object to update state. Events are not called when in update state.

    Returns void

  • Updates the object every X ms when called periodically. Useful e.g. when filling lists. Can be used only in the update lock! (i.e. between beginUpdate/endUpdate)

    Parameters

    • interval: number

    Returns void

  • Commits into database

    Returns Promise<any>

  • Parameters

    Returns Promise<any>

    Undocumented

  • Unlock object from update state. beginUpdate and endUpdate must be in pair. When endUpdate is called, change event is called.

    Returns boolean

  • Gets class name of the object.

    Returns string

  • Gets list of devices that has connected to this server so far

    Returns RemoteDeviceList

    RemoteClientList

  • Gets list of possible IP addresses on which this server can run

    Returns StringList

  • Parameters

    • id: number

    Returns boolean

    Undocumented

  • Call defined method with locked data so user can access them.

    Parameters

    • func: (() => any)

      Method to call

        • (): any
        • Returns any

    Returns void

  • Call defined method with the item locked for modifications.

    Parameters

    • Rest ...params: any[]

    Returns Promise<any>

  • Notifies that the object was changed (e.g. to force visual update etc.)

    Parameters

    • Rest ...params: any[]

    Returns void

  • Removes from database

    Returns Promise<any>

  • Restarts the server

    Returns Promise<any>

  • Runs the server

    Returns Promise<any>

  • Parameters

    • id: number
    • value: boolean

    Returns void

    Undocumented

  • Sets list of objects to be shared (collections, playlists)

    Parameters

    Returns void

  • Stops the server

    Returns Promise<any>

Events

event_change: ((changeType, ...additionalArgs) => void)

Event is called when object is somehow changed

See App.listen

Type declaration

    • (changeType, ...additionalArgs): void
    • Parameters

      • changeType: string

        additional change type (can have values like 'tracklist', 'deleted', 'title' or undefined)

      • Rest ...additionalArgs: any[]

      Returns void

Example

app.listen(object, 'change', (changeType) => {  });
event_destroying: (() => void)

Event is called when object is going to destroy

See App.listen

Type declaration

    • (): void
    • Returns void

event_statuschange: (() => void)

Event is called when status info of the object is changed

See App.listen

Type declaration

    • (): void
    • Returns void