From 7b21e256f18af9b8e14c69df04c5276b75e5a008 Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Fri, 26 Jul 2013 20:32:13 -0300 Subject: [PATCH] anidb: Add AnimeCount() call --- titlecache.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/titlecache.go b/titlecache.go index d5356d8..a77ba52 100644 --- a/titlecache.go +++ b/titlecache.go @@ -34,6 +34,11 @@ func TitlesUpToDate() (ok bool) { return time.Now().Sub(titlesDB.UpdateTime) < 24*time.Hour } +// Returns the number of anime in the titles database +func AnimeCount() int { + return len(titlesDB.AnimeMap) +} + // Downloads a new anime-titles database if the database is outdated. // // Saves the database as anime-titles.dat.gz in the cache dir. -- 2.44.0