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) {
|
synchronized void onUIDownloadCollectionEvent(UIDownloadCollectionEvent e) {
|
||||||
|
if (!e.full)
|
||||||
|
return
|
||||||
rootToCollectionRemote.put(e.infoHash, e.collection)
|
rootToCollectionRemote.put(e.infoHash, e.collection)
|
||||||
Set<InfoHash> infoHashes = new HashSet<>()
|
Set<InfoHash> infoHashes = new HashSet<>()
|
||||||
e.collection.files.collect(infoHashes, {it.infoHash})
|
e.collection.files.collect(infoHashes, {it.infoHash})
|
||||||
|
|
|
@ -11,4 +11,5 @@ class UIDownloadCollectionEvent extends Event {
|
||||||
Set<FileCollectionItem> items
|
Set<FileCollectionItem> items
|
||||||
Persona host
|
Persona host
|
||||||
boolean sequential
|
boolean sequential
|
||||||
|
boolean full
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,8 @@ class CollectionTabController {
|
||||||
collection : collection,
|
collection : collection,
|
||||||
items : collection.getFiles(),
|
items : collection.getFiles(),
|
||||||
host : model.host,
|
host : model.host,
|
||||||
infoHash : CollectionManager.hash(collection)
|
infoHash : CollectionManager.hash(collection),
|
||||||
|
full : true
|
||||||
)
|
)
|
||||||
model.eventBus.publish(e)
|
model.eventBus.publish(e)
|
||||||
|
|
||||||
|
@ -57,7 +58,8 @@ class CollectionTabController {
|
||||||
collection : collection,
|
collection : collection,
|
||||||
items : new HashSet<>(items),
|
items : new HashSet<>(items),
|
||||||
host : model.host,
|
host : model.host,
|
||||||
infoHash : CollectionManager.hash(collection)
|
infoHash : CollectionManager.hash(collection),
|
||||||
|
full : false
|
||||||
)
|
)
|
||||||
model.eventBus.publish(e)
|
model.eventBus.publish(e)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue