only remember full remote collections

pull/53/head
Zlatin Balevsky 2020-11-01 18:05:40 +00:00
parent a2c41652d4
commit d0cfaa7284
No known key found for this signature in database
GPG Key ID: A72832072D525E41
3 changed files with 7 additions and 2 deletions

View File

@ -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})

View File

@ -11,4 +11,5 @@ class UIDownloadCollectionEvent extends Event {
Set<FileCollectionItem> items Set<FileCollectionItem> items
Persona host Persona host
boolean sequential boolean sequential
boolean full
} }

View File

@ -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)