diff --git a/core/src/main/groovy/com/muwire/core/download/Downloader.groovy b/core/src/main/groovy/com/muwire/core/download/Downloader.groovy index a2fc8730..0bad8779 100644 --- a/core/src/main/groovy/com/muwire/core/download/Downloader.groovy +++ b/core/src/main/groovy/com/muwire/core/download/Downloader.groovy @@ -214,7 +214,7 @@ public class Downloader { if (downloaded.isComplete() && !eventFired) { piecesFile.delete() eventFired = true - eventBus.publish(new FileDownloadedEvent(downloadedFile : new DownloadedFile(file, infoHash, pieceSize, Collections.emptySet())), + eventBus.publish(new FileDownloadedEvent(downloadedFile : new DownloadedFile(file, infoHash, pieceSizePow2, Collections.emptySet())), downloader : Downloader.this) } endpoint?.close() diff --git a/core/src/main/groovy/com/muwire/core/search/UIResultEvent.groovy b/core/src/main/groovy/com/muwire/core/search/UIResultEvent.groovy index 9aa86ab3..db3b12e0 100644 --- a/core/src/main/groovy/com/muwire/core/search/UIResultEvent.groovy +++ b/core/src/main/groovy/com/muwire/core/search/UIResultEvent.groovy @@ -11,4 +11,9 @@ class UIResultEvent extends Event { long size InfoHash infohash int pieceSize + + @Override + public String toString() { + super.toString() + "name:$name size:$size sender:${sender.getHumanReadableName()} pieceSize $pieceSize" + } }