Keep posters and casts between runs
Posters (the downloaded bytes, per size, 30 days, at most 200 MB) and casts (people.json, 7 days, at most 2000) are stored in the user's cache directory (os.UserCacheDir()/arr-tui) and used on the next start before asking the servers. Expired posters are pruned at startup, casts are written shortly after new ones arrive and on exit. Tests turn the cache off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ func (a *App) applyConfig(c *config.Config) {
|
||||
}
|
||||
if old.Trakt.ClientID != c.Trakt.ClientID {
|
||||
a.trakt.Reconfigure(c.Trakt.ClientID)
|
||||
a.people = newPeopleCache()
|
||||
a.people.failed = map[string]time.Time{} // casts do not depend on the client ID; failures may
|
||||
for _, p := range a.panes {
|
||||
p.castKey = "" // ask again the next time a title is shown
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user