code: private TrackMetadata requestMetadataInternal(final DataReference track, final CdjStatus.TrackType trackType,
                                                    final boolean failIfPassive) {
          // First check if we are using cached data for this request.
          MetadataCache cache = getMetadataCache(SlotReference.getSlotReference(track));
          if (cache != null && trackType == CdjStatus.TrackType.REKORDBOX) {
              return cache.getTrackMetadata(null, track);
          }
  
          // Then see if any registered metadata providers can offer it for us.
          final MediaDetails sourceDetails = getMediaDetailsFor(track.getSlotReference());
          if (sourceDetails != null) {
              final TrackMetadata provided = allMetadataProviders.getTrackMetadata(sourceDetails, track);
              if (provided != null) {
                  return provided;
              }
          }
  
          // At this point, unless we are allowed to actively request the data, we are done. We can always actively
          // request tracks from rekordbox.
          if (passive.get() && failIfPassive && track.slot != CdjStatus.TrackSourceSlot.COLLECTION) {
              return null;
          }
  
          // Use the dbserver protocol implementation to request the metadata.
          ConnectionManager.ClientTask<TrackMetadata> task = new ConnectionManager.ClientTask<TrackMetadata>() {
              @Override
              public TrackMetadata useClient(Client client) throws Exception {
                  return queryMetadata(track, trackType, client);
              }
          };
  
          try {
              return ConnectionManager.getInstance().invokeWithClientSession(track.player, task, "requesting metadata");
          } catch (Exception e) {
              logger.error("Problem requesting metadata, returning null", e);
          }
          return null;
      }
docs: Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,
  using cached media instead if it is available, and possibly giving up if we are in passive mode.
  
  @param track uniquely identifies the track whose metadata is desired
  @param trackType identifies the type of track being requested, which affects the type of metadata request
  message that must be used
  @param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic
  metadata updates will use available caches only
  
  @return the metadata found, if any