Details pane: director and cast from Trakt
With a Trakt client ID, the details of a movie or series show the director(s) or creators and up to 8 cast members with their roles below the plot, in every view. The title is found on Trakt by its TMDb/TVDB (else IMDb) id, then its people are read. Casts are cached and, like posters, only loaded once the selection rests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -15,6 +15,7 @@ import (
|
||||
"git.stinnesbeck.com/nils/arr-tui/internal/arr"
|
||||
"git.stinnesbeck.com/nils/arr-tui/internal/radarr"
|
||||
"git.stinnesbeck.com/nils/arr-tui/internal/sonarr"
|
||||
"git.stinnesbeck.com/nils/arr-tui/internal/trakt"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -134,7 +135,7 @@ func episodeEntry(e sonarr.Episode, from, to time.Time, cover coverRef, now time
|
||||
return calEntry{
|
||||
day: day, at: at, title: series, label: tview.Escape(series), sub: sub,
|
||||
have: e.HasFile, monitored: e.Monitored, missing: e.Monitored && !e.HasFile && aired,
|
||||
details: detailText{head: head, plot: tview.Escape(overview)}, cover: cover,
|
||||
details: detailText{head: head, plot: tview.Escape(overview), people: episodeSeriesRef(e)}, cover: cover,
|
||||
episodeID: e.ID,
|
||||
}, true
|
||||
}
|
||||
@@ -467,3 +468,11 @@ func (v *calendarView) search() {
|
||||
})
|
||||
}()
|
||||
}
|
||||
|
||||
// episodeSeriesRef names the series of a calendar episode for its cast.
|
||||
func episodeSeriesRef(e sonarr.Episode) trakt.Ref {
|
||||
if e.Series == nil {
|
||||
return trakt.Ref{}
|
||||
}
|
||||
return seriesRef(*e.Series)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user