diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 7e2b488e..4c807bb6 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -17,10 +17,6 @@ jobs: with: ref: develop - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -32,6 +28,10 @@ jobs: with: platforms: all + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push id: docker_build uses: docker/build-push-action@v5 diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index c320bf03..b510d1b8 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -13,10 +13,6 @@ jobs: - name: Check Out Repo uses: actions/checkout@v4 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -28,6 +24,10 @@ jobs: with: platforms: all + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push id: docker_build uses: docker/build-push-action@v5 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 56641304..9ea0ac21 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -17,10 +17,6 @@ jobs: with: ref: nightly - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -32,6 +28,10 @@ jobs: with: platforms: all + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push id: docker_build uses: docker/build-push-action@v5 diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 0a28125b..c5c71ff8 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -45,6 +45,8 @@ jobs: platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:${{ steps.get_version.outputs.VERSION }} + cache-from: type=gha + cache-to: type=gha,mode=max - name: Discord Success Notification uses: meisnate12/discord-notifications@master diff --git a/VERSION b/VERSION index d033d38e..4652cf65 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.19.1-develop31 +1.19.1-develop32 diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 040b537e..d99cc49d 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -237,20 +237,11 @@ def start(attrs): 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 if new_version: logger.info(f" Newest Version: {new_version}") - def get_required_plexapi_version(): - with open('requirements.txt', 'r') as file: - lines = file.readlines() - for line in lines: - if line.strip().startswith('PlexAPI=='): - return line.strip().split('==')[1] - return None - - required_version = get_required_plexapi_version() - - if required_version == plexapi.VERSION: - logger.info(f" PlexAPI library version: {plexapi.VERSION}") - else: - logger.info(f" PlexAPI library version: {plexapi.VERSION} (Required Version: {required_version})") + with open("requirements.txt", "r") as file: + required_version = next(l.strip()[9:] for l in file.readlines() if l.strip().startswith("PlexAPI==")) + logger.info(f" PlexAPI Version: {plexapi.VERSION}") + if required_version != plexapi.VERSION: + logger.info(f" PlexAPI Requires an Update to Version: {required_version}") logger.info(f" Platform: {platform.platform()}") logger.info(f" Memory: {round(psutil.virtual_memory().total / (1024.0 ** 3))} GB") if "time" in attrs and attrs["time"]: start_type = f"{attrs['time']} "