cleanup torrent cache

This commit is contained in:
Mukhtar Akere
2025-06-14 16:55:45 +01:00
parent a539aa53bd
commit 22280f15cf
5 changed files with 83 additions and 57 deletions

View File

@@ -552,6 +552,10 @@ func (c *Cache) GetTorrents() map[string]CachedTorrent {
return c.torrents.getAll()
}
func (c *Cache) TotalTorrents() int {
return c.torrents.getAllCount()
}
func (c *Cache) GetTorrentByName(name string) *CachedTorrent {
if torrent, ok := c.torrents.getByName(name); ok {
return &torrent