docs: @SuppressWarnings({"SameParameterValue", "WeakerAccess"})
      public static void createMetadataCache(final SlotReference slot, final int playlistId,
                                      final File cache, final MetadataCacheCreationListener listener)
              throws Exception {
          ConnectionManager.ClientTask<Object> task = new ConnectionManager.ClientTask<Object>() {
              @SuppressWarnings("SameReturnValue")
              @Override
              public Object useClient(Client client) throws Exception {
                  final List<Message> trackList;
                  if (playlistId == 0) {
                      trackList = MetadataFinder.getInstance().getFullTrackList(slot.slot, client, 0);
                  } else {
                      trackList = MetadataFinder.getInstance().getPlaylistItems(slot.slot, 0, playlistId, false, client);
                  }
                  MetadataCache.copyTracksToCache(trackList, playlistId, client, slot, cache, listener);
                  return null;
              }
          };
  
          if (cache.exists() && !cache.delete()) {
              logger.warn("Unable to delete cache file, {}", cache);
          }
          ConnectionManager.getInstance().invokeWithClientSession(slot.player, task, "building metadata cache");
      }