diff --git a/defaults/overlays/images/streaming/Crave.png b/defaults/overlays/images/streaming/Crave.png new file mode 100644 index 00000000..eb5d48aa Binary files /dev/null and b/defaults/overlays/images/streaming/Crave.png differ diff --git a/defaults/overlays/images/streaming/discovery.png b/defaults/overlays/images/streaming/discovery.png new file mode 100644 index 00000000..745f4502 Binary files /dev/null and b/defaults/overlays/images/streaming/discovery.png differ diff --git a/defaults/overlays/streaming.yml b/defaults/overlays/streaming.yml index bb869f13..8348c0b1 100644 --- a/defaults/overlays/streaming.yml +++ b/defaults/overlays/streaming.yml @@ -9,6 +9,10 @@ external_templates: pmm: templates template_variables: + allowed_library_types: + - <>>> + - <>>> + - <> group: streaming default: horizontal_align: left @@ -38,72 +42,121 @@ external_templates: pmm: streaming/<> templates: - streaming: + mdb_streaming: + allowed_library_types: + - <> ignore_blank_results: true - mdblist_list: https://mdblist.com/lists/plexmetamanager/<>-<>s + mdblist_list: https://mdblist.com/lists/plexmetamanager/<>-<>s<> + conditionals: + allowed_streaming: + conditions: + - region.not: uk + key: [all4, britbox, hayu, now] + value: False + - region.not: ca + key: [crave] + value: False + - region: ca + key: [hbomax, showtime] + value: False + watch_region: + default: "" + conditions: + - 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" overlays: Netflix: variables: {key: netflix, weight: 160} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] Prime: variables: {key: amazon, weight: 150} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] Disney: variables: {key: disney, weight: 140} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] HBO-Max: variables: {key: hbomax, weight: 130} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] Crunchyroll: variables: {key: crunchyroll, weight: 120, allowed_libraries: show} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] YouTube: variables: {key: youtube, weight: 110} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] Hulu: variables: {key: hulu, weight: 100} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] Paramount: variables: {key: paramount, weight: 90} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] AppleTV: variables: {key: appletv, weight: 80} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] Peacock: variables: {key: peacock, weight: 70} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] Showtime: variables: {key: showtime, weight: 60} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] + + discovery+: + variables: {key: discovery, weight: 58, allowed_libraries: show} + template: [name: standard, name: mdb_streaming] + + Crave: + variables: {key: crave, weight: 55} + template: [name: standard, name: mdb_streaming] NOW: variables: {key: now, weight: 50} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] All 4: variables: {key: all4, weight: 40} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] britbox: variables: {key: britbox, weight: 30} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] BET+: variables: {key: bet, weight: 20} - template: [name: standard, name: streaming] + template: [name: standard, name: mdb_streaming] hayu: - variables: {key: hayu, weight: 10} - template: [name: standard, name: streaming] + variables: {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/universe.md b/docs/defaults/both/universe.md index 10b1ce0f..6deb3d7e 100644 --- a/docs/defaults/both/universe.md +++ b/docs/defaults/both/universe.md @@ -2,8 +2,6 @@ The `universe` Default Metadata File is used to create collections based on popular Movie universes (such as the Marvel Cinematic Universe or Wizarding World). -This Default file requires [Trakt Authentication](../../config/trakt) - ![](../images/universe.png) ## Requirements & Recommendations diff --git a/docs/defaults/overlays/streaming.md b/docs/defaults/overlays/streaming.md index 3bb5f505..5c89e172 100644 --- a/docs/defaults/overlays/streaming.md +++ b/docs/defaults/overlays/streaming.md @@ -10,24 +10,27 @@ Supported Overlay Level: Movie, Show ## Supported Streaming Services -| Streaming Service | Key | Weight | -|:------------------|:--------------|:-------| -| Netflix | `netflix` | `160` | -| Prime Video | `amazon` | `150` | -| Disney+ | `disney` | `140` | -| HBO Max | `hbomax` | `130` | -| Crunchyroll | `Crunchyroll` | `120` | -| YouTube | `youtube` | `110` | -| Hulu | `hulu` | `100` | -| Paramount+ | `paramount` | `90` | -| AppleTV | `appletv` | `80` | -| Peacock | `peacock` | `70` | -| Showtime | `showtime` | `60` | -| NOW | `now` | `50` | -| All 4 | `all4` | `40` | -| britbox | `britbox` | `30` | -| BET+ | `bet` | `20` | -| hayu | `hayu` | `10` | + +| Streaming Service | Key | Weight | +|:------------------|:---------------|:-------| +| Netflix | `netflix` | `160` | +| Prime Video | `amazon` | `150` | +| Disney+ | `disney` | `140` | +| HBO Max | `hbomax` | `130` | +| Crunchyroll | `Crunchyroll` | `120` | +| YouTube | `youtube` | `110` | +| Hulu | `hulu` | `100` | +| Paramount+ | `paramount` | `90` | +| AppleTV | `appletv` | `80` | +| Peacock | `peacock` | `70` | +| Showtime | `showtime` | `60` | +| discovery+ | `discovery` | `58` | +| Crave | `crave` | `55` | +| NOW | `now` | `50` | +| All 4 | `all4` | `40` | +| britbox | `britbox` | `30` | +| BET+ | `bet` | `20` | +| hayu | `hayu` | `10` | ## Config @@ -69,6 +72,17 @@ All [Shared Overlay Variables](../overlay_variables) are available with the defa 1. Each default overlay has a `key` that when calling to effect a specific collection you must replace `<>` with when calling. +## 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: + +| 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` | `hbomax`, `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 | + The below is an example config.yml extract with some Template Variables added in to change how the file works. ```yaml @@ -77,6 +91,7 @@ libraries: overlay_path: - pmm: streaming template_variables: + region: ca use_peacock: false use_youtube: false weight_youtube: 5 diff --git a/docs/metadata/details/schedule.md b/docs/metadata/details/schedule.md index 417a1618..c0dade2f 100644 --- a/docs/metadata/details/schedule.md +++ b/docs/metadata/details/schedule.md @@ -1,8 +1,32 @@ # Schedule Setting -The script is designed to run continuously and certain attributes can be scheduled using these attributes. +Plex Meta Manager allows you to schedule certain libraries/files so that runs can be tailored to suit your needs. + +This is particularly handy for users who have a lot of libraries or run a lot of Metadata/Operations on their libraries. + +The scheduling options are: + +| Name | Description | Format | Example | +|:-------------|:-------------------------------------------------------------------------------------------------|:----------------------|:----------------------------------| +| Hourly | Update only when the script is run in that hour | hourly(Hour of Day) | `hourly(17)` | +| Daily | Update once a day | daily | `daily` | +| Weekly | Update once a week on the specified day | weekly(Day of Week) | `weekly(sunday)` | +| Monthly | Update once a month on the specified day | monthly(Day of Month) | `monthly(1)` | +| Yearly | Update once a year on the specified day | yearly(MM/DD) | `yearly(01/30)` | +| Range | Updates whenever the date is within the range | range(MM/DD-MM/DD) | `range(12/01-12/31)` | +| Never | Never updates | never | `never` | +| Non Existing | Updates if it doesn't exist | non_existing | `non_existing` | +| All | Requires that all comma separated scheduling options inside its brackets be meet in order to run | all[Options] | `all[weekly(sunday), hourly(17)]` | + +* `daily` is the default when `schedule` is not specified. +* You can run the script multiple times per day but using the `--time` command line argument detailed on the [Run Commands & Environmental Variables Page](../../home/environmental.md#time-to-run). +* You can have multiple scheduling options as a list. +* You can use the `delete_not_scheduled` setting to delete Collections that are skipped due to not being scheduled. + +## Examples + +Below is an example of a library which has been scheduled to run every Sunday. This will schedule everything within the library (in this case Metadata files and Operations) for the same day. -Below is an example of a scheduled library: ```yaml libraries: @@ -18,9 +42,9 @@ libraries: mass_critic_rating_update: tmdb ``` -Below is an example of scheduling Metadata Files, Playlist Files, and Overlay Files: +Metadata Files, Playlist Files, and Overlay Files can all be individually scheduled, as seen below where different files are scheduled to run on each day of the week: -**Note: Overlay Files cannot be individually Scheduled.** +**Note: Overlay Files cannot be individually Scheduled, all Overlay Files must be scheduled for the same period.** ```yaml libraries: @@ -30,7 +54,7 @@ libraries: schedule: weekly(monday) - pmm: imdb schedule: weekly(tuesday) - - pmm: studio + - folder: config/Movies/ schedule: weekly(wednesday) - pmm: genre schedule: weekly(thursday) @@ -44,11 +68,9 @@ libraries: playlist_files: - file: config/Playlists.yml schedule: weekly(sunday) - - file: config/Playlists2.yml - schedule: weekly(monday) ``` -Below is an example of a scheduled collection: +Below is an example of a collection which has been scheduled to run on a Sunday. In this scenario, if you run PMM on a Monday, this collection will be skipped but any other collections which do not have a scheduled defined will be run. ```yaml collections: @@ -64,7 +86,7 @@ collections: - monthly(15) ``` -Below is an example of a scheduled pinning collection: +You can also schedule items to be "pinned" to your homescreen on a schedule. For example, this collection will be pinned to your homescreen for the month of December and on January 1st will no longer be pinned (you must run PMM on 1st January for the removal of the pin to happen) ```yaml collections: @@ -74,21 +96,25 @@ collections: visible_home: range(12/01-12/31) ``` -The scheduling options are: - -| Name | Description | Format | Example | -|:-------------|:-------------------------------------------------------------------------------------------------|:----------------------|:----------------------------------| -| Hourly | Update only when the script is run in that hour | hourly(Hour of Day) | `hourly(17)` | -| Daily | Update once a day | daily | `daily` | -| Weekly | Update once a week on the specified day | weekly(Day of Week) | `weekly(sunday)` | -| Monthly | Update once a month on the specified day | monthly(Day of Month) | `monthly(1)` | -| Yearly | Update once a year on the specified day | yearly(MM/DD) | `yearly(01/30)` | -| Range | Updates whenever the date is within the range | range(MM/DD-MM/DD) | `range(12/01-12/31)` | -| Never | Never updates | never | `never` | -| Non Existing | Updates if it doesn't exist | non_existing | `non_existing` | -| All | Requires that all comma separated scheduling options inside its brackets be meet in order to run | all[Options] | `all[weekly(sunday), hourly(17)]` | - -* `daily` is the default when `schedule` is not specified. -* You can run the script multiple times per day but using the `--time` command line argument detailed on the [Run Commands & Environmental Variables Page](../../home/environmental.md#time-to-run). -* You can have multiple scheduling options as a list. -* You can use the `delete_not_scheduled` setting to delete Collections that are skipped due to not being scheduled. +Whilst it isn't possible to schedule individual Operations, you can create additional placeholder library names and point them to the original library using `library_name`. This can be used to achieve individually scheduled operations, as seen below: +```yaml +libraries: + Movies: + metadata_path: + - file: config/Movies.yml + Movies Operations (Monday): # Name doesn't matter + library_name: Movies # Must match your library name in Plex + schedule: weekly(monday) + operations: + mass_user_rating_update: imdb + Movies Operations (Wednesday): # Name doesn't matter + library_name: Movies # Must match your library name in Plex + schedule: weekly(wednesday) + operations: + mass_audience_rating_update: tmdb + Movies Operations (Friday): # Name doesn't matter + library_name: Movies # Must match your library name in Plex + schedule: weekly(friday) + operations: + mass_critic_rating_update: trakt +```