Class TrackMetadata


  • public class TrackMetadata
    extends Object
    Represents rekordbox metadata (title, artist, etc.) about tracks loaded into players on a DJ Link network.
    Author:
    James Elliott
    • Field Detail

      • trackReference

        public final DataReference trackReference
        The unique track identifier that was used to request this track metadata.
      • trackType

        public final CdjStatus.TrackType trackType
        The type of track described by this metadata.
      • rawItems

        public final List<Message> rawItems
        The raw dbserver messages containing the metadata when it was read over the network. Can be used to analyze fields that have not yet been reliably understood, and is also used for storing the metadata in a file. Will be null if the metadata was constructed from a RekordboxPdb.TrackRow.
        See Also:
        rawRow
      • rawRow

        public final RekordboxPdb.TrackRow rawRow
        The raw row within a rekordbox database export from which this metadata was created, if any. Will be null if it was read from a dbserver metadata response.
        See Also:
        rawItems
    • Constructor Detail

      • TrackMetadata

        public TrackMetadata​(DataReference reference,
                             Database database,
                             CueList cueList)
        Constructor for when reading from a rekordbox export file. Finds the desired track in the exported database, along with all of the related records, and sets all the interpreted fields based on the parsed database structures.
        Parameters:
        reference - the unique track reference for which track metadata is desired
        database - the database from which the row was loaded, in order to find related rows
        cueList - the cues associated with the track, if any
        Throws:
        NoSuchElementException - if the specified track is not found in the database
    • Method Detail

      • getAlbum

        public SearchableItem getAlbum()
        Get the album of the track.
        Returns:
        the track album
      • getArtist

        public SearchableItem getArtist()
        Get the artist of the track.
        Returns:
        the track artist
      • getArtworkId

        public int getArtworkId()
        Get the artwork ID for the track. Will be zero for tracks that have no artwork.
        Returns:
        the value that can be used to request the artwork image, if any, associated with the track
      • getColor

        public ColorItem getColor()
        Get the color assigned to the track.
        Returns:
        the track color
      • getComment

        public String getComment()
        Get the comment assigned to the track.
        Returns:
        the track comment
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getBitRate

        public int getBitRate()
        Get the bit rate of the track, if known.
        Returns:
        the audio bit rate of the track, in kilobits per second , or 0 if unknown or variable.
      • getCueList

        public CueList getCueList()
        Get the cue list associated with the track. Will be null if no hot cues, loops, or memory points are found in the track.
        Returns:
        the hot cues, loops and memory points stored for the track, if any
      • getDateAdded

        public String getDateAdded()
        Get the date the track was added to the collection. This information seems to propagate from iTunes.
        Returns:
        the date the track was added to the collection, in the form "YYYY-MM-DD"
      • getDuration

        public int getDuration()
        Get the duration of the track, in seconds.
        Returns:
        the track length in seconds, when played at 100% pitch
      • getGenre

        public SearchableItem getGenre()
        Get the genre of the track.
        Returns:
        the track genre
      • getKey

        public SearchableItem getKey()
        Get the musical key of the track.
        Returns:
        the track key
      • getLabel

        public SearchableItem getLabel()
        Get the label that released the track.
        Returns:
        the track recording label
      • getOriginalArtist

        public SearchableItem getOriginalArtist()
        Get the track's original artist.
        Returns:
        the artist that originally released the track
      • getRating

        public int getRating()
        Get the rating assigned the track.
        Returns:
        the track rating
      • getRemixer

        public SearchableItem getRemixer()
        Get the producer who remixed the track.
        Returns:
        the track remixer
      • getTempo

        public int getTempo()
        Get the starting tempo of the track.
        Returns:
        the initial track tempo, BPM times 100.
      • getTitle

        public String getTitle()
        Get the title of the track.
        Returns:
        the track title
      • getYear

        public int getYear()
        Get the year of the track, if known.
        Returns:
        the year the track was created, or 0 if rekordbox is not indexing by year.