view

package
v0.21.6 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: AGPL-3.0 Imports: 1 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
	CoverSmall CoverFunc `json:"-"`
	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
	CoverSmall CoverFunc `json:"-"`
}

type BackdropFunc

type BackdropFunc func(model.Movie) string

type CoverFunc

type CoverFunc func(interface{}) string

type Episode

type Episode struct {
	Episode      model.Episode
	EpisodeImage EpisodeImageFunc `json:"-"`
}

type EpisodeImageFunc

type EpisodeImageFunc func(model.Episode) string

type Genre

type Genre struct {
	Name        string
	Movies      []model.Movie
	PosterSmall PosterFunc   `json:"-"`
	Backdrop    BackdropFunc `json:"-"`
}

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
	CoverSmall      CoverFunc        `json:"-"`
	PosterSmall     PosterFunc       `json:"-"`
	SeriesImage     SeriesImageFunc  `json:"-"`
	EpisodeImage    EpisodeImageFunc `json:"-"`
}

type Index

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

type Keyword

type Keyword struct {
	Name        string
	Movies      []model.Movie
	PosterSmall PosterFunc   `json:"-"`
	Backdrop    BackdropFunc `json:"-"`
}

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
	Poster      PosterFunc   `json:"-"`
	PosterSmall PosterFunc   `json:"-"`
	Backdrop    BackdropFunc `json:"-"`
	Profile     ProfileFunc  `json:"-"`
}

type Movies

type Movies struct {
	Movies      []model.Movie
	PosterSmall PosterFunc   `json:"-"`
	Backdrop    BackdropFunc `json:"-"`
}

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
	SeriesImage SeriesImageFunc `json:"-"`
}
type Popular struct {
	Artist     model.Artist
	Popular    []model.Track
	CoverSmall CoverFunc `json:"-"`
}

type PosterFunc

type PosterFunc func(model.Movie) string

type Profile

type Profile struct {
	Person      model.Person
	Starring    []model.Movie
	Directing   []model.Movie
	Writing     []model.Movie
	PosterSmall PosterFunc   `json:"-"`
	Backdrop    BackdropFunc `json:"-"`
	Profile     ProfileFunc  `json:"-"`
}

type ProfileFunc

type ProfileFunc func(model.Person) string

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
	CoverSmall CoverFunc `json:"-"`
}

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
	CoverSmall CoverFunc `json:"-"`
}
type Search struct {
	Artists     []model.Artist
	Releases    []model.Release
	Tracks      []model.Track
	Stations    []model.Station
	Movies      []model.Movie
	Series      []model.Series
	Episodes    []model.Episode
	Query       string
	Hits        int
	CoverSmall  CoverFunc  `json:"-"`
	PosterSmall PosterFunc `json:"-"`
}

type Series

type Series struct {
	Series       model.Series
	Episodes     []model.Episode
	SeriesImage  SeriesImageFunc  `json:"-"`
	EpisodeImage EpisodeImageFunc `json:"-"`
}

type SeriesImageFunc

type SeriesImageFunc func(model.Series) string

type Singles

type Singles struct {
	Artist     model.Artist
	Singles    []model.Track
	CoverSmall CoverFunc `json:"-"`
}

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 {
	Artists    []model.ActivityArtist
	Releases   []model.ActivityRelease
	Tracks     []model.ActivityTrack
	CoverSmall CoverFunc `json:"-"`
}

type TracksFunc

type TracksFunc func() []model.Track

type WantList

type WantList struct {
	Artist     model.Artist
	Releases   []model.Release
	CoverSmall CoverFunc `json:"-"`
}

type Watch

type Watch struct {
	Movie       model.Movie
	Location    string
	PosterSmall PosterFunc   `json:"-"`
	Backdrop    BackdropFunc `json:"-"`
}

Jump to

Keyboard shortcuts

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