view_models

package
v0.6.72 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelViewModel added in v0.2.61

type ChannelViewModel struct {
	ChannelId             string
	ChannelTitle          string
	ChannelDescription    string
	ChannelBadgeCount     int
	Videos                []*VideoViewModel
	PlaylistsOrder        []string
	Playlists             map[string]string
	ChannelAutoRefresh    bool
	ChannelAutoDownload   bool
	ChannelDownloadPolicy data.DownloadPolicy
	AllDownloadPolicies   []data.DownloadPolicy
	ChannelExpand         bool
}

func GetChannelViewModel added in v0.2.61

func GetChannelViewModel(channelId string, rdx redux.Readable) *ChannelViewModel

type ListViewModel added in v0.2.66

type ListViewModel struct {
	Continue       []*VideoViewModel
	Videos         []*VideoViewModel
	Downloads      []*VideoViewModel
	ChannelsOrder  []string
	Channels       map[string][]*ChannelViewModel
	PlaylistsOrder []string
	Playlists      map[string][]*PlaylistViewModel
	Favorites      []*VideoViewModel
	HasHistory     bool
}

func GetListViewModel added in v0.2.66

func GetListViewModel(rdx redux.Readable) (*ListViewModel, error)

type PlaylistViewModel

type PlaylistViewModel struct {
	PlaylistId             string
	PlaylistTitle          string
	PlaylistChannelTitle   string
	PlaylistBadgeCount     int
	PlaylistAutoRefresh    bool
	PlaylistAutoDownload   bool
	PlaylistDownloadPolicy data.DownloadPolicy
	AllDownloadPolicies    []data.DownloadPolicy
	PlaylistExpand         bool
	Videos                 []*VideoViewModel
}

func GetPlaylistViewModel added in v0.2.61

func GetPlaylistViewModel(playlistId string, rdx redux.Readable) *PlaylistViewModel

type VideoErrorViewModel added in v0.2.77

type VideoErrorViewModel struct {
	VideoId    string
	VideoTitle string
	Error      string
}

func GetVideoErrorViewModel added in v0.2.77

func GetVideoErrorViewModel(videoId, error string, rdx redux.Readable) *VideoErrorViewModel

type VideoManagementViewModel added in v0.2.73

type VideoManagementViewModel struct {
	VideoId         string
	VideoTitle      string
	CurrentTime     string
	Favorite        bool
	Progress        bool
	Ended           bool
	EndedReason     data.VideoEndedReason
	AllEndedReasons []data.VideoEndedReason
	DownloadQueued  bool
	ForcedDownload  bool
}

func GetVideoManagementModel added in v0.2.73

func GetVideoManagementModel(videoId string, rdx redux.Readable) *VideoManagementViewModel

type VideoOptions

type VideoOptions int
const (
	ShowPoster VideoOptions = iota
	ShowPublishedDate
	ShowEndedDate
	ShowProgress
	ShowDuration
	ShowOwnerChannel
	ShowViewCount
)

type VideoViewModel

type VideoViewModel struct {
	VideoId            string
	VideoUrl           string
	VideoTitle         string
	Favorite           bool
	ShowPoster         bool
	ShowPublishedDate  bool
	PublishedDate      string
	DownloadedDate     string
	ShowEndedTime      bool
	EndedTime          string
	EndedReason        data.VideoEndedReason
	ShowDuration       bool
	Duration           string
	ShowProgress       bool
	CurrentTimeSeconds string
	DurationSeconds    string
	ShowOwnerChannel   bool
	OwnerChannel       string
	ShowViewCount      bool
	ViewCount          string
}

func GetVideoViewModel

func GetVideoViewModel(videoId string, rdx redux.Readable, options ...VideoOptions) *VideoViewModel

type WatchViewModel added in v0.2.73

type WatchViewModel struct {
	VideoId              string
	VideoUrl             string
	CurrentTime          string
	EndedTime            string
	EndedReason          data.VideoEndedReason
	VideoPoster          string
	LocalPlayback        bool
	CurrentTimeSeconds   string
	DurationSeconds      string
	VideoTitle           string
	VideoDescription     string
	VideoPropertiesOrder []string
	VideoProperties      map[string]string
	ChannelViewModel     *ChannelViewModel
	PlaylistViewModel    *PlaylistViewModel
}

func GetWatchViewModel added in v0.2.73

func GetWatchViewModel(videoId, currentTime string, rdx redux.Writeable) (*WatchViewModel, error)

Jump to

Keyboard shortcuts

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