From 12cdc11670bdf8512da703e7f0590a93c2266001 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 13 Sep 2022 11:36:42 -0400 Subject: [PATCH] [18] add overlay title mods --- VERSION | 2 +- docs/home/guides/defaults.md | 6 ------ docs/metadata/overlay.md | 10 +++++----- modules/overlay.py | 10 +++++----- modules/overlays.py | 6 ++++++ modules/plex.py | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/VERSION b/VERSION index 06a1de1d..c89220d8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.3-develop17 +1.17.3-develop18 diff --git a/docs/home/guides/defaults.md b/docs/home/guides/defaults.md index 33454631..d268398c 100644 --- a/docs/home/guides/defaults.md +++ b/docs/home/guides/defaults.md @@ -600,12 +600,6 @@ libraries: template_variables: overlay_level: season - git: PMM/overlays/streaming - - git: PMM/overlays/streaming - template_variables: - overlay_level: episode - - git: PMM/overlays/streaming - template_variables: - overlay_level: season - git: PMM/overlays/video_format - git: PMM/overlays/video_format template_variables: diff --git a/docs/metadata/overlay.md b/docs/metadata/overlay.md index 2b6d7876..e8487c13 100644 --- a/docs/metadata/overlay.md +++ b/docs/metadata/overlay.md @@ -180,11 +180,11 @@ There are multiple Special Text Variables that can be used when formatting the t | `<>`: 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`) | ✅ | ✅ | ❌ | ✅ | | `<>`: 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`) | ✅ | ✅ | ❌ | ✅ | | `<>`: 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`) | ✅ | ✅ | ✅ | ✅ | -| `<>`: Title of the Item | ✅ | ✅ | ✅ | ✅ | -| `<<show_title>>`: Title of the Item's Show | ❌ | ❌ | ✅ | ✅ | -| `<<season_title>>`: Title of the Item's Season | ❌ | ❌ | ❌ | ✅ | -| `<<original_title>>`: Original Title of the Item | ✅ | ✅ | ❌ | ❌ | -| `<<content_rating>>`: Content Rating of the Item | ✅ | ✅ | ❌ | ✅ | +| `<<title>>`: Title of the Item<br>`<<titleU>>`: Uppercase Title of the Item<br>`<<titleL>>`Lowercase Title of the Item<br>`<<titleT>>`Proper Title of the Item | ✅ | ✅ | ✅ | ✅ | +| `<<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_titleT>>`Proper Title of the Item's Show | ❌ | ❌ | ✅ | ✅ | +| `<<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_titleT>>`Proper title of the Item's Season | ❌ | ❌ | ❌ | ✅ | +| `<<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_titleT>>`Proper Original Title of the Item | ✅ | ✅ | ❌ | ❌ | +| `<<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_ratingT>>`Proper Content Rating of the Item | ✅ | ✅ | ❌ | ✅ | | `<<episode_count>>`: Number of Episodes (`1`)<br>`<<episode_countW>>`: Number of Episodes As Words (`One`)<br>`<<episode_count0>>`: Number of Episodes With 10s Padding (`01`)<br>`<<episode_count00>>`: Number of Episodes With 100s Padding (`001`) | ❌ | ✅ | ✅ | ❌ | | `<<season_number>>`: Season Number (`1`)<br>`<<season_numberW>>`: Season Number As Words (`One`)<br>`<<season_number0>>`: Season Number With 10s Padding (`01`)<br>`<<season_number00>>`: Season Number With 100s Padding (`001`) | ❌ | ❌ | ✅ | ✅ | | `<<episode_number>>`: Episode Number (`1`)<br>`<<episode_numberW>>`: Episode Number As Words (`One`)<br>`<<episode_number0>>`: Episode Number With 10s Padding (`01`)<br>`<<episode_number00>>`: Episode Number With 100s Padding (`001`) | ❌ | ❌ | ❌ | ✅ | diff --git a/modules/overlay.py b/modules/overlay.py index d887a58e..7232a81a 100644 --- a/modules/overlay.py +++ b/modules/overlay.py @@ -23,11 +23,11 @@ types_for_var = { "episode": ["season_title", "episode_number"] } var_mods = { - "title": [""], - "content_rating": [""], - "original_title": [""], - "show_title": [""], - "season_title": [""], + "title": ["", "U", "L", "T"], + "content_rating": ["", "U", "L", "T"], + "original_title": ["", "U", "L", "T"], + "show_title": ["", "U", "L", "T"], + "season_title": ["", "U", "L", "T"], "user_rating": ["", "%", "#", "/"], "critic_rating": ["", "%", "#", "/"], "audience_rating": ["", "%", "#", "/"], diff --git a/modules/overlays.py b/modules/overlays.py index 9cfb95c9..62cd877f 100644 --- a/modules/overlays.py +++ b/modules/overlays.py @@ -255,6 +255,12 @@ class Overlays: final_value = f"{int(actual_value):03}" elif mod == "/": final_value = f"{int(actual_value) / 2:.2f}" + elif mod == "U": + final_value = str(actual_value).upper() + elif mod == "L": + final_value = str(actual_value).lower() + elif mod == "U": + final_value = str(actual_value).title() else: final_value = actual_value if sub_value: diff --git a/modules/plex.py b/modules/plex.py index d76fc002..de76184c 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -815,7 +815,7 @@ class Plex(Library): libtype = "movie" else: libtype = "show" - watchlist = self.PlexServer.myPlexAccount().watchlist(sort=watchlist_sorts[sort], libtype=libtype) + watchlist = self.account.watchlist(sort=watchlist_sorts[sort], libtype=libtype) ids = [] for item in watchlist: tmdb_id = []