mirror of https://github.com/zlatinb/muwire
only remember full remote collections
parent
a2c41652d4
commit
d0cfaa7284
|
@ -198,6 +198,8 @@ class CollectionManager {
|
|||
}
|
||||
|
||||
synchronized void onUIDownloadCollectionEvent(UIDownloadCollectionEvent e) {
|
||||
if (!e.full)
|
||||
return
|
||||
rootToCollectionRemote.put(e.infoHash, e.collection)
|
||||
Set<InfoHash> infoHashes = new HashSet<>()
|
||||
e.collection.files.collect(infoHashes, {it.infoHash})
|
||||
|
|
|
@ -11,4 +11,5 @@ class UIDownloadCollectionEvent extends Event {
|
|||
Set<FileCollectionItem> items
|
||||
Persona host
|
||||
boolean sequential
|
||||
boolean full
|
||||
}
|
||||
|
|
|
@ -36,7 +36,8 @@ class CollectionTabController {
|
|||
collection : collection,
|
||||
items : collection.getFiles(),
|
||||
host : model.host,
|
||||
infoHash : CollectionManager.hash(collection)
|
||||
infoHash : CollectionManager.hash(collection),
|
||||
full : true
|
||||
)
|
||||
model.eventBus.publish(e)
|
||||
|
||||
|
@ -57,7 +58,8 @@ class CollectionTabController {
|
|||
collection : collection,
|
||||
items : new HashSet<>(items),
|
||||
host : model.host,
|
||||
infoHash : CollectionManager.hash(collection)
|
||||
infoHash : CollectionManager.hash(collection),
|
||||
full : false
|
||||
)
|
||||
model.eventBus.publish(e)
|
||||
|
||||
|
|
Loading…
Reference in New Issue