コード例 #1
0
  public synchronized void remove(PlaylistItem playlistItem) {
    MetadataThread metadataThread = metadataFetchers.get(playlistItem);

    if (metadataThread != null) {
      metadataThread.stopFetching();

      try {
        metadataThread.join();

        metadataFetchers.remove(playlistItem);
      } catch (InterruptedException e) {
        e.printStackTrace();
        System.out.println("Error joining thread for playlist item: " + playlistItem);
      }
    }
  }