utility method to check if an infohash is shared

This commit is contained in:
Zlatin Balevsky
2020-03-10 11:50:09 +00:00
parent b9333913c6
commit a07f01b641

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