view

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package view is the TakeoutFM API viewmodel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artist

type Artist struct {
	Artist     model.Artist
	Image      string
	Background string
	Releases   []model.Release
	Similar    []model.Artist
	Deep       TrackList `json:"-"`
	Popular    TrackList `json:"-"`
	Radio      TrackList `json:"-"`
	Shuffle    TrackList `json:"-"`
	Singles    TrackList `json:"-"`
	Tracks     TrackList `json:"-"`
}

type Artists

type Artists struct {
	Artists []model.Artist
}

type Episode

type Episode struct {
	Episode model.Episode
}

type Genre

type Genre struct {
	Name   string
	Movies []model.Movie
}

type Home

type Home struct {
	AddedReleases   []model.Release
	NewReleases     []model.Release
	AddedMovies     []model.Movie
	NewMovies       []model.Movie
	RecommendMovies []model.Recommend
	NewEpisodes     []model.Episode
	NewSeries       []model.Series
	AddedTVEpisodes []model.TVEpisode
}

type Index

type Index struct {
	Time         int64
	HasMusic     bool
	HasMovies    bool
	HasShows     bool
	HasPodcasts  bool
	HasPlaylists bool
}

type Keyword

type Keyword struct {
	Name   string
	Movies []model.Movie
}

type Movie

type Movie struct {
	Movie      model.Movie
	Location   string
	Collection model.Collection
	Other      []model.Movie
	Cast       []model.Cast
	Crew       []model.Crew
	Starring   []model.Person
	Directing  []model.Person
	Writing    []model.Person
	Genres     []string
	Keywords   []string
	Vote       int
	VoteCount  int
	Trailers   []model.Trailer
}

type MovieCredits added in v0.24.0

type MovieCredits struct {
	Starring  []model.Movie
	Directing []model.Movie
	Writing   []model.Movie
}

type Movies

type Movies struct {
	Movies []model.Movie
}

type Offset

type Offset struct {
	Offset model.Offset
}

type Playlist added in v0.17.0

type Playlist struct {
	ID         int
	Name       string
	TrackCount int
}

func NewPlaylist added in v0.17.0

func NewPlaylist(p model.Playlist) *Playlist

type Playlists added in v0.17.0

type Playlists struct {
	Playlists []Playlist
}

type Podcasts

type Podcasts struct {
	Series []model.Series
}
type Popular struct {
	Artist  model.Artist
	Popular []model.Track
}

type Profile

type Profile struct {
	Person model.Person
	Movies MovieCredits
	Shows  TVCredits
}

type Progress

type Progress struct {
	Offsets []model.Offset
}

type Radio

type Radio struct {
	Artist  []model.Station
	Genre   []model.Station
	Similar []model.Station
	Period  []model.Station
	Series  []model.Station
	Other   []model.Station
	Stream  []model.Station
}

type Release

type Release struct {
	Artist  model.Artist
	Release model.Release
	Image   string
	Tracks  []model.Track
	Singles []model.Track
	Popular []model.Track
	Similar []model.Release
}
type Search struct {
	Artists    []model.Artist
	Releases   []model.Release
	Tracks     []model.Track
	Stations   []model.Station
	Movies     []model.Movie
	Series     []model.Series
	Episodes   []model.Episode
	TVEpisodes []model.TVEpisode
	Query      string
	Hits       int
}

type Series

type Series struct {
	Series   model.Series
	Episodes []model.Episode
}

type Singles

type Singles struct {
	Artist  model.Artist
	Singles []model.Track
}

type TVCredits added in v0.24.0

type TVCredits struct {
	Starring  []model.TVSeries
	Directing []model.TVSeries
	Writing   []model.TVSeries
}

type TVEpisode added in v0.24.0

type TVEpisode struct {
	Series    model.TVSeries
	Episode   model.TVEpisode
	Location  string
	Cast      []model.TVEpisodeCast
	Crew      []model.TVEpisodeCrew
	Directing []model.Person
	Starring  []model.Person
	Writing   []model.Person
	Vote      int
	VoteCount int
}

type TVSeries added in v0.24.0

type TVSeries struct {
	Series    model.TVSeries
	Episodes  []model.TVEpisode
	Genres    []string
	Keywords  []string
	Cast      []model.TVSeriesCast
	Crew      []model.TVSeriesCrew
	Directing []model.Person
	Starring  []model.Person
	Writing   []model.Person
	Vote      int
	VoteCount int
}

type TVShows added in v0.24.0

type TVShows struct {
	Series []model.TVSeries
}

type TrackChart added in v0.23.0

type TrackChart struct {
	Start       time.Time
	ListenCount int
	Label       string
	Counts      []int
}

type TrackCharts added in v0.23.0

type TrackCharts struct {
	Labels []string
	Charts []TrackChart
}

func (*TrackCharts) AddCounts added in v0.23.0

func (c *TrackCharts) AddCounts(label string, counts *TrackCounts)

type TrackCounts added in v0.23.0

type TrackCounts struct {
	Counts []model.ActivityCount
}

func (*TrackCounts) Total added in v0.23.0

func (c *TrackCounts) Total() int

func (*TrackCounts) Values added in v0.23.0

func (c *TrackCounts) Values() []int

type TrackHistory added in v0.21.0

type TrackHistory struct {
	Tracks []model.ActivityTrack
}

type TrackList

type TrackList struct {
	Title  string
	Tracks TracksFunc
}

type TrackStats added in v0.21.0

type TrackStats struct {
	Interval     string
	Artists      []model.ActivityArtist
	Releases     []model.ActivityRelease
	Tracks       []model.ActivityTrack
	ArtistCount  int
	ReleaseCount int
	TrackCount   int
	ListenCount  int
}

type TracksFunc

type TracksFunc func() []model.Track

type WantList

type WantList struct {
	Artist   model.Artist
	Releases []model.Release
}

type Watch

type Watch struct {
	Movie    model.Movie
	Location string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL