From e730222921cab9f90c29bf96c0a979c4fb11c7e7 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 28 Mar 2024 09:08:28 -0400 Subject: [PATCH] [48] remove check_nightly --- VERSION | 2 +- config/config.yml.template | 1 - docs/config/settings.md | 28 -------- docs/files/overlays.md | 116 +++++++++++++++++++++---------- json-schema/config-schema.json | 4 -- json-schema/prototype_config.yml | 1 - modules/config.py | 4 +- modules/github.py | 5 +- modules/util.py | 4 +- modules/webhooks.py | 2 +- 10 files changed, 85 insertions(+), 82 deletions(-) diff --git a/VERSION b/VERSION index 64a084fa..0c206fa1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.20.0-develop47 +1.20.0-develop48 diff --git a/config/config.yml.template b/config/config.yml.template index c6b12f0e..e45d7a48 100644 --- a/config/config.yml.template +++ b/config/config.yml.template @@ -74,7 +74,6 @@ settings: playlist_report: false verify_ssl: true custom_repo: - check_nightly: false webhooks: # Can be individually specified per library as well error: version: diff --git a/docs/config/settings.md b/docs/config/settings.md index 393a2633..b8622159 100644 --- a/docs/config/settings.md +++ b/docs/config/settings.md @@ -988,34 +988,6 @@ The available setting attributes which can be set at each level are outlined bel verify_ssl: false ``` -??? blank "`check_nightly` - Will check nightly for updates instead of develop.ΒΆ" - -
Will check nightly for updates instead of develop. - - ???+ note - - This does not affect which version of PMM is grabbed when using `git pull` or any other update mechanism, it is - only used for the initial version check when PMM runs to specify if a new version is available. - - It is recommended to set this to `true` if you primarily use the `nightly` branch - -
- - **Attribute:** `check_nightly` - - **Levels with this Attribute:** Global - - **Accepted Values:** `true` or `false` - - **Default Value:** `false` - - ???+ example "Example" - - ```yaml - settings: - check_nightly: true - ``` - ## Default Values The below in an extract of the `config.yml.template` and is the initial values that are set if you follow any of the diff --git a/docs/files/overlays.md b/docs/files/overlays.md index 82a69288..1396d862 100644 --- a/docs/files/overlays.md +++ b/docs/files/overlays.md @@ -320,50 +320,92 @@ Note that we have built up on our backdrop overlay that we created in our previo You can use the item's metadata to determine the text by adding Special Text Variables to your text Overlay. -There are multiple Special Text Variables that can be used when formatting the text. The variables are defined like so `<>` and some can have modifiers like so `<>` where `$` is the modifier. The available options are: +Each Special Text Variables has multiple modifiers that can be used to format the text. The variables are defined like this `<>` where `name` is the Special Text Variable and the modifier is `$`. + +##### Special Rating Text + +| Variable | Description | Item Types | +|:------------------------------|:----------------------------------------|:--------------------------------------------| +| `audience_rating` | Plex Audience Rating | `Movies`, `Shows`, or `Episodes` | +| `critic_rating` | Plex Critic Rating | `Movies`, `Shows`, or `Episodes` | +| `user_rating` | Plex User Rating | `Movies`, `Shows`, `Seasons`, or `Episodes` | +| `tmdb_rating` | TMDb Rating | `Movies`, `Shows`, or `Episodes` | +| `imdb_rating` | IMDb Rating | `Movies`, `Shows`, or `Episodes` | +| `trakt_user_rating` | Trakt User Rating | `Movies` or `Shows` | +| `omdb_rating` | OMDb Rating | `Movies` or `Shows` | +| `mdb_rating` | MDbList Rating | `Movies` or `Shows` | +| `mdb_average_rating` | MDbList Average Rating | `Movies` or `Shows` | +| `mdb_imdb_rating` | MDbList IMDb Rating | `Movies` or `Shows` | +| `mdb_metacritic_rating` | MDbList Metacritic Rating | `Movies` or `Shows` | +| `mdb_metacriticuser_rating` | MDbList Metacritic User Rating | `Movies` or `Shows` | +| `mdb_trakt_rating` | MDbList Trakt Rating | `Movies` or `Shows` | +| `mdb_tomatoes_rating` | MDbList Rotten Tomatoes Rating | `Movies` or `Shows` | +| `mdb_tomatoesaudience_rating` | MDbList Rotten Tomatoes Audience Rating | `Movies` or `Shows` | +| `mdb_tmdb_rating` | MDbList TMDb Rating | `Movies` or `Shows` | +| `mdb_letterboxd_rating` | MDbList Letterboxd Rating | `Movies` or `Shows` | +| `mdb_myanimelist_rating` | MDbList MyAnimeList Rating | `Movies` or `Shows` | +| `anidb_rating` | AniDB Rating | `Movies` or `Shows` | +| `anidb_average_rating` | AniDB Average Rating | `Movies` or `Shows` | +| `anidb_score_rating` | AniDB Score Rating | `Movies` or `Shows` | +| `mal_rating` | MyAnimeList Rating | `Movies` or `Shows` | + +??? tip "Special Rating Text Modifiers" + + | Modifier | Description | Example | + |:--------:|:---------------------------------------------------|:-------------------------------------------| + | `None` | Rating on a 10 point scale | `8.7`, `9.0` | + | `%` | Rating out of 100 | `87`, `90` | + | `#` | Rating on a 10 point scale removing `.0` as needed | `8.7`, `9` | + | `/` | Rating on a 5 point scale | `8.6` shows as `4.3`, `9.0` shows as `4.5` | + +##### Special String Text + +| Variable | Description | Item Types | +|:-----------------|:---------------------------|:--------------------------------------------| +| `title` | Item's Title | `Movies`, `Shows`, `Seasons`, or `Episodes` | +| `show_title` | Item's Parent Show Title | `Seasons` or `Episodes` | +| `season_title` | Item's Parent Season Title | `Episodes` | +| `original_title` | Item's Original Title | `Movies` or `Shows` | +| `edition` | Item's Edition | `Movies` | +| `content_rating` | Item's Content Rating | `Movies`, `Shows`, or `Episodes` | + +??? tip "Special String Text Modifiers" + + | Modifier | Description | + |:--------:|:---------------------------------------| + | `None` | Exact Text | + | `U` | Text with the first letter Capitalized | + | `L` | Text with the first letter Lowercase | + | `P` | Text with most words Capitalized | + +##### Special Number Text + +| Variable | Description | Item Types | +|:-----------------|:-------------------------------|:------------------------| +| `episode_count` | Number of Episodes | `Shows` or `Seasons` | +| `season_number` | Season Number | `Seasons` or `Episodes` | +| `episode_number` | Episode Number | `Episodes` | +| `versions` | Number of Versions of the Item | `Movies` or `Episodes` | + +??? tip "Special Number Text Modifiers" + + | Modifier | Description | Example | + |:--------:|:--------------------------|:-------:| + | `None` | Exact Number | `1` | + | `W` | Number as Words | `One` | + | `WU` | Number as Uppercase Words | `ONE` | + | `WL` | Number as Lowercase Words | `one` | + | `0` | Number with 10s Padding | `01` | + | `00` | Number with 100s Padding | `001` | + +##### Other Special Text | Special Text Variables & Mods | Item Types | |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------| -| `<>`: audience rating (`8.7`, `9.0`)
`<>`: audience rating out of 100 (`87`, `90`)
`<>`: audience rating removing `.0` as needed (`8.7`, `9`)
`<>`: audience rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies`, `Shows`, or `Episodes` | -| `<>`: critic rating (`8.7`, `9.0`)
`<>`: critic rating out of 100 (`87`, `90`)
`<>`: critic rating removing `.0` as needed (`8.7`, `9`)
`<>`: critic rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies`, `Shows`, or `Episodes` | -| `<>`: user rating (`8.7`, `9.0`)
`<>`: user rating out of 100 (`87`, `90`)
`<>`: user rating removing `.0` as needed (`8.7`, `9`)
`<>`: user rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies`, `Shows`, `Seasons`, or `Episodes` | -| `<>`: TMDb rating (`8.7`, `9.0`)
`<>`: TMDb rating out of 100 (`87`, `90`)
`<>`: TMDb rating removing `.0` as needed (`8.7`, `9`)
`<>`: TMDb rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies`, `Shows`, or `Episodes` | -| `<>`: IMDb rating (`8.7`, `9.0`)
`<>`: IMDb rating out of 100 (`87`, `90`)
`<>`: IMDb rating removing `.0` as needed (`8.7`, `9`)
`<>`: IMDb rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies`, `Shows`, or `Episodes` | -| `<>`: Trakt User rating (`8.7`, `9.0`)
`<>`: Trakt User rating out of 100 (`87`, `90`)
`<>`: Trakt User rating removing `.0` as needed (`8.7`, `9`)
`<>`: Trakt User rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: OMDb rating (`8.7`, `9.0`)
`<>`: OMDb rating out of 100 (`87`, `90`)
`<>`: OMDb rating removing `.0` as needed (`8.7`, `9`)
`<>`: OMDb rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList rating (`8.7`, `9.0`)
`<>`: MDbList rating out of 100 (`87`, `90`)
`<>`: MDbList rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList Average rating (`8.7`, `9.0`)
`<>`: MDbList Average rating out of 100 (`87`, `90`)
`<>`: MDbList Average rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList Average rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList IMDb rating (`8.7`, `9.0`)
`<>`: MDbList IMDb rating out of 100 (`87`, `90`)
`<>`: MDbList IMDb rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList IMDb rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList Metacritic rating (`8.7`, `9.0`)
`<>`: MDbList Metacritic rating out of 100 (`87`, `90`)
`<>`: MDbList Metacritic rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList Metacritic rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList Metacritic User rating (`8.7`, `9.0`)
`<>`: MDbList Metacritic User rating out of 100 (`87`, `90`)
`<>`: MDbList Metacritic User rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList Metacritic User rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList Trakt rating (`8.7`, `9.0`)
`<>`: MDbList Trakt rating out of 100 (`87`, `90`)
`<>`: MDbList Trakt rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList Trakt rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList Rotten Tomatoes rating (`8.7`, `9.0`)
`<>`: MDbList Rotten Tomatoes rating out of 100 (`87`, `90`)
`<>`: MDbList Rotten Tomatoes rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList Rotten Tomatoes rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList Rotten Tomatoes Audience rating (`8.7`, `9.0`)
`<>`: MDbList Rotten Tomatoes Audience rating out of 100 (`87`, `90`)
`<>`: MDbList Rotten Tomatoes Audience rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList Rotten Tomatoes Audience rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList TMDb rating (`8.7`, `9.0`)
`<>`: MDbList TMDb rating out of 100 (`87`, `90`)
`<>`: MDbList TMDb rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList TMDb rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList Letterboxd rating (`8.7`, `9.0`)
`<>`: MDbList Letterboxd rating out of 100 (`87`, `90`)
`<>`: MDbList Letterboxd rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList Letterboxd rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MDbList MyAnimeList rating (`8.7`, `9.0`)
`<>`: MDbList MyAnimeList rating out of 100 (`87`, `90`)
`<>`: MDbList MyAnimeList rating removing `.0` as needed (`8.7`, `9`)
`<>`: MDbList MyAnimeList rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: AniDB rating (`8.7`, `9.0`)
`<>`: AniDB rating out of 100 (`87`, `90`)
`<>`: AniDB rating removing `.0` as needed (`8.7`, `9`)
`<>`: AniDB rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: AniDB Average rating (`8.7`, `9.0`)
`<>`: AniDB Average rating out of 100 (`87`, `90`)
`<>`: AniDB Average rating removing `.0` as needed (`8.7`, `9`)
`<>`: AniDB Average rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: AniDB Score rating (`8.7`, `9.0`)
`<>`: AniDB Score rating out of 100 (`87`, `90`)
`<>`: AniDB Score rating removing `.0` as needed (`8.7`, `9`)
`<>`: AniDB Score rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: MyAnimeList rating (`8.7`, `9.0`)
`<>`: MyAnimeList rating out of 100 (`87`, `90`)
`<>`: MyAnimeList rating removing `.0` as needed (`8.7`, `9`)
`<>`: MyAnimeList rating on a 5 point scale (`8.6` shows as `4.3`) | `Movies` or `Shows` | -| `<>`: Title of the Item<br>`<<titleU>>`: Uppercase Title of the Item<br>`<<titleL>>`: Lowercase Title of the Item<br>`<<titleP>>`: Proper Title of the Item | `Movies`, `Shows`, `Seasons`, or `Episodes` | -| `<<show_title>>`: Title of the Item's Show<br>`<<show_itleU>>`: Uppercase Title of the Item's Show<br>`<<show_titleL>>`: Lowercase Title of the Item's Show<br>`<<show_titleP>>`: Proper Title of the Item's Show | `Seasons` or `Episodes` | -| `<<season_title>>`: Title of the Item's Season<br>`<<season_titleU>>`: Uppercase Title of the Item's Season<br>`<<season_titleL>>`: Lowercase title of the Item's Season<br>`<<season_titleP>>`: Proper title of the Item's Season | `Episodes` | -| `<<original_title>>`: Original Title of the Item<br>`<<original_titleU>>`: Original Title of the Item<br>`<<original_titleL>>`: Lowercase Original Title of the Item<br>`<<original_titleP>>`: Proper Original Title of the Item | `Movies` or `Shows` | -| `<<edition>>`: Edition of the Item<br>`<<editionU>>`: Uppercase Edition of the Item<br>`<<editionL>>`: Lowercase Edition of the Item<br>`<<editionP>>`: Proper Edition of the Item | `Movies` | -| `<<content_rating>>`: Content Rating of the Item<br>`<<content_ratingU>>`: Uppercase Content Rating of the Item<br>`<<content_ratingL>>`: Lowercase Content Rating of the Item<br>`<<content_ratingP>>`: Proper Content Rating of the Item | `Movies`, `Shows`, or `Episodes` | -| `<<episode_count>>`: Number of Episodes (`1`)<br>`<<episode_countW>>`: Number of Episodes As Words (`One`)<br>`<<episode_countWU>>`: Number of Episodes As Uppercase Words (`ONE`)<br>`<<episode_countWL>>`: Number of Episodes As Lowercase Words (`one`)<br>`<<episode_count0>>`: Number of Episodes With 10s Padding (`01`)<br>`<<episode_count00>>`: Number of Episodes With 100s Padding (`001`) | `Shows` or `Seasons` | -| `<<season_number>>`: Season Number (`1`)<br>`<<season_numberW>>`: Season Number As Words (`One`)<br>`<<season_numberWU>>`: Season Number As Uppercase Words (`ONE`)<br>`<<season_numberWL>>`: Season Number As Lowercase Words (`one`)<br>`<<season_number0>>`: Season Number With 10s Padding (`01`)<br>`<<season_number00>>`: Season Number With 100s Padding (`001`) | `Seasons` or `Episodes` | -| `<<episode_number>>`: Episode Number (`1`)<br>`<<episode_numberW>>`: Episode Number As Words (`One`)<br>`<<episode_numberWU>>`: Episode Number As Uppercase Words (`One`)<br>`<<episode_numberWL>>`: Episode Number As Lowercase Words (`one`)<br>`<<episode_number0>>`: Episode Number With 10s Padding (`01`)<br>`<<episode_number00>>`: Episode Number With 100s Padding (`001`) | `Episodes` | -| `<<versions>>`: Number of Versions of the Item (`1`)<br>`<<versionsW>>`: Number of Versions of the Item As Words (`One`)<br>`<<versionsWO>>`: Number of Versions of the Item As Uppercase Words (`ONE`)<br>`<<versionsWL>>`: Number of Versions of the Item As Words (`one`)<br>`<<versions0>>`: Number of Versions of the Item With 10s Padding (`01`)<br>`<<versions00>>`: Number of Versions of the Item With 100s Padding (`001`) | `Movies` or `Episodes` | | `<<runtime>>`: Complete Runtime of the Item in minutes (`150`)<br>`<<runtimeH>>`: Hours in runtime of the Item (`2`)<br>`<<runtimeM>>`: Minutes remaining in the hour in the runtime of the Item (`30`)<br>**Show and Season use average Episode Runtime.** | `Movies`, `Shows`, `Seasons`, or `Episodes` | | `<<bitrate>>`: Bitrate of the first media file for an item.<br>`<<bitrateH>>`: Bitrate of the media file with the highest bitrate<br>`<<bitrateL>>`: Bitrate of the media file with the lowest bitrate | `Movies` or `Episodes` | | `<<originally_available>>`: Original Available Date of the Item<br>`<<originally_available[FORMAT]>>`: Original Available Date of the Item in the given format. [Format Options](https://strftime.org/) | `Movies`, `Shows`, or `Episodes` | -???+ tip - - You can use the `mass_audience_rating_update` or `mass_critic_rating_update` [Library Operation](../config/operations.md) to update your plex ratings to various services like `tmdb`, `imdb`, `mdb`, `metacritic`, `letterboxd` and many more. - ```yaml overlays: backdrop: diff --git a/json-schema/config-schema.json b/json-schema/config-schema.json index 7e8c698a..912beb92 100644 --- a/json-schema/config-schema.json +++ b/json-schema/config-schema.json @@ -895,10 +895,6 @@ "type": "string" } ] - }, - "check_nightly": { - "description": "Will check nightly for updates instead of develop.", - "type": "boolean" } }, "required": [ diff --git a/json-schema/prototype_config.yml b/json-schema/prototype_config.yml index d34295fd..695d8f6c 100644 --- a/json-schema/prototype_config.yml +++ b/json-schema/prototype_config.yml @@ -435,7 +435,6 @@ settings: playlist_report: false verify_ssl: true custom_repo: - check_nightly: false webhooks: # Can be individually specified per library as well error: version: diff --git a/modules/config.py b/modules/config.py index 7fb74d15..f9b847e1 100644 --- a/modules/config.py +++ b/modules/config.py @@ -460,7 +460,6 @@ class ConfigFile: "playlist_report": check_for_attribute(self.data, "playlist_report", parent="settings", var_type="bool", default=True), "verify_ssl": check_for_attribute(self.data, "verify_ssl", parent="settings", var_type="bool", default=True), "custom_repo": check_for_attribute(self.data, "custom_repo", parent="settings", default_is_none=True), - "check_nightly": check_for_attribute(self.data, "check_nightly", parent="settings", var_type="bool", default=False), "assets_for_all": check_for_attribute(self.data, "assets_for_all", parent="settings", var_type="bool", default=False, save=False, do_print=False) } self.custom_repo = None @@ -469,8 +468,7 @@ class ConfigFile: if "https://github.com/" in repo: repo = repo.replace("https://github.com/", "https://raw.githubusercontent.com/").replace("/tree/", "/") self.custom_repo = repo - self.check_nightly = self.general["check_nightly"] - self.latest_version = util.current_version(self.version, branch=self.branch, nightly=self.check_nightly) + self.latest_version = util.current_version(self.version, branch=self.branch) add_operations = True if "operations" not in self.general["run_order"] else False add_metadata = True if "metadata" not in self.general["run_order"] else False diff --git a/modules/github.py b/modules/github.py index 80b5c66b..a14995c6 100644 --- a/modules/github.py +++ b/modules/github.py @@ -77,10 +77,7 @@ class GitHub: def configs_url(self): if self._configs_url is None: self._configs_url = f"{configs_raw_url}/master/" - if self.config.version[1] in self.config_tags and ( - self.config.latest_version[1] != self.config.version[1] - or (not self.config.check_nightly and 0 <= self.config.version[2] <= util.get_develop()[2]) - ): + if self.config.version[1] in self.config_tags and (self.config.latest_version[1] != self.config.version[1] or self.config.branch == "master"): self._configs_url = f"{configs_raw_url}/v{self.config.version[1]}/" return self._configs_url diff --git a/modules/util.py b/modules/util.py index a318b6e1..045ea900 100644 --- a/modules/util.py +++ b/modules/util.py @@ -122,8 +122,8 @@ def guess_branch(version, env_version, git_branch): else: return "master" -def current_version(version, branch=None, nightly=False): - if nightly or branch == "nightly": +def current_version(version, branch=None): + if branch == "nightly": return get_nightly() elif branch == "develop": return get_develop() diff --git a/modules/webhooks.py b/modules/webhooks.py index d304f79c..0edf3171 100644 --- a/modules/webhooks.py +++ b/modules/webhooks.py @@ -83,7 +83,7 @@ class Webhooks: if version[1] != latest_version[1]: notes = self.config.GitHub.latest_release_notes() elif version[2] and version[2] < latest_version[2]: - notes = self.config.GitHub.get_commits(version[2], nightly=self.config.check_nightly) + notes = self.config.GitHub.get_commits(version[2], nightly=self.config.branch == "nightly") self._request(self.version_webhooks, {"event": "version", "current": version[0], "latest": latest_version[0], "notes": notes}) def end_time_hooks(self, start_time, end_time, run_time, stats):