From c1dc60fe4c47e175213e568d8882cefd2a57dd7c Mon Sep 17 00:00:00 2001 From: YozoraXCII <96386153+YozoraXCII@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:25:04 +0000 Subject: [PATCH] Rework `- pmm: streaming` to use TMDb Watch Provider data --- CHANGELOG | 9 +- defaults/both/streaming.yml | 136 +++++++++++++++------------- defaults/overlays/streaming.yml | 118 +++++++++++------------- docs/defaults/both/streaming.md | 21 ++--- docs/defaults/overlays/streaming.md | 9 +- 5 files changed, 145 insertions(+), 148 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0dd25324..556e9d1e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,14 +1,15 @@ # Requirements Update (requirements will need to be reinstalled) -Updated gitpython requirement to 3.1.41 -Updated lxml requirement to 5.1.0 -Updated psutil requirement to 5.9.8 -Updated python-dotenv requirement to 1.0.1 +Updated gitpython requirement to 3.1.42 +Updated plexapi requirement to 4.5.10 +Updated setuptools requirement to 69.1.1 +Updated tmdbapis requirement to 1.2.7 # New Features Added `monitor_existing` to sonarr and radarr. To update the monitored status of items existing in plex to match the `monitor` declared. Added [Gotify](https://gotify.net/) as a notification service. Thanks @krstn420 for the initial code. # Updates +Reworked PMM Default Streaming [Collections](https://metamanager.wiki/en/latest/defaults/both/streaming) and [Overlays](https://metamanager.wiki/en/latest/defaults/overlays/streaming) to utilize TMDB Watch Provider data, allowing users to customize regions without relying on mdblist. This data will be more accurate and up-to-date now. Added new [BoxOfficeMojo Builder](https://metamanager.wiki/en/latest/files/builders/mojo/) - credit to @nwithan8 for the suggestion and initial code submission Added new [`trakt_chart` attributes](https://metamanager.wiki/en/latest/files/builders/trakt/#trakt-chart) `network_ids`, `studio_ids`, `votes`, `tmdb_ratings`, `tmdb_votes`, `imdb_ratings`, `imdb_votes`, `rt_meters`, `rt_user_meters`, `metascores` and removed the deprecated `network` attribute Added [Trakt and MyAnimeList Authentication Page](https://metamanager.wiki/en/latest/config/auth/) allowing users to authenticate against those services directly from the wiki. credit to @chazlarson for developing the script diff --git a/defaults/both/streaming.yml b/defaults/both/streaming.yml index 1f0d74ce..46c35f63 100644 --- a/defaults/both/streaming.yml +++ b/defaults/both/streaming.yml @@ -11,74 +11,64 @@ external_templates: collection_section: "030" templates: - mdb_streaming: + streaming: optional: - use_<> + - use_<> - allowed_libraries - originals_only conditionals: - url_part: - default: <> + originals: conditions: - originals_only: true - key: [appletv, disney, max, hulu, netflix, paramount, peacock, amazon] - value: "original" + value: originals + discover_limit: + conditions: + - originals_only: false + value: <> + discover_with: + conditions: + - originals_only: false + value: <> + discover_region: + conditions: + - originals_only: false + value: <> allowed_streaming: conditions: - originals_only: true - key: [all4, bet, britbox, crave, crunchyroll, discovery, hayu, now, showtime] + key: ["103", "1759", "151", "230", "283", "510", "39", "37", "188"] value: False - - region.not: uk - key: [all4, britbox, hayu, now] + - region.not: GB + key: ["103", "151", "39"] value: False - - region.not: ca - key: [crave] + - region.not: CA + key: ["230"] value: False - - region: ca - key: [max, showtime] + - region: CA + key: ["1899", "37"] value: False - watch_region: - default: "" - conditions: - - originals_only: true - value: "" - - region: ca - key: [amazon, disney, netflix] - value: "-ca" - - region: da - key: [amazon, disney, netflix] - value: "-da" - - region: de - key: [amazon, disney, netflix] - value: "-de" - - region: es - key: [amazon, disney, netflix] - value: "-es" - - region: fr - key: [amazon, disney, netflix] - value: "-fr" - - region: it - key: [amazon, disney, netflix] - value: "-it" - - region: pt-br - key: [amazon, disney, netflix] - value: "-pt-br" - - region: uk - key: [amazon, disney, netflix] - value: "-uk" + default: + region: "US" + limit: "500" sync_mode: sync sync_mode_<>: <> sort_by: release.desc sort_by_<>: <> run_definition: - <>>> + - <>>> - <> - <> cache_builders: 1 smart_label: <>>> sync_mode: <>>> - mdblist_list: https://mdblist.com/lists/plexmetamanager/<>-<>s<> + mdblist_list: https://mdblist.com/lists/plexmetamanager/<>-<> + tmdb_discover: + limit: <> + with_watch_providers: <> + watch_region: <> collections: Streaming Collections: @@ -92,37 +82,57 @@ dynamic_collections: Streaming: type: custom data: - all4: All 4 - appletv: Apple TV+ - bet: BET+ - britbox: BritBox - crave: Crave - crunchyroll: Crunchyroll - discovery: discovery+ - disney: Disney+ - hayu: hayu - max: Max - hulu: Hulu - netflix: Netflix - now: NOW - paramount: Paramount+ - peacock: Peacock - amazon: Prime Video - showtime: Showtime + 103: All 4 + 350: Apple TV+ + 1759: BET+ + 151: BritBox + 230: Crave + 283: Crunchyroll + 510: discovery+ + 337: Disney+ + 1899: Max + 223: Hayu + 15: Hulu + 8: Netflix + 39: NOW + 531: Paramount+ + 387: Peacock + 9: Prime Video + 37: Showtime + 188: YouTube title_format: <> <>s template: - - mdb_streaming + - streaming - shared - arr template_variables: image: default: streaming/<> + originals_key: + 103: all4 + 350: appletv + 1759: bet + 151: britbox + 230: crave + 283: crunchyroll + 510: discovery + 337: disney + 1899: max + 223: hayu + 15: hulu + 8: netflix + 39: now + 531: paramount + 387: peacock + 9: amazon + 37: showtime + 188: youtube originals_only: default: false allowed_libraries: - hayu: show - discovery: show - crunchyroll: show + 223: show + 510: show + 283: show translation_key: default: streaming dynamic: diff --git a/defaults/overlays/streaming.yml b/defaults/overlays/streaming.yml index 2fde92ba..71555c7e 100644 --- a/defaults/overlays/streaming.yml +++ b/defaults/overlays/streaming.yml @@ -9,12 +9,6 @@ external_templates: pmm: templates template_variables: - originals_only: - default: false - run_definition: - - <>>> - - <>>> - - <> group: streaming default: horizontal_align: left @@ -55,131 +49,125 @@ external_templates: templates: mdb_streaming: + default: + originals_only: false + optional: + - use_<> + - use_<> + - allowed_libraries run_definition: + - <>>> + - <>>> + - <> - <> ignore_blank_results: true - mdblist_list: https://mdblist.com/lists/plexmetamanager/<>-<>s<> conditionals: - url_part: - default: <> + originals: conditions: - originals_only: true - key: [appletv, disney, max, hulu, netflix, paramount, peacock, amazon] - value: "original" + value: originals + discover_limit: + conditions: + - originals_only: false + value: <> + discover_with: + conditions: + - originals_only: false + value: <> + discover_region: + conditions: + - originals_only: false + value: <> allowed_streaming: conditions: - originals_only: true - key: [all4, bet, britbox, crave, crunchyroll, discovery, hayu, now, showtime] + key: ["103", "1759", "151", "230", "283", "510", "39", "37", "188"] value: False - - region.not: uk - key: [all4, britbox, hayu, now] + - region.not: GB + key: ["103", "151", "39"] value: False - - region.not: ca - key: [crave] + - region.not: CA + key: ["230"] value: False - - region: ca - key: [max, showtime] + - region: CA + key: ["1899", "37"] value: False - watch_region: - default: "" - conditions: - - originals_only: true - value: "" - - region: ca - key: [amazon, disney, netflix] - value: "-ca" - - region: da - key: [amazon, disney, netflix] - value: "-da" - - region: de - key: [amazon, disney, netflix] - value: "-de" - - region: es - key: [amazon, disney, netflix] - value: "-es" - - region: fr - key: [amazon, disney, netflix] - value: "-fr" - - region: it - key: [amazon, disney, netflix] - value: "-it" - - region: pt-br - key: [amazon, disney, netflix] - value: "-pt-br" - - region: uk - key: [amazon, disney, netflix] - value: "-uk" + mdblist_list: https://mdblist.com/lists/plexmetamanager/<>-<> + tmdb_discover: + limit: <> + with_watch_providers: <> + watch_region: <> overlays: Netflix: - variables: {key: netflix, weight: 160} + variables: {key: "8", originals_key: netflix, weight: 160} template: [name: standard, name: mdb_streaming] Prime: - variables: {key: amazon, weight: 150} + variables: {key: "9", originals_key: amazon, weight: 150} template: [name: standard, name: mdb_streaming] Disney: - variables: {key: disney, weight: 140} + variables: {key: "337", originals_key: disney, weight: 140} template: [name: standard, name: mdb_streaming] Max: - variables: {key: max, weight: 130} + variables: {key: "1899", originals_key: max, weight: 130} template: [name: standard, name: mdb_streaming] Crunchyroll: - variables: {key: crunchyroll, weight: 120, allowed_libraries: show} + variables: {key: "283", originals_key: crunchyroll, weight: 120, allowed_libraries: show} template: [name: standard, name: mdb_streaming] YouTube: - variables: {key: youtube, weight: 110} + variables: {key: "188", originals_key: youtube, weight: 110} template: [name: standard, name: mdb_streaming] Hulu: - variables: {key: hulu, weight: 100} + variables: {key: "15", originals_key: hulu, weight: 100} template: [name: standard, name: mdb_streaming] Paramount: - variables: {key: paramount, weight: 90} + variables: {key: "531", originals_key: paramount, weight: 90} template: [name: standard, name: mdb_streaming] AppleTV: - variables: {key: appletv, weight: 80} + variables: {key: "350", originals_key: appletv, weight: 80} template: [name: standard, name: mdb_streaming] Peacock: - variables: {key: peacock, weight: 70} + variables: {key: "387", originals_key: peacock, weight: 70} template: [name: standard, name: mdb_streaming] Showtime: - variables: {key: showtime, weight: 60} + variables: {key: "37", originals_key: showtime, weight: 60} template: [name: standard, name: mdb_streaming] discovery+: - variables: {key: discovery, weight: 58, allowed_libraries: show} + variables: {key: "510", originals_key: discovery, weight: 58, allowed_libraries: show} template: [name: standard, name: mdb_streaming] Crave: - variables: {key: crave, weight: 55} + variables: {key: "230", originals_key: crave, weight: 55} template: [name: standard, name: mdb_streaming] NOW: - variables: {key: now, weight: 50} + variables: {key: "39", originals_key: now, weight: 50} template: [name: standard, name: mdb_streaming] All 4: - variables: {key: all4, weight: 40} + variables: {key: "103", originals_key: all4, weight: 40} template: [name: standard, name: mdb_streaming] britbox: - variables: {key: britbox, weight: 30} + variables: {key: "151", originals_key: britbox, weight: 30} template: [name: standard, name: mdb_streaming] BET+: - variables: {key: bet, weight: 20} + variables: {key: "1759", originals_key: bet, weight: 20} template: [name: standard, name: mdb_streaming] hayu: - variables: {key: hayu, weight: 10, allowed_libraries: show} + variables: {key: "8", originals_key: hayu, weight: 10, allowed_libraries: show} template: [name: standard, name: mdb_streaming] \ No newline at end of file diff --git a/docs/defaults/both/streaming.md b/docs/defaults/both/streaming.md index 9ad342c1..2298dbbd 100644 --- a/docs/defaults/both/streaming.md +++ b/docs/defaults/both/streaming.md @@ -22,8 +22,8 @@ Supported Library Types: Movie, Show | `Crunchyroll Shows` | `crunchyroll` | Collection of Shows Streaming on Crunchyroll. | | `discovery+ Shows` | `discovery` | Collection of Shows Streaming on discovery+. | | `Disney+ Movies/Shows` | `disney` | Collection of Movies/Shows Streaming on Disney+. | -| `hayu Shows` | `hayu` | Collection of Shows Streaming on hayu. | | `Max Movies/Shows` | `max` | Collection of Movies/Shows Streaming on Max. | +| `Hayu Shows` | `hayu` | Collection of Shows Streaming on Hulu. | | `Hulu Movies/Shows` | `hulu` | Collection of Movies/Shows Streaming on Hulu. | | `Netflix Movies/Shows` | `netflix` | Collection of Movies/Shows Streaming on Netflix. | | `NOW Movies/Shows` | `now` | Collection of Movies/Shows Streaming on NOW. | @@ -31,18 +31,17 @@ Supported Library Types: Movie, Show | `Peacock Movies/Shows` | `peacock` | Collection of Movies/Shows Streaming on Peacock. | | `Prime Video Movies/Shows` | `amazon` | Collection of Movies/Shows Streaming on Prime Video. | | `Showtime Movies/Shows` | `showtime` | Collection of Movies/Shows Streaming on Showtime. | +| `YouTube Movies/Shows` | `youtube` | Collection of Movies/Shows Streaming on YouTube. | ## Regional Variants -Some logic is applied to allow for regional streaming service lists to be available to users depending on where they -are, as detailed below: +Some logic is applied for specific regions to prevent collections appearing which do not exist in said region. | Region | Key | Description | |:-----------------|:---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| -| any besides `us` | `amazon`, `disney`, `netflix` | These collections will use regional variant lists to ensure the lists populate with what is available in the region specified | -| any besides `uk` | `all4`, `britbox`, `hayu`, `now` | These collections will not be created if the region is not `uk` as these streaming services are UK-focused | -| any besides `ca` | `crave` | These collections will not be created if the region is not `ca` as these streaming services are Canada-focused | -| `ca` | `max`, `showtime` | These collections will not be created if the region is `ca` as these streaming services are part of the Crave streaming service in Canada | +| any besides `GB` | `all4`, `britbox`, `hayu`, `now` | These collections will not be created if the region is not `GB` as these streaming services are UK-focused | +| any besides `CA` | `crave` | These collections will not be created if the region is not `CA` as these streaming services are Canada-focused | +| `CA` | `max`, `showtime` | These collections will not be created if the region is `CA` as these streaming services are part of the Crave streaming service in Canada | ## Config @@ -79,14 +78,14 @@ work. Any value not specified will use its default value if it has one if not it | Variable | Description & Values | |:--------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| - | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.
**Values:** Number Greater than 0 | + | `region` | **Description:** Changes some Streaming Service lists to regional variants (see below table for more information.
**Default:** `us`
**Values:** Any [ISO 3166-1 Code](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) of the region where the streaming information should be based on. | + | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.
**Default:** `500`
**Values:** Number Greater than 0 | | `limit_<>`1 | **Description:** Changes the Builder Limit of the specified key's collection.
**Default:** `limit`
**Values:** Number Greater than 0 | | `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.
**Default:** `release.desc`
**Values:** [Any `smart_filter` Sort Option](../../files/builders/smart.md#sort-options) | | `sort_by_<>`1 | **Description:** Changes the Smart Filter Sort of the specified key's collection.
**Default:** `sort_by`
**Values:** [Any `smart_filter` Sort Option](../../files/builders/smart.md#sort-options) | | `sync_mode` | **Description:** Changes the Sync Mode for all collections in a Defaults file.
**Default:** `sync`
**Values:**
`sync`Add and Remove Items based on Builders
`append`Only Add Items based on Builders
| | `sync_mode_<>`1 | **Description:** Changes the Sync Mode of the specified key's collection.
**Default:** `sync_mode`
**Values:**
`sync`Add and Remove Items based on Builders
`append`Only Add Items based on Builders
| | `exclude` | **Description:** Exclude these Streaming Services from creating a Dynamic Collection.
**Values:** List of Streaming Service Keys | - | `region` | **Description:** Changes some Streaming Service lists to regional variants (see below table for more information.
**Default:** `us`
**Values:** `us`,`uk`,`ca`, `da`, `de`, `es`, `fr`, `it`, `pt-br` | | `originals_only` | **Description:** Changes Streaming Service lists to only show original content produced by the service.
**Note**: Cannot be used with `region`, and only produces collections for `amazon`, `appletv`, `disney`, `max`, `hulu`, `netflix`, `paramount`, `peacock`
**Default:** `false`
**Values:** `true`, `false` | | `name_format` | **Description:** Changes the title format of the Dynamic Collections.
**Default:** `<> <>s`
**Values:** Any string with `<>` in it. | | `summary_format` | **Description:** Changes the summary format of the Dynamic Collections.
**Default:** `<>s streaming on <>.`
**Values:** Any string. | @@ -118,7 +117,7 @@ work. Any value not specified will use its default value if it has one if not it collection_files: - pmm: streaming template_variables: - region: fr #(1)! + region: FR #(1)! sep_style: amethyst #(2)! visible_library_disney: true #(3)! visible_home_disney: true #(4)! @@ -128,7 +127,7 @@ work. Any value not specified will use its default value if it has one if not it sort_by: random #(8)! ``` - 1. Use French region lists where possible + 1. Use French region to determine streaming data from JustWatch/TMDb. 2. Use the amethyst [Separator Style](../separators.md#separator-styles) 3. Pin the "Disney+ Movies/Shows" collection to the Recommended tab of the library 4. Pin the "Disney+ Movies/Shows" collection to the home screen of the server owner diff --git a/docs/defaults/overlays/streaming.md b/docs/defaults/overlays/streaming.md index 84ce6199..35a35195 100644 --- a/docs/defaults/overlays/streaming.md +++ b/docs/defaults/overlays/streaming.md @@ -41,10 +41,9 @@ are, as detailed below: | Region | Key | Description | |:-----------------|:---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| -| any besides `us` | `amazon`, `disney`, `netflix` | These overlays will use regional variant lists to ensure the overlays are applied to what is available in the region specified | -| any besides `uk` | `all4`, `britbox`, `hayu`, `now` | These overlays will not be used if the region is not `uk` as these streaming services are UK-focused | -| any besides `ca` | `crave` | These overlays will not be used if the region is not `ca` as these streaming services are Canada-focused | -| `ca` | `max`, `showtime` | These overlays will not be used if the region is `ca` as these streaming services are part of the Crave streaming service in Canada | +| any besides `GB` | `all4`, `britbox`, `hayu`, `now` | These overlays will not be used if the region is not `uk` as these streaming services are UK-focused | +| any besides `CA` | `crave` | These overlays will not be used if the region is not `ca` as these streaming services are Canada-focused | +| `CA` | `max`, `showtime` | These overlays will not be used if the region is `ca` as these streaming services are part of the Crave streaming service in Canada | ## Config @@ -92,7 +91,7 @@ work. Any value not specified will use its default value if it has one if not it | Variable | Description & Values | |:-----------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| - | `region` | **Description:** Changes some Streaming Service lists to regional variants (see below table for more information.
**Default:** `us`
**Values:** `us`,`uk`,`ca`, `da`, `de`, `es`, `fr`, `it`, `pt-br` | + | `region` | **Description:** Changes some Streaming Service lists to regional variants (see below table for more information.
**Default:** `US`
**Values:** Any [ISO 3166-1 Code](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) of the region where the streaming information should be based on. | | `originals_only` | **Description:** Changes Streaming Service overlays to only apply to original content produced by the service.
**Note**: Cannot be used with `region`, and only produces overlays for `amazon`, `appletv`, `disney`, `max`, `hulu`, `netflix`, `paramount`, `peacock`
**Default:** `false`
**Values:** `true`, `false` | | `weight_<>`1 | **Description:** Controls the weight of the Overlay. Higher numbers have priority.
**Values:** Any Number |