upsies.utils.webdbs.tvmaze

API for tvmaze.com

Classes

class upsies.utils.webdbs.tvmaze.TvmazeApi(config=None)[source]

Bases: WebDbApiBase

API for tvmaze.com

sanitize_query(query)[source]

Set type to unknown

get_id_from_text(text)[source]

Return ID found in text or None

async search(query)[source]

Search DB

Parameters:

queryQuery instance

Returns:

List of SearchResult instances

async cast(id)[source]

Return list of cast names

async languages(id)[source]

Return list of spoken languages

async creators(id)[source]

Return list of creator names (usually empty for movies and episodes)

async directors(id)[source]

Return list of director names (usually empty for series)

async genres(id)[source]

Return list of genres

async poster_url(id, season=None)[source]

Return URL of poster image or empty string

Parameters:

season

Return poster for specific season

If this is not supported by the concrete implementation, default to the URL for the main poster.

async rating(id)[source]

Return rating as a number or None

async summary(id)[source]

Return short plot description

async type(id)[source]

Return ReleaseType

async url(id)[source]

Return URL for id

async year(id)[source]

Return release year or empty string

async imdb_id(id)[source]

Return IMDb ID for TVmaze ID id or None

async episode(id, season, episode)[source]

Get episode information

Parameters:
  • id – Show ID

  • season – Season number

  • episode – Episode number

Returns:

dict with these keys:

  • date (str as “YYYY-MM-DD”)

  • episode (str)

  • season (str)

  • summary (str)

  • title (str)

  • url (str)

async status(id)[source]

Return something like “Running”, “Ended” or empty string