Gets/sets actors.
Gets/sets album.
Gets/sets albumArtist.
Gets/sets artist.
Gets the object as serialized JSON string. Or sets serialized JSON (to fill this object's metadata by the metadata included within the JSON)
Gets/sets author aka composer.
Gets/sets bitrate.
Gets/sets BPM (beats per minute).
Gets shortened version of the track comment, max 200 characters, shortened with ellipses. Read-only. To get/set the full comment, use getCommentAsync and setCommentAsync.
Gets/sets author aka composer.
Gets/sets conductor.
Gets/sets custom1 field.
Gets/sets custom10 field.
Gets/sets custom2 field.
Gets/sets custom3 field.
Gets/sets custom4 field.
Gets/sets custom5 field.
Gets/sets custom6 field.
Gets/sets custom7 field.
Gets/sets custom8 field.
Gets/sets custom9 field.
Gets/sets date.
Gets/sets dateAdded DateTime property (when the file has been added to library).
Use e.g.
track.dateAdded = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.dateAdded = app.utils.timestamp2DateTime( new Date().toISOString());
or
track.dateAdded = new Date();
Gets/sets dateAdded DateTime property (when the file has been added to library).
Use e.g.
track.dateAdded_UTC = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.dateAdded_UTC = app.utils.timestamp2DateTime( new Date().toISOString());
or
track.dateAdded_UTC = new Date();
Gets/sets day. Automatically updated by date.
Set to true after deletion so that 'change' event is called and item is removed from UI lists.
Gets/sets discNumber.
Gets/sets episode number.
Read-only shortened version of extendedTags, as JSON. To get the full tags, use getExtendedTagsAsync()
Gets/sets fileLength in bytes.
Gets/sets fileModified DateTime property.
Use e.g.
track.fileModified = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.fileModified_UTC = app.utils.timestamp2DateTime( new Date().toISOString());
Gets/sets fileModified DateTime property.
Use e.g.
track.fileModified = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.fileModified_UTC = app.utils.timestamp2DateTime( new Date().toISOString());
Gets/sets frequency/Sample rate in hz.
Gets/sets genre.
Gets/sets grouping.
Gets integer id of the object
Gets/sets ID as is in database (Songs.ID).
Gets/sets involvedPeople.
Whether this object can be listened (e.g. for 'change' event)
Gets whether this media is currently playing
Is source for status bar informations.
Gets whether this media item is video
Gets/sets lastTimePlayed DateTime property (when the file has been last time played).
Use e.g.
track.lastTimePlayed = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.lastTimePlayed_UTC = app.utils.timestamp2DateTime( new Date().toISOString());
Gets/sets lastTimePlayed DateTime property (when the file has been last time played).
Use e.g.
track.lastTimePlayed = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.lastTimePlayed_UTC = app.utils.timestamp2DateTime( new Date().toISOString());
Gets/sets lastTimeSkipped DateTime property (when the file has been last time skipped).
Use e.g.
track.lastTimeSkipped = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.lastTimeSkipped_UTC = app.utils.timestamp2DateTime( new Date().toISOString());
Gets/sets lastTimePlayed DateTime property (when the file has been last time played).
Use e.g.
track.lastTimeSkipped = app.utils.timestamp2DateTime( 'YYYY-MM-DD HH:MM:SS' );
or
track.lastTimeSkipped_UTC = app.utils.timestamp2DateTime( new Date().toISOString());
Gets/sets lyricist.
Gets/sets month. Automatically updated by date.
Gets/sets mood.
Set to true once some changes in DB were made externally (to refresh the data)
Gets the object type as string
Gets/sets occasion.
Gets/sets original artist.
Gets/sets original date.
Setting origDate automatically updates origYear, origMonth, and origDay.
Gets/sets original day. Automatically updated by origDate.
Gets/sets original month. Automatically updated by origDate.
Gets/sets original album title.
Gets/sets original year. Automatically updated by origDate.
Gets/sets file path.
Gets persistent id of the object
Gets/sets played #.
gets true playLength in milliseconds (startTime / stopTime taken into account)
Gets/sets producer.
Gets/sets publisher.
Gets/sets quality.
Gets/sets rating.
Gets/sets season number.
Gets/sets skipped #.
Gets/sets songLength in milliseconds.
Gets/sets startTime in milliseconds.
Gets/sets stopTime in milliseconds.
Gets/sets summary.
Whether object support pin to pinned list
Gets/sets tempo.
Gets/sets title of this media item.
Gets/sets track number.
Gets/sets year. Automatically updated by date.
Adds metadata from another track. Does not override values, i.e. assigns only fields that are currently empty
Assigns metadata from another track
Saves this track into database (and tag -- based on user's settings)
Promise is fulfilled when action is completed.
Optional
params: { Optional
forceif true, then also the new files (not in db yet) are saved, default = false
Optional
tagif false, the metadata is not written to the file tag, default = true
Unlock object from update state. beginUpdate and endUpdate must be in pair. When endUpdate is called, change event is called.
Returns album class
Get all external object links (acoustID, musicbrainz, wikipedia etc.)
Gets full comment field asynchronously. The full lyrics
, comment
, and extendedTags
are not loaded in memory until needed to improve memory usage and performance.
commentShort is synchronous but only returns up to the first 200 characters.
track.getCommentAsync().then(function (comment) {
// ...
})
// or, inside an async function:
let comment = await track.getCommentAsync();
Use getCommentAsync instead.
Gets full extendedTags field asynchronously. The full lyrics
, comment
, and extendedTags
are not loaded in memory until needed to improve memory usage and performance.
extendedTagsShort is synchronous but only returns up to the first 200 characters.
track.getExtendedTagsAsync().then(function (extendedTags) {
// ...
})
// or, inside an async function:
let extendedTags = await track.getExtendedTagsAsync();
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';
Rest
...params: any[]Gets full lyrics field asynchronously. The full lyrics
, comment
, and extendedTags
are not loaded in memory until needed to improve memory usage and performance.
lyricsShort is synchronous but only returns up to the first 200 characters.
track.getLyricsAsync().then(function (lyrics) {
// ...
})
// or, inside an async function:
let lyrics = await track.getLyricsAsync();
Use getLyricsAsync instead.
Returns list of person by specified type
Sets the extendedTags field asynchronously. Must be in a JSON-formatted string.
track.setExtendedTagsAsync(myTagsJSON).then(function () {
// ...
})
// or, inside an async function:
await track.setExtendedTagsAsync(myTagsJSON);
Event is called when object is somehow changed
See App.listen
additional change type (can have values like 'tracklist', 'deleted', 'title' or undefined)
Rest
...additionalArgs: any[]app.listen(object, 'change', (changeType) => { });
Event is called when object is going to destroy
See App.listen
Event is called when status info of the object is changed
See App.listen
Media item class
Track