TV shows

Import files into a TV show

POST/tv/series/{id}/import/

write Change: creates or edits. Scopes

Creates the episodes of a reviewed list (items) and gives each its file, in the background. delivery is how the files reach viewers: adopt for a node source; download, proxy or redirect for s3 and url; upload for upload. Answers 202 with the import, to follow on GET /tv/imports/{id}/.

Path parameters

  • idstring (uuid)required

    The TV show's id.

Body

  • sourcestringrequired
    • node - node
    • s3 - s3
    • url - url
    • upload - upload

    One of: "node" "s3" "url" "upload"

  • deliverystringrequired
    • adopt - adopt
    • download - download
    • proxy - proxy
    • redirect - redirect
    • upload - upload

    One of: "adopt" "download" "proxy" "redirect" "upload"

  • serverstring (uuid)can be null
  • storagestring (uuid)can be null
  • skip_existingboolean

    Leave episodes that already have a file (or one on its way) alone.

    Default: true

  • fill_tmdbboolean

    Give new seasons and episodes their TMDB metadata, when the show has a TMDB id.

    Default: true

  • itemsobject[]required
    • refstringrequired
    • namestring
    • sizeinteger

      Default: 0

    • seasonintegerrequired
    • episodeintegerrequired

Response

202 OK

  • idstring (uuid)requiredread-only
  • seriesstring (uuid)requiredread-only
  • series_namestringrequiredread-only
  • kindstringrequiredread-only
  • statusstringrequiredread-only
  • optionsanyrequiredread-only

    What the operator chose: delivery, node, bucket, seasons to sync, …

  • itemsanyrequiredread-only

    For a file import, one entry per file: where it is, which season and episode it is, and — once applied — the episode it landed on and what happened.

  • totalintegerrequiredread-only
  • doneintegerrequiredread-only
  • failedintegerrequiredread-only
  • messagestringrequiredread-only
  • errorsanyrequiredread-only

    The first problems met, each with the item it concerns. Bounded.

  • created_atstring (date-time)requiredread-only
  • updated_atstring (date-time)requiredread-only
  • started_atstring (date-time)requiredread-onlycan be null
  • finished_atstring (date-time)requiredread-onlycan be null

Errors

  • 400 Something sent is not valid. Each field that is wrong is named with what is wrong.
  • 401 No credential, or one that is wrong, expired or revoked.
  • 403 The account, or the key's or app's scopes, may not do this.
  • 404 Nothing with this id, or nothing the account can see.
  • 429 Slow down: wait the seconds in the Retry-After header, then try again.

What each error means