Documentation
¶
Overview ¶
Package view holds shared HTML view models for Outtake pages and widgets.
Index ¶
Constants ¶
const ( // ClipStatusPending is a queued clip that has not started encoding. ClipStatusPending = "pending" // ClipStatusProcessing is a clip that is currently encoding. ClipStatusProcessing = "processing" // ClipStatusCompleted is a clip that finished encoding. ClipStatusCompleted = "completed" // ClipStatusFailed is a clip that failed to encode. ClipStatusFailed = "failed" // ClipStatusCancelled is a clip stopped by the user. // The persisted job status literal is "canceled". ClipStatusCancelled = "canceled" )
Variables ¶
This section is empty.
Functions ¶
func ClipTypeLabel ¶
ClipTypeLabel is the user-facing name for a clip type.
Types ¶
type AudioTrackOption ¶
AudioTrackOption is a probed audio stream in an audio select.
type ClipItem ¶
type ClipItem struct {
ID string
Name string
MediaID string
MediaTitle string
ClipType string
Status string
Progress int
CreatedAt string
StartTime float64
Duration float64
Quality string
ProfileName string
Profiles []ClipProfileOption
FileExists bool
AudioIndex int
AudioTracks []AudioTrackOption
CropBlackBars bool
WebSafeColor bool
Width int
FPS int
MaxDur int
Error string
}
ClipItem is one clip card on the clips list and media item pages.
func (*ClipItem) CanPlay ¶
CanPlay reports whether a completed clip file is available for preview.
Returns:
- playable: True when status is completed and the file exists.
func (*ClipItem) DisplayName ¶
DisplayName returns the clip name, or the media title when the name is empty.
Returns:
- name: The label shown on clip cards.
func (*ClipItem) EndTime ¶
EndTime is the clip end as start plus duration.
Returns:
- end: StartTime + Duration in seconds.
func (*ClipItem) GIFFPS ¶
GIFFPS is the GIF frame rate, or the New export default when unset.
Returns:
- fps: Stored fps, or 10 when FPS is 0.
type ClipProfileOption ¶
ClipProfileOption is a named encode profile in a quality select.
type LetterIndex ¶
LetterIndex is one first-character jump target on a library section.
type LibraryItem ¶
LibraryItem is a Plex library in the sidebar and media browse grid.
type MediaItem ¶
type MediaItem struct {
ID string
Title string
Type string
Duration float64
ThumbPath string
Browsable bool
BrowseURL string
Year int
Index int
ParentIndex int
ShowTitle string
EpisodeLabel string
TitleSort string
AddedAt int64
}
MediaItem is one title or container in the media library grid.
type MediaProps ¶
type MediaProps struct {
Items []MediaItem
Libraries []LibraryItem
Crumbs []Crumb
Letters []LetterIndex
Query string
LibraryID string
ParentID string
ParentTitle string
UpID string
UpTitle string
Sort string
Letter string
Start int
Total int
PageSize int
HasServer bool
}
MediaProps is the media library page and its HTMX results fragment.