mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-22 12:33:10 +00:00
[19] fix overlay title mods
This commit is contained in:
parent
12cdc11670
commit
976a27d6b7
4 changed files with 17 additions and 15 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.17.3-develop18
|
||||
1.17.3-develop19
|
||||
|
|
|
@ -180,11 +180,11 @@ There are multiple Special Text Variables that can be used when formatting the t
|
|||
| `<<audience_rating>>`: audience rating (`8.7`, `9.0`)<br>`<<audience_rating%>>`: audience rating out of 100 (`87`, `90`)<br>`<<audience_rating#>>`: audience rating removing `.0` as needed (`8.7`, `9`)<br>`<<audience_rating/>>`: audience rating on a 5 point scale (`8.6` shows as `4.3`) | ✅ | ✅ | ❌ | ✅ |
|
||||
| `<<critic_rating>>`: critic rating (`8.7`, `9.0`)<br>`<<critic_rating%>>`: critic rating out of 100 (`87`, `90`)<br>`<<critic_rating#>>`: critic rating removing `.0` as needed (`8.7`, `9`)<br>`<<critic_rating/>>`: critic rating on a 5 point scale (`8.6` shows as `4.3`) | ✅ | ✅ | ❌ | ✅ |
|
||||
| `<<user_rating>>`: user rating (`8.7`, `9.0`)<br>`<<user_rating%>>`: user rating out of 100 (`87`, `90`)<br>`<<user_rating#>>`: user rating removing `.0` as needed (`8.7`, `9`)<br>`<<user_rating/>>`: user rating on a 5 point scale (`8.6` shows as `4.3`) | ✅ | ✅ | ✅ | ✅ |
|
||||
| `<<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 | ✅ | ✅ | ❌ | ✅ |
|
||||
| `<<title>>`: 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 | ✅ | ✅ | ✅ | ✅ |
|
||||
| `<<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 | ❌ | ❌ | ✅ | ✅ |
|
||||
| `<<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 | ❌ | ❌ | ❌ | ✅ |
|
||||
| `<<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 | ✅ | ✅ | ❌ | ❌ |
|
||||
| `<<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 | ✅ | ✅ | ❌ | ✅ |
|
||||
| `<<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`) | ❌ | ❌ | ❌ | ✅ |
|
||||
|
|
|
@ -23,11 +23,11 @@ types_for_var = {
|
|||
"episode": ["season_title", "episode_number"]
|
||||
}
|
||||
var_mods = {
|
||||
"title": ["", "U", "L", "T"],
|
||||
"content_rating": ["", "U", "L", "T"],
|
||||
"original_title": ["", "U", "L", "T"],
|
||||
"show_title": ["", "U", "L", "T"],
|
||||
"season_title": ["", "U", "L", "T"],
|
||||
"title": ["", "U", "L", "P"],
|
||||
"content_rating": ["", "U", "L", "P"],
|
||||
"original_title": ["", "U", "L", "P"],
|
||||
"show_title": ["", "U", "L", "P"],
|
||||
"season_title": ["", "U", "L", "P"],
|
||||
"user_rating": ["", "%", "#", "/"],
|
||||
"critic_rating": ["", "%", "#", "/"],
|
||||
"audience_rating": ["", "%", "#", "/"],
|
||||
|
@ -37,6 +37,8 @@ var_mods = {
|
|||
"episode_number": ["", "W", "0", "00"],
|
||||
"episode_count": ["", "W", "0", "00"],
|
||||
}
|
||||
single_mods = list(set([m for a, ms in var_mods.items() for m in ms if len(m) == 1]))
|
||||
double_mods = list(set([m for a, ms in var_mods.items() for m in ms if len(m) == 2]))
|
||||
vars_by_type = {
|
||||
"movie": [f"{item}{m}" for check, sub in types_for_var.items() for item in sub for m in var_mods[item] if "movie" in check],
|
||||
"show": [f"{item}{m}" for check, sub in types_for_var.items() for item in sub for m in var_mods[item] if "show" in check],
|
||||
|
|
|
@ -207,10 +207,10 @@ class Overlays:
|
|||
if f"<<{format_var}" in full_text and format_var == "originally_available[":
|
||||
mod = re.search("<<originally_available\\[(.+)]>>", full_text).group(1)
|
||||
format_var = "originally_available"
|
||||
elif f"<<{format_var}>>" in full_text and format_var.endswith("00"):
|
||||
mod = "00"
|
||||
elif f"<<{format_var}>>" in full_text and format_var.endswith((m for m in overlay.double_mods)):
|
||||
mod = format_var[-2:]
|
||||
format_var = format_var[:-2]
|
||||
elif f"<<{format_var}>>" in full_text and format_var.endswith(("%", "#", "H", "M", "0", "/")):
|
||||
elif f"<<{format_var}>>" in full_text and format_var.endswith((m for m in overlay.single_mods)):
|
||||
mod = format_var[-1]
|
||||
format_var = format_var[:-1]
|
||||
elif f"<<{format_var}>>" in full_text:
|
||||
|
@ -259,7 +259,7 @@ class Overlays:
|
|||
final_value = str(actual_value).upper()
|
||||
elif mod == "L":
|
||||
final_value = str(actual_value).lower()
|
||||
elif mod == "U":
|
||||
elif mod == "P":
|
||||
final_value = str(actual_value).title()
|
||||
else:
|
||||
final_value = actual_value
|
||||
|
|
Loading…
Reference in a new issue