Collection

Hierarchy (view full)

Constructors

Properties

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)

collectionCond: string

Gets/Sets collection query condition in the old INI format

criteriaJSON: string

Gets/Sets collection query condition in the new JSON portable and human readable format

deleted: boolean

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

description: string

Gets/Sets description of the collection.

dontNotify: boolean

Undocumented

icon: string

Icon name of the collection.

id: number

Gets integer id of the object

idColl: number

Undocumented

isObservable: boolean

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

isStatusBarSource: boolean

Is source for status bar informations.

itemImageType: string

Undocumented

name: string

Gets/Sets name of the collection.

objectType: string

Gets the object type as string

persistentID: string

Gets persistent id of the object

pos: number

Gets/Sets position order of the collection node in media tree.

queryData: QueryData

Gets queryData of the collection.

statusInfo: Promise<any>

Undocumented

supportPin: boolean

Whether object support pin to pinned list

title: string

Gets the object title

visibleInMainTree: number

Gets/Sets visibility of the collection in media tree. It can be one of the value: 0 - invisible (false) 1 - visible (true) 2 - visible if not empty

Methods

  • Add new external list associated with object.

    Parameters

    • linkType: string

      Type of a link

    • linkInfo: string

      Link information (like release or releaseGroup for musicbrainz link)

    • link: string

      Link string

    Returns Promise<any>

  • Assign internal data from collection.

    Parameters

    Returns void

  • 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

  • Save collection to 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

  • Get ArtistList based on collection filter. Returns album artists only.

    Returns ArtistList

  • Get AlbumList based on collection filter.

    Parameters

    • Rest ...params: any[]

    Returns AlbumList

  • Get ArtistList based on collection filter. Returns artists only (contributing artists).

    Returns ArtistList

  • Get cached empty of the collection.

    Returns boolean

  • Get cached visible status of the collection.

    Returns boolean

  • Gets class name of the object.

    Returns string

  • Returns Promise<any>

    Undocumented

  • Get copy of the collection.

    Returns Collection

    Collection

  • Get decade list.

    Parameters

    • Rest ...params: any[]

    Returns DecadeList

  • Returns boolean

    Undocumented

  • Get visible status of the collection.

    Returns Promise<any>

  • Get external link associated with the object. All link identifiers are (updated list is available in consts.js) : var LINK_MUSICBRAINZ = 'musicbrainz', LINK_ACOUSTID = 'acoustid', LINK_TVDB = 'tvdb', LINK_MAZE = 'maze', LINK_IMDB = 'imdb', LINK_WIKI = 'wiki', LINK_ECHOPRINT = 'echoprint', LINK_MOVIEDB = 'moviedb', LINK_DISCOGS = 'discogs';

    Parameters

    • Rest ...params: any[]

    Returns ExternalLinksList

  • Get Rating | rating class based on collection filter and specified rating. Rating should be a value between 0 and 100 where 0 is unknown and 100 is 5 stars.

    Parameters

    • rating: number

      Rating value

    Returns RatingItem

  • Get tracklist based on collection filter.

    Parameters

    • Rest ...params: any[]

    Returns Tracklist

  • Get type of a collection. Known types are: music, podcast, videopodcast, audiobook, classicalmusic, musicvideo, video, tv, mixed

    Returns string

  • Parameters

    • year: number

    Returns Year

    Undocumented

  • Collection has video content.

    Returns boolean

  • Parameters

    • id: number

    Returns boolean

    Undocumented

  • Object is pinned in pinned list

    Returns Promise<any>

  • 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

  • Remove external link from object.

    Parameters

    • Rest ...params: any[]

    Returns Promise<any>

  • Mark collection as to be deleted.

    Returns void

  • Returns void

    Undocumented

  • Parameters

    • id: number
    • value: boolean

    Returns void

    Undocumented

  • Set object is pinned in pinned list.

    Parameters

    • pinned: boolean

      Object is pinned

    • collID: number

      ID of collection where object is pinned

    Returns void

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