@ SuppressWarnings ( "WeakerAccess" ) public TrackMetadata requestMetadataFrom ( final CdjStatus status ) { if ( status . getTrackSourceSlot ( ) == CdjStatus . TrackSourceSlot . NO_TRACK || status . getRekordboxId ( ) == 0 ) { return null ; } final DataReference track = new DataReference ( status . getTrackSourcePlayer ( ) , status . getTrackSourceSlot ( ) , status . getRekordboxId ( ) ) ; return requestMetadataFrom ( track , status . getTrackType ( ) ) ; }
Given a status update from a CDJ find the metadata for the track that it has loaded if any . If there is an appropriate metadata cache will use that otherwise makes a query to the players dbserver .