Trending, most watched and anticipated movies and series from Trakt
With an empty search box, Movies and Series show one of Trakt's public lists: trending now, most watched this week, anticipated, popular, and for movies the US box office. [ ] switch lists, r reloads. Each entry is looked up in Radarr (tmdb:) or Sonarr (tvdb:), so it behaves like a search result: details, poster, tick when in the library, add, releases. Needs a Trakt client ID: new optional trakt.client_id setting (Config view section "Trakt", ARR_TUI_TRAKT_CLIENT_ID), masked like the API keys and checked by Test. ARR_TUI_TRAKT_URL points at another server for development. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -233,3 +233,15 @@ func TestCreate(t *testing.T) {
|
||||
t.Errorf("the new file must load cleanly: %v %v", warnings, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTraktClientID(t *testing.T) {
|
||||
cfg, err := Parse([]byte(`{"trakt":{"client_id":" abc "}}`))
|
||||
if err != nil || cfg.Trakt.ClientID != "abc" {
|
||||
t.Fatalf("client id %q, %v", cfg.Trakt.ClientID, err)
|
||||
}
|
||||
t.Setenv("ARR_TUI_TRAKT_CLIENT_ID", "from-env")
|
||||
cfg, _ = Parse([]byte(`{}`))
|
||||
if cfg.Trakt.ClientID != "from-env" || Overrides(os.Getenv)["trakt.client_id"] != "ARR_TUI_TRAKT_CLIENT_ID" {
|
||||
t.Errorf("env override: %q", cfg.Trakt.ClientID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user