overseerr

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package overseerr talks to Overseerr, the app people run next to their media server to discover titles and ask for them. Jellyseerr serves the same API, so it works too.

Matinee uses it for the Discover tab: trending and popular titles, recommendations based on what someone watched, and asking for a title, which Overseerr then approves and hands to Radarr or Sonarr by its own rules.

Everything Matinee needs from Overseerr goes through Client, so the rest of the server doesn't know its API.

Index

Constants

View Source
const (
	StatusUnknown    = 1
	StatusPending    = 2 // asked for, waiting for approval
	StatusProcessing = 3 // approved, on its way
	StatusPartial    = 4 // some seasons are available
	StatusAvailable  = 5
)

Media statuses, as Overseerr tracks them.

View Source
const (
	RequestPending  = 1
	RequestApproved = 2
	RequestDeclined = 3
)

Request states, as Overseerr returns them.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound means Overseerr doesn't know the title.

View Source
var Lists = map[string]struct{ Path, Kind string }{
	"trending":        {"/discover/trending", ""},
	"popular-movies":  {"/discover/movies", "movie"},
	"popular-shows":   {"/discover/tv", "tv"},
	"upcoming-movies": {"/discover/movies/upcoming", "movie"},
	"upcoming-shows":  {"/discover/tv/upcoming", "tv"},
}

Lists Overseerr's discover pages offer, by the name Matinee uses.

Functions

This section is empty.

Types

type Client

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

Client calls Overseerr's API (v1).

func New

func New(c Config) (*Client, error)

func (*Client) Discover

func (c *Client) Discover(ctx context.Context, list string) ([]Title, error)

Discover lists one of Lists.

func (*Client) DiscoverPage

func (c *Client) DiscoverPage(ctx context.Context, list string, page int) ([]Title, int, error)

DiscoverPage is a page (from 1) of one of Lists, and how many pages it has.

func (*Client) Lookup

func (c *Client) Lookup(ctx context.Context, kind string, tmdbID int) (Title, []int, error)

Lookup is a movie or show by its TMDB id.

func (*Client) Recommendations

func (c *Client) Recommendations(ctx context.Context, kind string, tmdbID int) ([]Title, error)

Recommendations lists titles like a movie or show (kind), by its TMDB id.

func (*Client) RecommendationsPage

func (c *Client) RecommendationsPage(ctx context.Context, kind string, tmdbID, page int) ([]Title, int, error)

RecommendationsPage is a page (from 1) of Recommendations, and how many pages there are.

func (*Client) Request

func (c *Client) Request(ctx context.Context, kind string, tmdbID int, seasons []int, userID int) (int, error)

Request asks for a movie, or every season of a show, as an Overseerr user (0 for the key's owner). Overseerr approves it or not by that user's permissions, and returns where the request stands.

func (*Client) Search

func (c *Client) Search(ctx context.Context, q string) ([]Title, error)

Search finds movies and shows by name.

func (*Client) Status

func (c *Client) Status(ctx context.Context) (Status, User, error)

Status checks the address and key reach Overseerr, and returns the key's owner.

func (*Client) URL

func (c *Client) URL() string

URL is Overseerr's address.

func (*Client) Users

func (c *Client) Users(ctx context.Context) ([]User, error)

Users lists Overseerr's accounts.

type Config

type Config struct {
	URL    string `json:"url"`
	APIKey string `json:"apiKey"`
	// RequestAs is the Overseerr user that requests are made as for people
	// without an Overseerr account of the same name; 0 means the API key's
	// owner.
	RequestAs int `json:"requestAs"`
}

Config is how Matinee reaches Overseerr, set by an admin. The API key stays on the server.

type Error

type Error struct {
	Status  int
	Message string
}

Error is a failed call, with a message fit to show an admin.

func (*Error) Error

func (e *Error) Error() string

type Status

type Status struct {
	Version string `json:"version"`
}

Status is what Overseerr says about itself.

type Title

type Title struct {
	Kind     string  `json:"kind"` // movie or show
	TMDBID   int     `json:"tmdbId"`
	Title    string  `json:"title"`
	Year     int     `json:"year,omitempty"`
	Overview string  `json:"overview,omitempty"`
	Poster   string  `json:"poster,omitempty"`
	Backdrop string  `json:"backdrop,omitempty"`
	Rating   float64 `json:"rating,omitempty"` // TMDB's, out of 10
	// MediaStatus is where Overseerr has it (see the Status constants); 0
	// when nobody has asked for it.
	MediaStatus int `json:"-"`
}

Title is a movie or a show as Overseerr lists it.

type User

type User struct {
	ID               int    `json:"id"`
	Email            string `json:"email,omitempty"`
	Username         string `json:"username,omitempty"`
	PlexUsername     string `json:"plexUsername,omitempty"`
	JellyfinUsername string `json:"jellyfinUsername,omitempty"`
	DisplayName      string `json:"displayName,omitempty"`
}

User is an Overseerr account.

func (User) Matches

func (u User) Matches(name string) bool

Matches says whether name is one of this user's names, or their email before the @.

func (User) Name

func (u User) Name() string

Name is how the user shows up in Overseerr.

Directories

Path Synopsis
Package overseerrtest is a pretend Overseerr for tests: just enough of its v1 API for what Matinee calls.
Package overseerrtest is a pretend Overseerr for tests: just enough of its v1 API for what Matinee calls.

Jump to

Keyboard shortcuts

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