Documentation
¶
Index ¶
- Constants
- type AuthConfig
- type Changes
- type LoginRequest
- type MediaContainer
- type MediaRequest
- type PlexMedia
- type PlexPart
- type PlexPlayer
- type PlexResponse
- type PlexSession
- type PlexSessionInfo
- type PlexSessionsResponse
- type PlexStream
- type PlexTranscodeSession
- type PlexUser
- type ProwlarrIndexer
- type ProwlarrStats
- type ProwlarrStatsResponse
- type QueueRecord
- type RadarrCustomFormat
- type RadarrMovie
- type RadarrMovieResponse
- type RadarrQueueDeleteOptions
- type RadarrQueueRecord
- type RadarrQueueResponse
- type RadarrStatusMessage
- type Rating
- type Ratings
- type RegisterRequest
- type RequestsResponse
- type RequestsStats
- type Season
- type SeriesRatings
- type SeriesStatistics
- type ServiceConfigResponse
- type ServiceHealth
- type SessionData
- type SonarrQueueDeleteOptions
- type SonarrQueueResponse
- type SonarrSeason
- type SonarrSeriesResponse
- type SonarrStatsResponse
- type StatusMessage
- type StatusResponse
- type UpdateResponse
- type User
- type WebhookProxyRequest
Constants ¶
const (
PlexSessionCacheDuration = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
AuthConfig holds the OIDC configuration
type LoginRequest ¶
type LoginRequest struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
}
LoginRequest represents the login credentials
type MediaContainer ¶
type MediaRequest ¶
type MediaRequest struct {
ID int `json:"id"`
Status int `json:"status"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Media struct {
ID int `json:"id"`
TmdbID int `json:"tmdbId"`
TvdbID int `json:"tvdbId"`
Status int `json:"status"`
Requests []string `json:"requests"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
MediaType string `json:"mediaType"`
ServiceUrl string `json:"serviceUrl"`
Title string `json:"title,omitempty"`
ExternalServiceID int `json:"externalServiceId,omitempty"`
} `json:"media"`
RequestedBy struct {
ID int `json:"id"`
Email string `json:"email"`
Username string `json:"username"`
PlexToken string `json:"plexToken"`
PlexUsername string `json:"plexUsername"`
UserType int `json:"userType"`
Permissions int `json:"permissions"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
RequestCount int `json:"requestCount"`
} `json:"requestedBy"`
ModifiedBy struct {
ID int `json:"id"`
Email string `json:"email"`
Username string `json:"username"`
PlexToken string `json:"plexToken"`
PlexUsername string `json:"plexUsername"`
UserType int `json:"userType"`
Permissions int `json:"permissions"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
RequestCount int `json:"requestCount"`
} `json:"modifiedBy"`
Is4k bool `json:"is4k"`
ServerID int `json:"serverId"`
ProfileID int `json:"profileId"`
RootFolder string `json:"rootFolder"`
}
type PlexPart ¶
type PlexPart struct {
Container string `json:"container"`
Duration int `json:"duration"`
File string `json:"file"`
HasThumbnail string `json:"hasThumbnail"`
ID string `json:"id"`
Key string `json:"key"`
Size int64 `json:"size"`
Decision string `json:"decision"`
Selected bool `json:"selected"`
Stream []PlexStream `json:"Stream"`
}
type PlexPlayer ¶
type PlexPlayer struct {
Address string `json:"address"`
Device string `json:"device"`
MachineIdentifier string `json:"machineIdentifier"`
Model string `json:"model"`
Platform string `json:"platform"`
PlatformVersion string `json:"platformVersion"`
Product string `json:"product"`
Profile string `json:"profile"`
State string `json:"state"`
RemotePublicAddress string `json:"remotePublicAddress"`
Title string `json:"title"`
Vendor string `json:"vendor"`
Version string `json:"version"`
}
type PlexResponse ¶
type PlexResponse struct {
MediaContainer MediaContainer `json:"MediaContainer"`
}
type PlexSession ¶
type PlexSession struct {
AddedAt int64 `json:"addedAt"`
Art string `json:"art"`
Duration int `json:"duration"`
GrandparentArt string `json:"grandparentArt"`
GrandparentGuid string `json:"grandparentGuid"`
GrandparentKey string `json:"grandparentKey"`
GrandparentRatingKey string `json:"grandparentRatingKey"`
GrandparentThumb string `json:"grandparentThumb"`
GrandparentTitle string `json:"grandparentTitle"`
Guid string `json:"guid"`
Index int `json:"index"`
Key string `json:"key"`
LibrarySectionID string `json:"librarySectionID"`
LibrarySectionKey string `json:"librarySectionKey"`
LibrarySectionTitle string `json:"librarySectionTitle"`
MusicAnalysisVersion string `json:"musicAnalysisVersion"`
ParentGuid string `json:"parentGuid"`
ParentIndex int `json:"parentIndex"`
ParentKey string `json:"parentKey"`
ParentRatingKey string `json:"parentRatingKey"`
ParentStudio string `json:"parentStudio"`
ParentThumb string `json:"parentThumb"`
ParentTitle string `json:"parentTitle"`
ParentYear int `json:"parentYear"`
RatingCount int `json:"ratingCount"`
RatingKey string `json:"ratingKey"`
SessionKey string `json:"sessionKey"`
Thumb string `json:"thumb"`
Title string `json:"title"`
TitleSort string `json:"titleSort"`
Type string `json:"type"`
UpdatedAt int64 `json:"updatedAt"`
ViewOffset int `json:"viewOffset"`
Media []PlexMedia `json:"Media"`
User *PlexUser `json:"User,omitempty"`
Player *PlexPlayer `json:"Player,omitempty"`
Session *PlexSessionInfo `json:"Session,omitempty"`
TranscodeSession *PlexTranscodeSession `json:"TranscodeSession,omitempty"`
}
type PlexSessionInfo ¶
type PlexSessionsResponse ¶
type PlexSessionsResponse struct {
MediaContainer struct {
Size int `json:"size"`
Metadata []PlexSession `json:"Metadata"`
} `json:"MediaContainer"`
}
type PlexStream ¶
type PlexStream struct {
AlbumGain string `json:"albumGain"`
AlbumPeak string `json:"albumPeak"`
AlbumRange string `json:"albumRange"`
AudioChannelLayout string `json:"audioChannelLayout"`
BitDepth int `json:"bitDepth"`
Bitrate int `json:"bitrate"`
Channels int `json:"channels"`
Codec string `json:"codec"`
DisplayTitle string `json:"displayTitle"`
ExtendedDisplayTitle string `json:"extendedDisplayTitle"`
Gain string `json:"gain"`
ID string `json:"id"`
Index int `json:"index"`
Loudness string `json:"loudness"`
LRA string `json:"lra"`
Peak string `json:"peak"`
SamplingRate int `json:"samplingRate"`
Selected bool `json:"selected"`
StreamType int `json:"streamType"`
Location string `json:"location"`
}
type PlexTranscodeSession ¶
type PlexTranscodeSession struct {
Key string `json:"key"`
Throttled bool `json:"throttled"`
Complete bool `json:"complete"`
Progress float64 `json:"progress"`
Speed float64 `json:"speed"`
Size int64 `json:"size"`
VideoDecision string `json:"videoDecision"`
AudioDecision string `json:"audioDecision"`
Protocol string `json:"protocol"`
Container string `json:"container"`
VideoCodec string `json:"videoCodec"`
AudioCodec string `json:"audioCodec"`
Width int `json:"width"`
Height int `json:"height"`
TranscodeHwRequested bool `json:"transcodeHwRequested"`
TranscodeHwFullPipeline bool `json:"transcodeHwFullPipeline"`
TimeStamp float64 `json:"timeStamp"`
MaxOffsetAvailable float64 `json:"maxOffsetAvailable"`
MinOffsetAvailable float64 `json:"minOffsetAvailable"`
}
type ProwlarrIndexer ¶
type ProwlarrIndexer struct {
ID int `json:"id"`
Name string `json:"name"`
Enable bool `json:"enable"`
Priority int `json:"priority"`
}
ProwlarrIndexer represents an indexer in Prowlarr
type ProwlarrStats ¶
type ProwlarrStats struct {
Stats ProwlarrStatsResponse `json:"stats"`
Indexers []ProwlarrIndexer `json:"indexers"`
}
ProwlarrStats represents the combined stats for Prowlarr
type ProwlarrStatsResponse ¶
type ProwlarrStatsResponse struct {
GrabCount int `json:"grabCount"`
FailCount int `json:"failCount"`
IndexerCount int `json:"indexerCount"`
}
ProwlarrStatsResponse represents the stats response from Prowlarr API
type QueueRecord ¶
type QueueRecord struct {
ID int `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
TimeLeft string `json:"timeleft,omitempty"`
EstimatedCompletionTime string `json:"estimatedCompletionTime"`
Indexer string `json:"indexer"`
DownloadClient string `json:"downloadClient"`
Size int64 `json:"size"`
SizeLeft int64 `json:"sizeleft"`
TrackedDownloadStatus string `json:"trackedDownloadStatus"`
TrackedDownloadState string `json:"trackedDownloadState"`
StatusMessages []StatusMessage `json:"statusMessages"`
ErrorMessage string `json:"errorMessage"`
DownloadId string `json:"downloadId"`
Protocol string `json:"protocol"`
}
QueueRecord represents a record in the Sonarr queue
type RadarrCustomFormat ¶
RadarrCustomFormat represents a custom format in Radarr
type RadarrMovie ¶
type RadarrMovie struct {
Title string `json:"title"`
OriginalTitle string `json:"originalTitle"`
Year int `json:"year"`
FolderPath string `json:"folderPath"`
CustomFormats []RadarrCustomFormat `json:"customFormats"`
}
RadarrMovie represents the movie information in a queue record
type RadarrMovieResponse ¶
type RadarrMovieResponse struct {
ID int `json:"id"`
Title string `json:"title"`
OriginalTitle string `json:"originalTitle"`
Year int `json:"year"`
Overview string `json:"overview"`
ImdbId string `json:"imdbId"`
TmdbId int `json:"tmdbId"`
Status string `json:"status"`
Added string `json:"added"`
HasFile bool `json:"hasFile"`
Path string `json:"path"`
SizeOnDisk int64 `json:"sizeOnDisk"`
Runtime int `json:"runtime"`
Ratings Ratings `json:"ratings"`
}
RadarrMovieResponse represents a movie from Radarr's movie endpoint
type RadarrQueueDeleteOptions ¶
type RadarrQueueDeleteOptions struct {
RemoveFromClient bool `json:"removeFromClient"`
Blocklist bool `json:"blocklist"`
SkipRedownload bool `json:"skipRedownload"`
ChangeCategory bool `json:"changeCategory"`
}
RadarrQueueDeleteOptions represents the options for deleting a queue item
type RadarrQueueRecord ¶
type RadarrQueueRecord struct {
ID int `json:"id"`
MovieID int `json:"movieId"`
Title string `json:"title"`
Status string `json:"status"`
TimeLeft string `json:"timeleft,omitempty"`
EstimatedCompletionTime string `json:"estimatedCompletionTime"`
Protocol string `json:"protocol"` // "usenet" or "torrent"
Indexer string `json:"indexer"`
DownloadClient string `json:"downloadClient"`
Size int64 `json:"size"`
SizeLeft int64 `json:"sizeleft"`
CustomFormatScore int `json:"customFormatScore"`
TrackedDownloadStatus string `json:"trackedDownloadStatus"`
TrackedDownloadState string `json:"trackedDownloadState"`
StatusMessages []RadarrStatusMessage `json:"statusMessages"`
ErrorMessage string `json:"errorMessage"`
DownloadId string `json:"downloadId"`
Movie RadarrMovie `json:"movie"`
}
RadarrQueueRecord represents a record in the Radarr queue
type RadarrQueueResponse ¶
type RadarrQueueResponse struct {
Page int `json:"page"`
PageSize int `json:"pageSize"`
SortKey string `json:"sortKey"`
SortDirection string `json:"sortDirection"`
TotalRecords int `json:"totalRecords"`
Records []RadarrQueueRecord `json:"records"`
}
RadarrQueueResponse represents the queue response from Radarr API
type RadarrStatusMessage ¶
RadarrStatusMessage represents detailed status information for a queue record
type Ratings ¶
type Ratings struct {
Tmdb Rating `json:"tmdb"`
Imdb Rating `json:"imdb"`
Value int `json:"value"`
Votes int `json:"votes"`
}
Ratings represents rating information for a movie
type RegisterRequest ¶
type RegisterRequest struct {
Username string `json:"username" binding:"required,min=3,max=32"`
Email string `json:"email" binding:"required,email"`
Password string `json:"password" binding:"required,min=8"`
}
RegisterRequest represents the registration data
type RequestsResponse ¶
type RequestsStats ¶
type RequestsStats struct {
PendingCount int `json:"pendingCount"`
Requests []MediaRequest `json:"requests"`
}
type Season ¶
type Season struct {
EpisodeFileCount int `json:"episodeFileCount"`
EpisodeCount int `json:"episodeCount"`
TotalEpisodeCount int `json:"totalEpisodeCount"`
SizeOnDisk int64 `json:"sizeOnDisk"`
PercentOfEpisodes float64 `json:"percentOfEpisodes"`
}
Season represents season statistics
type SeriesRatings ¶
SeriesRatings represents rating information for a series
type SeriesStatistics ¶
type SeriesStatistics struct {
SeasonCount int `json:"seasonCount"`
EpisodeFileCount int `json:"episodeFileCount"`
EpisodeCount int `json:"episodeCount"`
TotalEpisodeCount int `json:"totalEpisodeCount"`
SizeOnDisk int64 `json:"sizeOnDisk"`
PercentOfEpisodes float64 `json:"percentOfEpisodes"`
}
SeriesStatistics represents series-wide statistics
type ServiceConfigResponse ¶
type ServiceHealth ¶
type SessionData ¶
type SessionData struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
IDToken string `json:"id_token"`
ExpiresAt time.Time `json:"expires_at"`
UserID int64 `json:"user_id,omitempty"` // Added for built-in auth
AuthType string `json:"auth_type,omitempty"` // "oidc" or "builtin"
}
SessionData holds the session information
type SonarrQueueDeleteOptions ¶
type SonarrQueueDeleteOptions struct {
RemoveFromClient bool `json:"removeFromClient"`
Blocklist bool `json:"blocklist"`
SkipRedownload bool `json:"skipRedownload"`
ChangeCategory bool `json:"changeCategory"`
}
SonarrQueueDeleteOptions represents the options for deleting a queue item in Sonarr
type SonarrQueueResponse ¶
type SonarrQueueResponse struct {
Page int `json:"page"`
PageSize int `json:"pageSize"`
SortKey string `json:"sortKey"`
SortDirection string `json:"sortDirection"`
TotalRecords int `json:"totalRecords"`
Records []QueueRecord `json:"records"`
}
SonarrQueueResponse represents the queue response from Sonarr API
type SonarrSeason ¶
type SonarrSeason struct {
SeasonNumber int `json:"seasonNumber"`
Monitored bool `json:"monitored"`
Statistics *Season `json:"statistics,omitempty"`
}
SonarrSeason represents a season in a series
type SonarrSeriesResponse ¶
type SonarrSeriesResponse struct {
ID int `json:"id"`
Title string `json:"title"`
TitleSlug string `json:"titleSlug"`
Overview string `json:"overview"`
Status string `json:"status"`
Added string `json:"added"`
Year int `json:"year"`
Path string `json:"path"`
TvdbId int `json:"tvdbId"`
ImdbId string `json:"imdbId"`
SizeOnDisk int64 `json:"sizeOnDisk"`
Runtime int `json:"runtime"`
Network string `json:"network"`
AirTime string `json:"airTime"`
Monitored bool `json:"monitored"`
SeasonFolder bool `json:"seasonFolder"`
Seasons []SonarrSeason `json:"seasons"`
Statistics SeriesStatistics `json:"statistics"`
Ratings SeriesRatings `json:"ratings"`
}
SonarrSeriesResponse represents a series from Sonarr's series endpoint
type SonarrStatsResponse ¶
type SonarrStatsResponse struct {
MovieCount int `json:"movieCount"`
EpisodeCount int `json:"episodeCount"`
EpisodeFileCount int `json:"episodeFileCount"`
Monitored int `json:"monitored"`
Unmonitored int `json:"unmonitored"`
QueuedCount int `json:"queuedCount"`
MissingCount int `json:"missingCount"`
}
SonarrStatsResponse represents the stats response from Sonarr API
type StatusMessage ¶
StatusMessage represents detailed status information for a queue record
type StatusResponse ¶
type UpdateResponse ¶
type UpdateResponse struct {
Version string `json:"version"`
Branch string `json:"branch"`
ReleaseDate time.Time `json:"releaseDate"`
FileName string `json:"fileName"`
URL string `json:"url"`
Installed bool `json:"installed"`
InstalledOn time.Time `json:"installedOn"`
Installable bool `json:"installable"`
Latest bool `json:"latest"`
Changes Changes `json:"changes"`
Hash string `json:"hash"`
}
type User ¶
type User struct {
ID int64 `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
PasswordHash string `json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
User represents a user in the system