utility method to check if an infohash is shared

pull/42/head
Zlatin Balevsky 2020-03-10 11:50:09 +00:00
parent b9333913c6
commit a07f01b641
1 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,10 @@ class FileManager {
Set<SharedFile> getSharedFiles(byte []root) {
return rootToFiles.get(new InfoHash(root))
}
boolean isShared(InfoHash infoHash) {
rootToFiles.containsKey(infoHash)
}
void onSearchEvent(SearchEvent e) {
// hash takes precedence