From 269fde29aa6d39490aabbf8340bfcfb846337bf9 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 8 Apr 2024 18:50:24 -0400 Subject: [PATCH] [14] change lxml tags --- .github/workflows/develop.yml | 6 +++--- .github/workflows/latest.yml | 6 +++--- .github/workflows/nightly.yml | 6 +++--- .github/workflows/version.yml | 14 +++++++++++++- Dockerfile.lxml | 1 + VERSION | 2 +- modules/meta.py | 2 +- plex_meta_manager.py | 10 +++++++++- 8 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index e326b487..b94930a6 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -32,7 +32,7 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 - - name: Build and push + - name: Build and Push id: docker_build uses: docker/build-push-action@v5 with: @@ -46,7 +46,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - - name: Build and push Lxml Version + - name: Build and Push lxml Version id: docker_build_lxml uses: docker/build-push-action@v5 with: @@ -56,7 +56,7 @@ jobs: "BRANCH_NAME=develop" platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:lxml + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:lxml-develop cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index fdc61cc6..bca2fd75 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -28,7 +28,7 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 - - name: Build and push + - name: Build and Push id: docker_build uses: docker/build-push-action@v5 with: @@ -40,7 +40,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - - name: Build and push Lxml Version + - name: Build and Push lxml Version id: docker_build_lxml uses: docker/build-push-action@v5 with: @@ -48,7 +48,7 @@ jobs: file: ./Dockerfile.lxml platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:lxml + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:lxml-latest cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 94fef3d1..3b716652 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -32,7 +32,7 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 - - name: Build and push + - name: Build and Push id: docker_build uses: docker/build-push-action@v5 with: @@ -46,7 +46,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - - name: Build and push Lxml Version + - name: Build and Push lxml Version id: docker_build_lxml uses: docker/build-push-action@v5 with: @@ -56,7 +56,7 @@ jobs: "BRANCH_NAME=nightly" platforms: linux/amd64,linux/arm64 push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:lxml + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:lxml-nightly cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index b00e2723..041d827f 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -36,7 +36,7 @@ jobs: id: get_version run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - - name: Build and push + - name: Build and Push id: docker_build uses: docker/build-push-action@v5 with: @@ -48,6 +48,18 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + - name: Build and Push lxml Version + id: docker_build_lxml + uses: docker/build-push-action@v5 + with: + context: ./ + file: ./Dockerfile.lxml + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:lxml-${{ steps.get_version.outputs.VERSION }} + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Discord Success Notification uses: meisnate12/discord-notifications@master if: success() diff --git a/Dockerfile.lxml b/Dockerfile.lxml index 50597edd..cde540ca 100644 --- a/Dockerfile.lxml +++ b/Dockerfile.lxml @@ -3,6 +3,7 @@ ARG BRANCH_NAME=master ENV BRANCH_NAME ${BRANCH_NAME} ENV TINI_VERSION v0.19.0 ENV PMM_DOCKER True +ENV PMM_LXML True COPY requirements.txt requirements.txt RUN sed -i -E "s/(lxml==).+/\15.1.1/" requirements.txt RUN echo "**** install system packages ****" \ diff --git a/VERSION b/VERSION index 7207e82c..5b0f02c9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.21.0-develop13 +1.21.0-develop14 diff --git a/modules/meta.py b/modules/meta.py index 36ba837c..b860fe2d 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -407,7 +407,7 @@ class DataFile: elif str(con_var_value) == str(var_value): error_text = f'is "{var_value}"' elif var_key.endswith(".notdefault"): - var_name = var_key[:-4] + var_name = var_key[:-11] if var_name in variables or var_name in default: con_var_value = variables[var_name] if var_name in variables else default[var_name] if isinstance(var_value, list): diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 5be0f7cd..7574fedf 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -109,6 +109,7 @@ for arg_key, arg_data in arguments.items(): env_version = get_env("BRANCH_NAME", "master") is_docker = get_env("PMM_DOCKER", False, arg_bool=True) is_linuxserver = get_env("PMM_LINUXSERVER", False, arg_bool=True) +is_lxml = get_env("PMM_LXML", False, arg_bool=True) secret_args = {} plex_url = None @@ -231,7 +232,14 @@ def start(attrs): logger.info_center("| __/| | __/> < | | | | __/ || (_| | | | | | (_| | | | | (_| | (_| | __/ | ") logger.info_center("|_| |_|\\___/_/\\_\\ |_| |_|\\___|\\__\\__,_| |_| |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_| ") logger.info_center(" |___/ ") - system_ver = "Docker" if is_docker else "Linuxserver" if is_linuxserver else f"Python {platform.python_version()}" + if is_lxml: + system_ver = "lxml Docker" + elif is_linuxserver: + system_ver = "Linuxserver" + elif is_docker: + system_ver = "Docker" + else: + system_ver = f"Python {platform.python_version()}" logger.info(f" Version: {version[0]} ({system_ver}){f' (Git: {git_branch})' if git_branch else ''}") latest_version = util.current_version(version, branch=branch) new_version = latest_version[0] if latest_version and (version[1] != latest_version[1] or (version[2] and version[2] < latest_version[2])) else None