[1] change how suppress works with weights

pull/977/head
meisnate12 3 years ago
parent 510fb959b7
commit 4d1555652e

@ -19,7 +19,7 @@ jobs:
- name: Get Previous tag - name: Get Previous tag
id: previoustag id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1" run: echo "::set-output name=OLDVERSION::$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))"
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2
@ -87,5 +87,5 @@ jobs:
- name: Create & Push Tag - name: Create & Push Tag
working-directory: ./pmmconfigs working-directory: ./pmmconfigs
run: | run: |
git tag ${{ steps.previoustag.outputs.tag }} git tag ${{ steps.previoustag.outputs.OLDVERSION }}
git push origin ${{ steps.previoustag.outputs.tag }} git push origin ${{ steps.previoustag.outputs.OLDVERSION }}

@ -1 +1 @@
1.17.2 1.17.2-develop1

@ -172,7 +172,9 @@ class Overlays:
changed_image = True changed_image = True
image_response = self.config.get(new_backup) image_response = self.config.get(new_backup)
if image_response.status_code >= 400: if image_response.status_code >= 400:
raise Failed(f"{item_title[:60]:<60} | Overlay Error: Poster Download Failed") raise Failed(f"{item_title[:60]:<60} | Overlay Error: Image Download Failed")
if image_response.headers[""] not in ["image/png", "image/jpeg"]:
raise Failed(f"{item_title[:60]:<60} | Overlay Error: Image Not JPG or PNG")
i_ext = "jpg" if image_response.headers["Content-Type"] == "image/jpeg" else "png" i_ext = "jpg" if image_response.headers["Content-Type"] == "image/jpeg" else "png"
backup_image_path = os.path.join(self.library.overlay_backup, f"{item.ratingKey}.{i_ext}") backup_image_path = os.path.join(self.library.overlay_backup, f"{item.ratingKey}.{i_ext}")
with open(backup_image_path, "wb") as handler: with open(backup_image_path, "wb") as handler:
@ -361,10 +363,6 @@ class Overlays:
if over_obj.group not in overlay_groups: if over_obj.group not in overlay_groups:
overlay_groups[over_obj.group] = {} overlay_groups[over_obj.group] = {}
overlay_groups[over_obj.group][overlay_name] = over_obj.weight overlay_groups[over_obj.group][overlay_name] = over_obj.weight
for rk in over_obj.keys:
for suppress_name in over_obj.suppress:
if suppress_name in properties and rk in properties[suppress_name].keys:
properties[suppress_name].keys.remove(rk)
for overlay_name, over_obj in properties.items(): for overlay_name, over_obj in properties.items():
for over_key in over_obj.keys: for over_key in over_obj.keys:
@ -389,6 +387,10 @@ class Overlays:
for v in gv: for v in gv:
if final != v: if final != v:
key_to_overlays[over_key][1].remove(v) key_to_overlays[over_key][1].remove(v)
for over_name in over_names:
for suppress_name in properties[over_name].suppress:
if suppress_name in over_names:
key_to_overlays[over_key][1].remove(suppress_name)
return key_to_overlays, properties, queues return key_to_overlays, properties, queues
def find_poster_url(self, item): def find_poster_url(self, item):

Loading…
Cancel
Save