dashboard

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const TrigDashboard common.TriggerName = "Initiating State Collection for Dashboard."

Variables

View Source
var ErrInvalidResponse = fmt.Errorf("invalid response")

Functions

This section is empty.

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}

Action contains the exported methods for this package.

func New

func New(config *common.Config, plex *plexcron.Action) *Action

New configures the library.

func (*Action) Create

func (a *Action) Create()

Create initializes the library.

func (*Action) Send

func (a *Action) Send(event website.EventType)

Send the current states for the dashboard to the website.

type Cmd

type Cmd struct {
	*common.Config
	PlexCron *plexcron.Action
}

type RtorrentTorrent

type RtorrentTorrent struct {
	Name      string
	Message   string
	Active    bool // inactive/active
	Size      int  // Total Size in bytes
	UpRate    int
	DownRate  int
	Completed int // Bytes Completed.
	Started   time.Time
	Finished  time.Time
}

type Sortable

type Sortable struct {
	Name    string    `json:"name"`
	Sub     string    `json:"subName,omitempty"`
	Date    time.Time `json:"date"`
	Season  int       `json:"season,omitempty"`
	Episode int       `json:"episode,omitempty"`
	// contains filtered or unexported fields
}

Sortable holds data about any Starr item. Kind of a generic data store.

type SortableList

type SortableList []*Sortable

SortableList allows sorting a list.

func (*SortableList) Shrink

func (s *SortableList) Shrink(size int)

Shrink a sortable list.

type State

type State struct {
	// Shared
	Error    string        `json:"error"`
	Instance int           `json:"instance"`
	Missing  int64         `json:"missing,omitempty"`
	Size     int64         `json:"size"`
	Percent  float64       `json:"percent,omitempty"`
	Upcoming int64         `json:"upcoming,omitempty"`
	Next     SortableList  `json:"next,omitempty"`
	Latest   SortableList  `json:"latest,omitempty"`
	OnDisk   int64         `json:"onDisk,omitempty"`
	Elapsed  cnfg.Duration `json:"elapsed"` // How long it took.
	Name     string        `json:"name"`
	// Radarr
	Movies int64 `json:"movies,omitempty"`
	// Sonarr
	Shows    int64 `json:"shows,omitempty"`
	Episodes int64 `json:"episodes,omitempty"`
	// Readarr
	Authors  int   `json:"authors,omitempty"`
	Books    int64 `json:"books,omitempty"`
	Editions int   `json:"editions,omitempty"`
	// Lidarr
	Artists int   `json:"artists,omitempty"`
	Albums  int64 `json:"albums,omitempty"`
	Tracks  int64 `json:"tracks,omitempty"`
	// Downloader
	Downloads   int   `json:"downloads,omitempty"`
	Uploaded    int64 `json:"uploaded,omitempty"`
	Incomplete  int64 `json:"incomplete,omitempty"`
	Downloaded  int64 `json:"downloaded,omitempty"`
	Uploading   int64 `json:"uploading,omitempty"`
	Downloading int64 `json:"downloading,omitempty"`
	Seeding     int64 `json:"seeding,omitempty"`
	Paused      int64 `json:"paused,omitempty"`
	Errors      int64 `json:"errors,omitempty"`
	Month       int64 `json:"month,omitempty"`
	Week        int64 `json:"week,omitempty"`
	Day         int64 `json:"day,omitempty"`
}

State is partially filled out once for each app instance.

type States

type States struct {
	Lidarr   []*State `json:"lidarr"`
	Radarr   []*State `json:"radarr"`
	Readarr  []*State `json:"readarr"`
	Sonarr   []*State `json:"sonarr"`
	NZBGet   []*State `json:"nzbget"`
	RTorrent []*State `json:"rtorrent"`
	Qbit     []*State `json:"qbit"`
	Deluge   []*State `json:"deluge"`
	SabNZB   []*State `json:"sabnzbd"`
	Xmission []*State `json:"transmission"`
	Plex     any      `json:"plexSessions"`
}

States is our compiled states for the dashboard.

Jump to

Keyboard shortcuts

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