mirror of https://github.com/zlatinb/muwire
pass collections flag for hash searches
parent
a9ea0de16c
commit
3518db63cc
|
@ -150,6 +150,7 @@ abstract class Connection implements Closeable {
|
||||||
query.oobInfohash = e.searchEvent.oobInfohash
|
query.oobInfohash = e.searchEvent.oobInfohash
|
||||||
query.searchComments = e.searchEvent.searchComments
|
query.searchComments = e.searchEvent.searchComments
|
||||||
query.compressedResults = e.searchEvent.compressedResults
|
query.compressedResults = e.searchEvent.compressedResults
|
||||||
|
query.collections = e.searchEvent.collections
|
||||||
if (e.searchEvent.searchHash != null)
|
if (e.searchEvent.searchHash != null)
|
||||||
query.infohash = Base64.encode(e.searchEvent.searchHash)
|
query.infohash = Base64.encode(e.searchEvent.searchHash)
|
||||||
query.replyTo = e.replyTo.toBase64()
|
query.replyTo = e.replyTo.toBase64()
|
||||||
|
@ -257,6 +258,9 @@ abstract class Connection implements Closeable {
|
||||||
boolean compressedResults = false
|
boolean compressedResults = false
|
||||||
if (search.compressedResults != null)
|
if (search.compressedResults != null)
|
||||||
compressedResults = search.compressedResults
|
compressedResults = search.compressedResults
|
||||||
|
boolean collections
|
||||||
|
if (search.collections != null)
|
||||||
|
collections = search.collections
|
||||||
byte[] sig = null
|
byte[] sig = null
|
||||||
if (search.sig != null) {
|
if (search.sig != null) {
|
||||||
sig = Base64.decode(search.sig)
|
sig = Base64.decode(search.sig)
|
||||||
|
@ -310,6 +314,7 @@ abstract class Connection implements Closeable {
|
||||||
oobInfohash : oob,
|
oobInfohash : oob,
|
||||||
searchComments : searchComments,
|
searchComments : searchComments,
|
||||||
compressedResults : compressedResults,
|
compressedResults : compressedResults,
|
||||||
|
collections : collections,
|
||||||
persona : originator)
|
persona : originator)
|
||||||
QueryEvent event = new QueryEvent ( searchEvent : searchEvent,
|
QueryEvent event = new QueryEvent ( searchEvent : searchEvent,
|
||||||
replyTo : replyTo,
|
replyTo : replyTo,
|
||||||
|
|
|
@ -13,6 +13,7 @@ class SearchEvent extends Event {
|
||||||
boolean searchComments
|
boolean searchComments
|
||||||
boolean compressedResults
|
boolean compressedResults
|
||||||
Persona persona
|
Persona persona
|
||||||
|
boolean collections
|
||||||
|
|
||||||
String toString() {
|
String toString() {
|
||||||
def infoHash = null
|
def infoHash = null
|
||||||
|
|
|
@ -118,7 +118,8 @@ class MainFrameController {
|
||||||
def searchEvent
|
def searchEvent
|
||||||
byte [] payload
|
byte [] payload
|
||||||
if (hashSearch) {
|
if (hashSearch) {
|
||||||
searchEvent = new SearchEvent(searchHash : root, uuid : uuid, oobInfohash: true, compressedResults : true, persona : core.me)
|
searchEvent = new SearchEvent(searchHash : root, uuid : uuid, oobInfohash: true,
|
||||||
|
compressedResults : true, persona : core.me, collections : true)
|
||||||
payload = root
|
payload = root
|
||||||
} else {
|
} else {
|
||||||
def nonEmpty = SplitPattern.termify(search)
|
def nonEmpty = SplitPattern.termify(search)
|
||||||
|
|
Loading…
Reference in New Issue