示例#1
0
 @Override
 public void onFileShared(FileSharedEvent fileSharedEvent) {
   log.debug("Received FileSharedEvent with allLink " + fileSharedEvent.getAllLink());
   // this implementations only works for phex sharer events, change to
   // adapt to new share implementations
   AllLink updatedAllLink = fileSharedEvent.getAllLink();
   String downloadId = updatedAllLink.getHashCode();
   musicEntityService.updateDownloadString(downloadId, updatedAllLink.toString());
 }
示例#2
0
 private void shareTracks(List<Track> tracks) {
   log.info("Files to be shared: " + tracks.size());
   for (Track track : tracks) {
     if (interrupted.get()) {
       log.info("Interrupted while making share");
       return;
     }
     if (musicEntityService.isFileAvailable(track)) {
       share(track);
     }
   }
 }
示例#3
0
 private void share() {
   shareTracks(musicEntityService.getAllTracks());
 }