Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New continuous parameter, Plex will automatically play the next episode in the series #36077

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions source/_integrations/plex.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ Required fields within the `media_content_id` payloads are marked as such, other
- `offset`: The desired playback start position in seconds.
- `allow_multiple`: A search must find one specific item to succeed. This parameter accepts multiple matches in a search and enqueues all found items for playback. Accepts `1` or `true` to enable.
- `username`: A username for a local Plex user account. This is only required if the Plex server has multiple users and you wish to play media for a specific user.
- `continuous`: Plex will automatically play the next episode in the series. Accepts `1` or `true` to enable.

Simplified examples are provided for [music](#music), [TV episodes](#tv-episode), and [movies](#movie). See [advanced searches](#advanced-searches) for complex/smart search capabilities.

Expand Down Expand Up @@ -221,11 +222,11 @@ media_content_id: '{ "playlist_name": "The Best of Disco", "shuffle": "1" }'

#### TV episode

| Data attribute | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `entity_id` | `entity_id` of the client |
| `media_content_id` | Quoted JSON containing:<br/><ul><li>`library_name` (Required)</li><li>`show_name` or `show.title`</li><li>`season_number` or `season.index`</li><li>`episode_number` or `episode.index`</li><li>`shuffle` (0 or 1)</li><li>`resume` (0 or 1)</li><li>`offset` (in seconds)</li><li>`allow_multiple` (0 or 1)</li></ul> |
| `media_content_type` | `EPISODE` |
| Data attribute | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `entity_id` | `entity_id` of the client |
| `media_content_id` | Quoted JSON containing:<br/><ul><li>`library_name` (Required)</li><li>`show_name` or `show.title`</li><li>`season_number` or `season.index`</li><li>`episode_number` or `episode.index`</li><li>`shuffle` (0 or 1)</li><li>`resume` (0 or 1)</li><li>`offset` (in seconds)</li><li>`allow_multiple` (0 or 1)</li><li>`continuous` (0 or 1)</li></ul> |
| `media_content_type` | `EPISODE` |

##### Examples:

Expand Down Expand Up @@ -253,6 +254,13 @@ media_content_type: EPISODE
media_content_id: '{ "library_name": "News TV", "show_name": "60 Minutes", "episode.unwatched": true, "episode.inProgress": [true, false], "resume": 1, "sort": "addedAt:asc", "maxresults": 1 }'
```

Play Rick and Morty episodes continuously starting from S2E5

```yaml
entity_id: media_player.plex_player
media_content_type: EPISODE
{ "library_name": "Adult TV", "show_name": "Rick and Morty", "season_number": 2, "episode_number": 5, "continuous": 1}'
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix JSON formatting in the example.

The example is helpful but contains formatting issues:

  1. Missing opening quote in the JSON string
  2. Missing blank lines around the code block
 Play Rick and Morty episodes continuously starting from S2E5

 ```yaml
 entity_id: media_player.plex_player
 media_content_type: EPISODE
-{ "library_name": "Adult TV", "show_name": "Rick and Morty", "season_number": 2, "episode_number": 5, "continuous": 1}'
+media_content_id: '{ "library_name": "Adult TV", "show_name": "Rick and Morty", "season_number": 2, "episode_number": 5, "continuous": 1 }'

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.35.0)</summary>

263-263: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->

#### Movie

| Data attribute | Description |
Expand Down Expand Up @@ -325,6 +333,7 @@ The search will attempt to guess the type of media based on the search parameter

# Watch the worst rated movie from the 2000s starring either Nicolas Cage or Danny Devito
{ "library_name": "Movies", "actor": ["Nicolas Cage", "Danny DeVito"], "decade": 2000, "sort": "audienceRating:asc", "maxresults": 1 }

```

### Compatibility
Expand Down