tmdb

package
v1.10.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 9 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 tmdb implements a client for the TMDB API https://developer.themoviedb.org/docs/getting-started

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client
}

Client is a profile HTTP client that wraps the base HTTP client

func New

func New(apikey string, opts ...client.ClientOpt) (*Client, error)

New creates a new profile HTTP client with the given base URL and options. The url parameter should point to the profile API endpoint, e.g. "http://localhost:8080/api".

func (*Client) GetMovie added in v1.10.5

func (c *Client) GetMovie(ctx context.Context, id uint64) (*schema.MovieDetails, error)

GetMovie returns the details of a movie, such as its runtime

func (*Client) GetTVEpisode added in v1.10.6

func (c *Client) GetTVEpisode(ctx context.Context, id, season, episode uint64) (*schema.TVEpisode, error)

GetTVEpisode returns an episode of a TV show, by its season and episode numbers, such as its name and runtime, with its identifiers in other databases, such as IMDb

func (*Client) GetTVShow added in v1.10.6

func (c *Client) GetTVShow(ctx context.Context, id uint64) (*schema.TVShowDetails, error)

GetTVShow returns the details of a TV show, such as the typical runtimes of its episodes, with its identifiers in other databases, such as IMDb

func (*Client) SearchMovies

func (*Client) SearchTVShows added in v1.10.6

func (c *Client) SearchTVShows(ctx context.Context, req schema.TVSearchRequest) (*schema.TVSearchResponse, error)

SearchTVShows returns a page of the TV shows whose names match the search, with the most relevant first. TMDB searches shows, rather than episodes, which are got from a show with GetTVEpisode.

type Query

type Query struct {
	Name    string
	Year    int // 0 if no year was found
	Season  int // 0 unless Episode is also set
	Episode int // 0 unless this looks like a TV episode
}

Query is a search query extracted from a media file's path: the title to search for, its release year if present, and (for a TV episode) its season/episode number.

func ExtractQuery

func ExtractQuery(path string) Query

ExtractQuery derives a search query - title, year, and (for a TV episode) season/episode - from a media file's path.

Jump to

Keyboard shortcuts

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