mirror of https://github.com/zlatinb/muwire
fix showing of local files in results
parent
ea9db21a18
commit
d954387e41
|
@ -57,6 +57,7 @@ class ResultsSender {
|
||||||
void sendResults(UUID uuid, SharedFile[] results, Destination target, boolean oobInfohash, boolean compressedResults) {
|
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")
|
log.info("Sending $results.length results for uuid $uuid to ${target.toBase32()} oobInfohash : $oobInfohash")
|
||||||
if (target.equals(me.destination)) {
|
if (target.equals(me.destination)) {
|
||||||
|
def uiResultEvents = []
|
||||||
results.each {
|
results.each {
|
||||||
long length = it.getFile().length()
|
long length = it.getFile().length()
|
||||||
int pieceSize = it.getPieceSize()
|
int pieceSize = it.getPieceSize()
|
||||||
|
@ -78,8 +79,9 @@ class ResultsSender {
|
||||||
sources : suggested,
|
sources : suggested,
|
||||||
comment : comment
|
comment : comment
|
||||||
)
|
)
|
||||||
eventBus.publish(uiResultEvent)
|
uiResultEvents << uiResultEvent
|
||||||
}
|
}
|
||||||
|
eventBus.publish(new UIResultBatchEvent(uuid : uuid, results : uiResultEvents))
|
||||||
} else {
|
} else {
|
||||||
executor.execute(new ResultSendJob(uuid : uuid, results : results,
|
executor.execute(new ResultSendJob(uuid : uuid, results : results,
|
||||||
target: target, oobInfohash : oobInfohash, compressedResults : compressedResults))
|
target: target, oobInfohash : oobInfohash, compressedResults : compressedResults))
|
||||||
|
|
Loading…
Reference in New Issue