Import files into a TV show
/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)requiredThe TV show's id.
Body
sourcestringrequirednode- nodes3- s3url- urlupload- upload
One of:
"node""s3""url""upload"deliverystringrequiredadopt- adoptdownload- downloadproxy- proxyredirect- redirectupload- upload
One of:
"adopt""download""proxy""redirect""upload"serverstring (uuid)can be nullstoragestring (uuid)can be nullskip_existingbooleanLeave episodes that already have a file (or one on its way) alone.
Default:
truefill_tmdbbooleanGive new seasons and episodes their TMDB metadata, when the show has a TMDB id.
Default:
trueitemsobject[]requiredrefstringrequirednamestringsizeintegerDefault:
0seasonintegerrequiredepisodeintegerrequired
Response
202 OK
idstring (uuid)requiredread-onlyseriesstring (uuid)requiredread-onlyseries_namestringrequiredread-onlykindstringrequiredread-onlystatusstringrequiredread-onlyoptionsanyrequiredread-onlyWhat the operator chose: delivery, node, bucket, seasons to sync, …
itemsanyrequiredread-onlyFor 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-onlydoneintegerrequiredread-onlyfailedintegerrequiredread-onlymessagestringrequiredread-onlyerrorsanyrequiredread-onlyThe first problems met, each with the item it concerns. Bounded.
created_atstring (date-time)requiredread-onlyupdated_atstring (date-time)requiredread-onlystarted_atstring (date-time)requiredread-onlycan be nullfinished_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.