Movies

Give a movie a file already on a server

POST/movies/{id}/adopt-file/

write Change: creates or edits. Scopes

Uses a file already in a server's incoming folder as the movie's file: nothing is copied. path is relative to that folder (GET /vod/browse/ lists it). The server checks the file and reports its size and tracks.

Path parameters

  • idstring (uuid)required

    The movie's id.

Body

  • serverstring (uuid)required

    Node that holds the file.

  • pathstringrequired

    Path relative to the node's VOD_DIR scan directory.

Response

200 OK

  • idstring (uuid)requiredread-only
  • xtream_idintegerrequiredread-only

    The number players know it by, in player links and the player API. Given when it is created, never changed or reused, because players save favourites against it.

  • namestringrequired
  • categorystring (uuid)required

    The one category this movie reports as its own where exactly one is allowed: the M3U playlist group, and the title-uniqueness rule below. Always present, and always among categories.

  • category_namestringrequiredread-only
  • categoriesstring (uuid)[]

    Every category this movie appears under. Browsing and filtering read this; it always contains category. Same arrangement as streams, for the same reason — a playlist entry carries exactly one group, and a movie in three genres still has to answer that with one value.

  • bouquetsstring (uuid)[]

    Bouquets this movie belongs to. A line with none of them in common cannot watch it.

  • plotstring
  • poster_urlstring (uri)

    Artwork is referenced by URL rather than uploaded — the same convention streams use for thumbnails, and it keeps the panel out of the business of serving images.

  • backdrop_urlstring (uri)
  • trailer_urlstring (uri)
  • yearintegercan be null
  • release_datestring (date)can be null
  • ratingstring (decimal)can be null

    Out of 10.

  • genrestring
  • caststring
  • directorstring
  • countrystring
  • tmdb_idstring

    Set when the metadata was fetched from TMDB. Lets a re-fetch go straight to the right title instead of searching again.

  • is_activeboolean

    Inactive movies disappear from playlists and refuse playback, without being deleted.

  • sort_orderinteger
  • media_filestring (uuid)can be null

    The file behind this title. Null until a source is attached. One title, one file — selling the same title in two qualities means two entries, which is also how every player's VOD list expects to see it.

  • mediaobjectrequiredread-only
    • idstring (uuid)requiredread-only
    • statestringrequiredread-only

      Lifecycle of the file itself, not of any one node's copy. "ready" means at least one node finished ingest and can serve it; per-node progress lives on MediaAsset.

      • draft - Draft
      • ingesting - Ingesting
      • ready - Ready
      • failed - Failed
    • original_namestringrequiredread-only

      Filename as uploaded, downloaded, or found in the watch folder. Kept for operator recognition only.

    • containerstringrequiredread-only

      File extension of what is actually served (mkv, mp4, ts, …). Ingest keeps the source's own container byte for byte, so this is whatever the file arrived as; the play URL carries it because players pick a demuxer from the extension.

    • size_bytesintegerrequiredread-only

      Size of the finished file. Drives the per-node storage quota.

    • duration_secondsnumberrequiredread-onlycan be null

      Null until a node probes the file.

    • video_codecstringrequiredread-only

      e.g. H.264, HEVC. Decides whether the operator preview player can show it.

    • widthintegerrequiredread-onlycan be null
    • heightintegerrequiredread-onlycan be null
    • fpsnumberrequiredread-onlycan be null

      Null when the file declares a variable or unknown rate.

    • checksumstringrequiredread-only

      Of the finished file. Node-to-node replication verifies against this, so a truncated copy is caught before it is ever served.

    • is_readybooleanrequiredread-only

      Whether a streaming server can serve this file now.

    • assetsobject[]requiredread-only
      • idstring (uuid)requiredread-only
      • serverstring (uuid)requiredread-only
      • server_namestringrequiredread-only
      • server_instance_idstringrequiredread-only
      • statusstringrequiredread-only
      • progress_pctintegerrequiredread-only
      • bytes_doneintegerrequiredread-only
      • bytes_totalintegerrequiredread-only
      • errorstringrequiredread-only

        Why the last attempt failed. Cleared on a successful retry.

      • last_verified_atstring (date-time)requiredread-onlycan be null

        When the node last confirmed the file is present and the right size.

    • audio_tracksobject[]requiredread-only
      • idstring (uuid)requiredread-only
      • indexintegerrequiredread-only

        Position within the stored container, 0-based.

      • languagestringrequiredread-only

        ISO 639-2 code as tagged in the container (eng, fra, ara). Empty when the source carried no tag.

      • titlestringrequiredread-only
      • codecstringrequiredread-only
      • channelsintegerrequiredread-onlycan be null
      • is_defaultbooleanrequiredread-only
    • subtitle_tracksobject[]requiredread-only
      • idstring (uuid)requiredread-only
      • indexintegerrequiredread-only

        Position within the stored container, 0-based.

      • languagestring

        ISO 639-2 code (eng, fra, ara). Required for operator-supplied files — an untagged subtitle shows up as "Track 3" on every player.

      • titlestring
      • codecstringrequiredread-only

        subrip, ass, hdmv_pgs_subtitle, ...

      • is_defaultboolean
      • is_forcedboolean

        Shown automatically for foreign-language passages even when subtitles are off.

      • is_sdhboolean
      • source_urlstring (uri)

        Where an operator-supplied subtitle was fetched from. Empty for tracks that came out of the source media.

    • deliverystringrequiredread-only

      Who carries the bytes. "stored" is the normal path: a node holds a copy and serves it off local disk. "proxy" keeps nothing — a node opens the source per viewer and passes the bytes through, so the title costs no storage and the viewer never learns the origin, but every byte crosses your bandwidth. "redirect" costs you neither: the viewer is sent to the source and fetches it themselves — which necessarily shows them the URL, and puts playback beyond anything you can observe or cut off. All three inherit the source's reliability: if it goes away, so does the film.

      • stored - Stored on a node
      • proxy - Proxied through a node
      • redirect - Sent straight to the source
    • source_urlstring (uri)requiredread-only

      Upstream this file is proxied from. Empty for stored files. Operator-visible only: it is handed to a node over the authenticated server-to-server channel and never reaches a viewer, which is the point of proxying.

    • source_storagestring (uuid)requiredread-onlycan be null

      Set when the source is an object in one of the panel's buckets (Settings → Storage). The file is then addressed by its key and a signed URL is made each time it is needed, because a signed URL expires and a stored one would stop the film after a few hours.

    • source_storage_namestringrequiredread-only
    • source_keystringrequiredread-only
    • source_labelstringrequiredread-only
    • supports_rangesbooleanrequiredread-only

      Whether the proxied source answered a range request when it was probed. False means the film plays from the start but cannot be scrubbed — accepted rather than refused, because a source that plays is worth more than one that is rejected for a feature the viewer may not use.

    • proxy_serverstring (uuid)requiredread-onlycan be null

      The node that carries a proxied title's traffic. Chosen by the operator rather than routed, because this is a bandwidth bill and picking which machine pays it is their decision, not a load-balancing one. Required for "proxy"; meaningless for the other two, since one serves from disk and the other never touches us.

    • proxy_server_namestringrequiredread-only
    • proxy_balancedbooleanrequiredread-only

      Proxied through whichever streaming node the panel picks at each play (load balanced: a viewer stays on one node, different viewers spread over all of them) instead of one chosen node. The operator opts into spreading the bandwidth bill; with it off, proxy_server alone carries the title.

    • created_atstring (date-time)requiredread-only
    • updated_atstring (date-time)requiredread-only
  • is_playablebooleanrequiredread-only

    Whether a viewer asking for it now could be served.

  • ready_node_countintegerrequiredread-only
  • created_bystring (uuid)requiredread-onlycan be null
  • created_by_usernamestringrequiredread-only
  • created_atstring (date-time)requiredread-only
  • updated_atstring (date-time)requiredread-only

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