Added DHT status
This commit is contained in:
1 parent
8ee1db9cf8
commit
daea24042c
3 files changed
+35
-3
No files matched your search
@@ -525,6 +525,12 @@ impl MusicDhtService {
|
||||
self.node.db.list_local_items(false).await
|
||||
}
|
||||
|
||||
/// Counts non-expired DHT replica records stored by this node.
|
||||
pub async fn dht_record_count(&self) -> Result<usize> {
|
||||
self.node.ensure_running()?;
|
||||
self.node.db.dht_record_count(now_ms()).await
|
||||
}
|
||||
|
||||
/// Searches only the local database.
|
||||
pub async fn search_local(&self, query: &str) -> Result<Vec<LibraryItem>> {
|
||||
let normalized = normalize_name(query);
|
||||
|
||||
Reference in new issue
Block a user