From 4d1555652e800e729dada45396af57cf27f258b0 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 20 Jul 2022 19:14:34 -0400 Subject: [PATCH] [1] change how suppress works with weights --- .github/workflows/version.yml | 6 +++--- VERSION | 2 +- modules/overlays.py | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 78404443..51df9d50 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -19,7 +19,7 @@ jobs: - name: Get Previous tag 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 uses: docker/login-action@v2 @@ -87,5 +87,5 @@ jobs: - name: Create & Push Tag working-directory: ./pmmconfigs run: | - git tag ${{ steps.previoustag.outputs.tag }} - git push origin ${{ steps.previoustag.outputs.tag }} \ No newline at end of file + git tag ${{ steps.previoustag.outputs.OLDVERSION }} + git push origin ${{ steps.previoustag.outputs.OLDVERSION }} \ No newline at end of file diff --git a/VERSION b/VERSION index 06fb41b6..b34f45e3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.2 +1.17.2-develop1 diff --git a/modules/overlays.py b/modules/overlays.py index a2850545..80a959bb 100644 --- a/modules/overlays.py +++ b/modules/overlays.py @@ -172,7 +172,9 @@ class Overlays: changed_image = True image_response = self.config.get(new_backup) 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" backup_image_path = os.path.join(self.library.overlay_backup, f"{item.ratingKey}.{i_ext}") with open(backup_image_path, "wb") as handler: @@ -361,10 +363,6 @@ class Overlays: if over_obj.group not in overlay_groups: overlay_groups[over_obj.group] = {} 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 over_key in over_obj.keys: @@ -389,6 +387,10 @@ class Overlays: for v in gv: if final != 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 def find_poster_url(self, item):