[9] update navlinks and fix ratings

pull/1171/head
meisnate12 2 years ago
parent 796117aba3
commit 7a70ab8f4c

@ -1 +1 @@
1.18.0-develop8
1.18.0-develop9

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

@ -85,7 +85,7 @@ templates:
default: true
conditions:
- image_level: Top
rating<<rating_num>>_image: [anidb, letterboxd, rt_popcorn, mdblist, tmdb, trakt, mal, average, star]
rating<<rating_num>>_image: [anidb, letterboxd, rt_popcorn, mdblist, tmdb, trakt, mal, star]
value: false
- image_level: Top
overlay_level: episode
@ -97,7 +97,7 @@ templates:
conditions:
- rating<<rating_num>>_image: [rt_popcorn, rt_tomato, tmdb]
value: "%"
- rating<<rating_num>>_image: metacritic
- rating<<rating_num>>_image: [metacritic, mdb]
value: "0"
image_extra:
default: ""
@ -129,8 +129,6 @@ templates:
value: Trakt
- rating<<rating_num>>_image: mal
value: MAL
- rating<<rating_num>>_image: average
value: Average
- rating<<rating_num>>_image: star
value: Star
rating<<rating_num>>_horizontal_align:

@ -59,7 +59,7 @@
{% elif specificlink|length > 2 %}
<li><a href="{{ pathto(specificlink[1]) }}{{ specificlink[2] }}">{{ specificlink[0] }}</a></li>
{% else %}
<li><a href="{{ pathto(specificlink[1]) }}">{{ specificlink[0] }}</a></li>
<li><a href="{{ specificlink[1] if specificlink[1]|slice:':4' == 'http' else pathto(specificlink[1]) }}">{{ specificlink[0] }}</a></li>
{% endif %}
{%- endfor %}
</ul>
@ -67,7 +67,7 @@
{% elif sublink|length > 2 %}
<li><a href="{{ pathto(sublink[1]) }}{{ sublink[2] }}">{{ sublink[0] }}</a></li>
{% else %}
<li><a href="{{ pathto(sublink[1]) }}">{{ sublink[0] }}</a></li>
<li><a href="{{ sublink[1] if sublink[1]|slice:':4' == 'http' else pathto(sublink[1]) }}">{{ sublink[0] }}</a></li>
{% endif %}
{%- endfor %}
</ul>
@ -75,7 +75,7 @@
{% elif link|length > 2 %}
<li><a href="{{ pathto(link[1]) }}{{ link[2] }}">{{ link[0] }}</a></li>
{% else %}
<li><a href="{{ pathto(link[1]) }}">{{ link[0] }}</a></li>
<li><a href="{{ link[1] if link[1]|slice:':4' == 'http' else pathto(link[1]) }}">{{ link[0] }}</a></li>
{% endif %}
{%- endfor %}
</ul>

@ -144,9 +144,9 @@ html_theme_options = {
("Image Asset Directory Guide", "home/guides/assets"),
("Formula 1 Metadata Guide", "home/guides/formula"),
("_divider", ),
("User Configs Repository", "https://github.com/meisnate12/Plex-Meta-Manager-Configs", True),
("Discord Server", "https://discord.gg/NfH6mGFuAB", True),
("Donate/Sponsor", "https://github.com/sponsors/meisnate12", True),
("User Configs Repository", "https://github.com/meisnate12/Plex-Meta-Manager-Configs"),
("Discord Server", "https://discord.gg/NfH6mGFuAB"),
("Donate/Sponsor", "https://github.com/sponsors/meisnate12"),
("Acknowledgements", "home/acknowledgements"),
]),
("_menu", "Config", [

@ -79,13 +79,13 @@ All [Shared Overlay Variables](../overlay_variables) can be appended by `rating1
| `back_height` | `105` |
| Variable | Description & Values |
|:-----------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|:-----------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `rating1` | **Description:** Choose the rating to display in rating1.<br>**Values:** `critic`, `audience`, or `user` |
| `rating1_image` | **Description:** Choose the rating image to display in rating1.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, `mal`, `mdblist`, `average`, or `star` |
| `rating1_image` | **Description:** Choose the rating image to display in rating1.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, `mal`, `mdblist`, or `star` |
| `rating2` | **Description:** Choose the rating to display in rating2.<br>**Values:** `critic`, `audience`, or `user` |
| `rating2_image` | **Description:** Choose the rating image to display in rating2.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, `mal`, `mdblist`, `average`, or `star` |
| `rating2_image` | **Description:** Choose the rating image to display in rating2.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, `mal`, `mdblist`, or `star` |
| `rating3` | **Description:** Choose the rating to display in rating3.<br>**Values:** `critic`, `audience`, or `user` |
| `rating3_image` | **Description:** Choose the rating image to display in rating3.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, `mal`, `mdblist`, `average`, or `star` |
| `rating3_image` | **Description:** Choose the rating image to display in rating3.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, `mal`, `mdblist`, or `star` |
| `horizontal_position` | **Description:** Choose the horizontal position for the rating group.<br>**Default:** `left`<br>**Values:** `left`, `right`, or `center` |
| `vertical_position` | **Description:** Choose the vertical position for the rating group.<br>**Default:** `center`<br>**Values:** `top`, `bottom`, or `center` |
| `rating_alignment` | **Description:** Choose the display alignment for the rating group.<br>**Default:** `vertical`<br>**Values:** `horizontal`, or `vertical` |

@ -253,6 +253,8 @@ class DataFile:
raise Failed(f"{self.data_type} Error: template sub-attribute default is not a dictionary")
init_defaults = template["default"]
all_init_defaults = {k: v for k, v in init_defaults.items()}
temp_conditionals = {}
for input_dict, input_type, overwrite_call in [
(temp_vars, "External", False),
(extra_variables, "Definition", False),
@ -267,7 +269,7 @@ class DataFile:
if not isinstance(input_value, dict):
raise Failed(f"{self.data_type} Error: {input_type} template sub-attribute conditionals is not a dictionary")
for ck, cv in input_value.items():
conditionals[ck] = cv
temp_conditionals[ck] = cv
elif input_key == "default":
if not input_value:
raise Failed(f"{self.data_type} Error: {input_type} template sub-attribute default is blank")
@ -284,6 +286,9 @@ class DataFile:
for k, v in added_vars.items():
if k not in variables:
variables[k] = v
for k, v in temp_conditionals.items():
if k not in variables:
conditionals[k] = v
language = variables["language"] if "language" in variables else "default"
translation_variables = {k: v[language if language in v else "default"] for k, v in self.translations.items()}

Loading…
Cancel
Save