fix showing of local files in results

pull/24/head
Zlatin Balevsky 2019-10-20 11:59:48 +01:00
parent ea9db21a18
commit d954387e41
1 changed files with 3 additions and 1 deletions

View File

@ -57,6 +57,7 @@ class ResultsSender {
void sendResults(UUID uuid, SharedFile[] results, Destination target, boolean oobInfohash, boolean compressedResults) {
log.info("Sending $results.length results for uuid $uuid to ${target.toBase32()} oobInfohash : $oobInfohash")
if (target.equals(me.destination)) {
def uiResultEvents = []
results.each {
long length = it.getFile().length()
int pieceSize = it.getPieceSize()
@ -78,8 +79,9 @@ class ResultsSender {
sources : suggested,
comment : comment
)
eventBus.publish(uiResultEvent)
uiResultEvents << uiResultEvent
}
eventBus.publish(new UIResultBatchEvent(uuid : uuid, results : uiResultEvents))
} else {
executor.execute(new ResultSendJob(uuid : uuid, results : results,
target: target, oobInfohash : oobInfohash, compressedResults : compressedResults))