From 2269d9eaec45c6d4916744a9e5abeb077b726803 Mon Sep 17 00:00:00 2001 From: jjlawren Date: Fri, 4 Sep 2020 05:17:26 -0500 Subject: [PATCH] Describe new Plex play_media syntax for movies (#14378) --- source/_integrations/plex.markdown | 41 +++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/source/_integrations/plex.markdown b/source/_integrations/plex.markdown index e6a678d98e9..8fd9bd94b10 100644 --- a/source/_integrations/plex.markdown +++ b/source/_integrations/plex.markdown @@ -127,21 +127,50 @@ media_content_type: EPISODE media_content_id: '{ "library_name": "Kid TV", "show_name": "Sesame Street", "shuffle": "1" }' ``` -#### Video +#### Movie | Service data attribute | Description | | ---------------------- | ------------------------------------------------------------------------------------------------------- | | `entity_id` | `entity_id` of the client | -| `media_content_id` | Quoted JSON containing:
| -| `media_content_type` | `VIDEO` | +| `media_content_id` | Quoted JSON containing:
| +| `media_content_type` | `movie` | -##### Example: +For movies it's usually sufficient to provide the title. However, if the title you provide has multiple matches (such as with remakes), more search keys may be necessary. These optional keys can be included in the `media_content_id` JSON payload to restrict the search: + +* `unwatched`: Restrict search to unwatched items only (`True`, `False`) +* `actor`: Restrict search for movies that include a specific actor +* `collection`: Restrict search within a named Plex collection ("Back to the Future", "Indiana Jones") +* `contentRating`: Restrict search to a specific content rating ("PG", "R") +* `country`: Restrict search to a specific country of origin +* `decade`: Restrict search to a specific decade ("1960", "2010") +* `director`: Restrict search to a specific director +* `genre`: Restrict search to a specific genre ("Animation", "Drama", "Sci-Fi") +* `resolution`: Restrict search to a specific video resolution (480, 720, 1080, "4k") +* `year`: Restrict search to a specific year + +##### Examples: ```yaml entity_id: media_player.plex_player -media_content_type: VIDEO -media_content_id: '{ "library_name": "Adult Movies", "video_name": "Blade" }' +media_content_type: movie +media_content_id: '{ "library_name": "Adult Movies", "title": "Blade" }' ``` +```yaml +entity_id: media_player.plex_player +media_content_type: movie +media_content_id: '{ "library_name": "Adult Movies", "title": "The Manchurian Candidate", year=1962 }' +# Would find the original instead of the 2004 remake +``` + +"Lazy" searches are also possible: +```yaml +entity_id: media_player.plex_player +media_content_type: movie +media_content_id: '{ "library_name": "Adult Movies", "title": "die hard", year=1995 }' +# Would find the sequel, "Die Hard: With a Vengeance" +``` + + ### Compatibility | Client | Limitations |