Beta

Playlists allow you to create a linear list of movies, episodes, or videos. On this page, we’ll dive into the different playlist endpoints you can use to read playlist information programmatically from the Channels library.

The playlists model

The playlist model contains all the information about the Playlists in your library, such as their name, art, last watched date, etc. Additionally, you can fetch all of the content of a playlist using the nested endpoint.

Properties

id string

The unique identifier for the playlist.

name string

The name of the playlist.

labels array

An array of strings for the labels of the playlist. Labels are self assigned strings used for organizing items in the library.

content_count integer

The number of items contained in the playlist.

last_watched_at timestamp

The date of the last time content inside the playlist was watched.

created_at timestamp

The date when the playlist was first added to the library.

updated_at timestamp

The date when the playlist was last updated.

GET /api/v1/playlists

List all playlists

Returns a list of all playlists in the library alphabetically.

Request
GET /api/v1/playlists
curl http://192.168.1.3:8089/api/v1/playlists
Response
[{
  "id": "42",
  "name": "Watch Next",
  "labels": [
    "dads-stuff"
  ],
  "content_count": 7,
  "last_watched_at": 1714422339150,
  "created_at": 1705507170789,
  "updated_at": 1714422339150
} ,{
  "id": "50",
   "name": "Treehouse of Horrors",
   ...
}]

        

GET /api/v1/playlists/:id

Retrieve a playlist

This endpoint allows you to retrieve a playlist by using its unique identifier.

Required Attributes

id string

The unique identifier of the Playlist.

Request
GET /api/v1/playlists/42
curl http://192.168.1.3:8089/api/v1/playlists/42
Response
{
  "id": "42",
  "name": "Watch Next",
  "labels": [
    "dads-stuff"
  ],
  "content_count": 7,
  "last_watched_at": 1714422339150,
  "created_at": 1705507170789,
  "updated_at": 1714422339150
}

        

GET /api/v1/playlists/:id/content

Retrieve a playlist's contents

This endpoint allows you to retrieve all the content contained by a playlist.

Required Attributes

id string

The unique identifier of the Playlist.

Optional Attributes

watched boolean

Only return episodes with watch status corresponding to the passed in value.

favorited boolean

Only return episodes with favorited status corresponding to the passed in value.

verified boolean

Only return episodes with verified status corresponding to the passed in value.

source string

Only return episodes sourced from the passed in value.

Options

  • recordings

    Episodes recorded directly via Channels.

  • imports

    Episodes added to the library via local content sources.

  • playon-cloud

    Episodes added to the library from PlayOn Cloud.

  • stream-links

    Episodes added to the library via a Stream Link.

  • stream-files

    Episodes added to the library via a Stream File.

Sorting Attributes

sort string

Sort the response based on the passed in value.

Options

  • custom default

    Sort by the preference of the collection.

  • date_added

    Sort by the date the content was added to the library.

  • date_released

    Sort by the date the content originally aired.

  • date_watched

    Sort by the date the content was last watched.

  • duration

    Sort by length of the content.

order string

Set the order of the response.

Options

  • asc

    Ascending order.

  • desc

    Descending order.

Request
GET /api/v1/playlists/44/contents
curl http://192.168.1.3:8089/api/v1/playlists/44/contents
Response
[{
  "id": "94",
  "program_id": "tmdb/movie/9602",
  "path": "/Volumes/DVRs/tools/library/movies/new/Coming To America (1988).mp4",
  "title": "Coming to America (1988)",
  "summary": "An African prince decides it’s time for him to find a princess... and his mission leads him and his most loyal friend to Queens, New York. In disguise as an impoverished immigrant, the pampered prince quickly finds himself a new job, new friends, new digs, new enemies and lots of trouble.",
  "content_rating": "R",
  "image_url": "https://image.tmdb.org/t/p/w780//djRAvxyvvN2yqlJKDbT3uy4vOBw.jpg",
  "thumbnail_url": "http://localhost:8089/dvr/files/94/preview.jpg",
  "duration": 7008.064,
  "playback_time": 0,
  "release_year": 1988,
  "release_date": "1988-06-29",
  "genres": [
    "Comedy",
    "Romance"
  ],
  "tags": [
    "HD",
    "Dolby Digital",
    "CC"
  ],
  "categories": [
    "Movie"
  ],
  "cast": [
    "Eddie Murphy",
    "Arsenio Hall",
    "James Earl Jones",
    "John Amos",
    "Shari Headley",
    "Frankie Faison",
    "Louie Anderson",
    "Eriq La Salle",
    "Allison Dean",
    "Madge Sinclair",
    "Paul Bates",
    "Samuel L. Jackson",
    "Ralph Bellamy",
    "Don Ameche",
    "Vanessa Bell Calloway",
    "Calvin Lockhart",
  ],
  "directors": [
    "John Landis"
  ],
  "watched": false,
  "favorited": false,
  "delayed": false,
  "cancelled": false,
  "corrupted": false,
  "completed": true,
  "processed": true,
  "locked": false,
  "verified": false,
  "created_at": 1673279220000,
  "updated_at": 1713976814560
},{
  "id": "31254",
  "program_id": "183983",
  ...
}]