Skip to content

Commit

Permalink
version 1.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Apr 10, 2023
1 parent 915182f commit 3bf1c25
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.18.3-develop178
1.19.0
Binary file added docs/404.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion docs/404.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Lost? That Path was not Found.
<center><h1>This is not the page you're looking for.</h1></center>

```{image} 404.gif
:alt:
:align: center
```
2 changes: 2 additions & 0 deletions docs/defaults/overlays/ratings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The `ratings` Default Overlay File is used to create an overlay based on the Cri

This file only updates the overlays based on the data in Plex, it will not pull the ratings directly from any third-party website, see recommendations below for more info.

**Please read [PMM Ratings Explained](../../home/guides/ratings) for more understanding on how PMM interacts with ratings.**

![](images/ratings_overlay.png)

## Requirements & Recommendations
Expand Down
2 changes: 1 addition & 1 deletion modules/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def apply_vars(input_str, var_set, var_key, var_limit):

self.posters = {}
self.backgrounds = {}
if "pmm_poster" in methods:
if not self.overlay and "pmm_poster" in methods:
logger.debug("")
logger.debug("Validating Method: pmm_poster")
if self.data[methods["pmm_poster"]] is None:
Expand Down
19 changes: 8 additions & 11 deletions modules/poster.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, config, data):
self.data = data
self.methods = {str(m).lower(): m for m in self.data}
self.code_base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
self.posters_dir = os.path.join(self.code_base, "defaults", "posters")
self.images_dir = os.path.join(self.code_base, "defaults", "images")

def check_data(self, attr):
if attr not in self.methods or not self.data[self.methods[attr]]:
Expand Down Expand Up @@ -60,13 +60,10 @@ def check_file(self, attr, pmm_items, local=False, required=False):
else:
ext = "png"
num = ""
image_path = os.path.join(self.posters_dir, f"temp{num}.{ext}")
image_path = os.path.join(self.images_dir, f"temp{num}.{ext}")
while os.path.exists(image_path):
if not num:
num = 1
else:
num += 1
image_path = os.path.join(self.posters_dir, f"temp{num}.{ext}")
num = 1 if not num else num + 1
image_path = os.path.join(self.images_dir, f"temp{num}.{ext}")
with open(image_path, "wb") as handler:
handler.write(response.content)
while util.is_locked(image_path):
Expand Down Expand Up @@ -107,8 +104,8 @@ def __init__(self, config, data):
self.has_back = True if self.back_color or self.back_line_color else False
self.horizontal_offset, self.horizontal_align, self.vertical_offset, self.vertical_align = util.parse_cords(self.data, "component", err_type="Posters", default=(0, "center", 0, "center"))

self.images_dir = os.path.join(self.posters_dir, "images")
self.pmm_images = {k[:-4]: os.path.join(self.images_dir, k) for k in os.listdir(self.images_dir)}
old_images_dir = os.path.join(self.images_dir, "images")
self.pmm_images = {k[:-4]: os.path.join(old_images_dir, k) for k in os.listdir(old_images_dir)}
self.image, self.image_compare = self.check_file("image", self.pmm_images)
self.image_width = util.parse("Posters", "image_width", self.data, datatype="int", methods=self.methods, default=0, minimum=0, maximum=2000) if "image_width" in self.methods else 0
self.image_color = self.check_color("image_color")
Expand Down Expand Up @@ -328,7 +325,7 @@ class PMMImage(ImageBase):
def __init__(self, config, data, image_attr, playlist=False):
super().__init__(config, data)
self.image_attr = image_attr
self.backgrounds_dir = os.path.join(self.posters_dir, "backgrounds")
self.backgrounds_dir = os.path.join(self.images_dir, "backgrounds")
self.playlist = playlist
self.pmm_backgrounds = {k[:-4]: os.path.join(self.backgrounds_dir, k) for k in os.listdir(self.backgrounds_dir)}

Expand All @@ -350,7 +347,7 @@ def get_compare_string(self):
return output

def save(self, item_vars):
image_path = os.path.join(self.posters_dir, "temp_poster.png")
image_path = os.path.join(self.images_dir, "temp_poster.png")
if os.path.exists(image_path):
os.remove(image_path)
canvas_width = 1000
Expand Down

0 comments on commit 3bf1c25

Please sign in to comment.