Defines set of search rules (e.g. auto-playlist is defined by QueryData), see dlgSearch for example

QueryData

Hierarchy (view full)

Constructors

Properties

advancedSearch: boolean

Undocumented

allFieldsList: StringList

Gets all possible fields that can be used ('Album','Rating',...)

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)

collection: string

Gets/Sets collection to be searched ('Entire Library', 'Music', 'Video',...)

collectionID: number

Undocumented

conditions: QueryConditionList

Gets list of QueryCondition objects defining search rules, see dlgSearch for example

deleted: boolean

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

dontNotify: boolean

Undocumented

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

limitOrderIndex: number

Undocumented

matchAllCriteria: boolean

Undocumented

maxBytesEnabled: boolean

Undocumented

maxBytesValue: number

Undocumented

maxCountEnabled: boolean

Undocumented

maxCountValue: number

Undocumented

maxLenEnabled: boolean

Undocumented

maxLenValue: number

Undocumented

objectType: string

Gets the object type as string

persistentID: string

Gets persistent id of the object

quickSearch: boolean

Undocumented

searchPhrase: string

Gets/Sets phrase to be searched (e.g. when searching via search bar)

statusInfo: Promise<any>

Undocumented

supportPin: boolean

Whether object support pin to pinned list

title: string

Gets the object title

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>

  • 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

  • Returns void

    Undocumented

  • 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 all albums fullfilling this query params

    Parameters

    • Rest ...params: any[]

    Returns AlbumList

  • Returns StringList

    list of all possible limit orders

  • Returns StringList

    list of all possible sort orders

  • Gets class name of the object.

    Returns string

  • Parameters

    • includeFilter: string
    • excludeFilter: string

    Returns StringList

    Undocumented

  • Gets all genres fullfilling this query params

    Parameters

    • Rest ...params: any[]

    Returns GenreList

  • 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

  • Returns string

    sort string used in SQL

  • Gets persons fullfilling this query params

    Parameters

    • Rest ...params: any[]

    Returns ArtistList

  • Gets all playlists fullfilling this query params

    Parameters

    • Rest ...params: any[]

    Returns PlaylistList

  • Gets all podcasts fullfilling this query params

    Parameters

    • Rest ...params: any[]

    Returns PodcastList

  • Returns any

    JS array of currently set sort orders, see dlgSearch.js for examples

  • Returns Promise<any>

    Undocumented

  • Gets list of files that fullfills this search criteria

    Parameters

    • Rest ...params: any[]

      content optional param to specify content e.g. {contentType: 'audio', fillPlayOrder: true}

      var trcklist = QueryData.getTracklist();
      trcklist.whenLoaded().then(function () {
      // all tracks are loaded here
      });

    Returns Tracklist

  • Parameters

    Returns boolean

    Undocumented

  • Parameters

    • id: number

    Returns boolean

    Undocumented

  • Object is pinned in pinned list

    Returns Promise<any>

  • Parameters

    • query: string

    Returns number

    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

  • Remove external link from object.

    Parameters

    • Rest ...params: any[]

    Returns Promise<any>

  • Parameters

    • value: string

    Returns string

    sort string used by QueryData

  • Returns string

    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

  • Sets sort orders, it is JS array (see dlgSearch.js for examples)

    Parameters

    • Value: any

    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