From eacad79ad209bfb41abdc50d21c5d52450e3cbec Mon Sep 17 00:00:00 2001 From: mungai-njoroge Date: Sat, 25 Nov 2023 12:02:27 +0300 Subject: [PATCH] update release yml --- .github/workflows/release.yml | 8 +++++--- app/lib/artistlib.py | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a95ce62..a01a9c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -160,16 +160,18 @@ jobs: with: # list of Docker images to use as base name for tags images: | - ghcr.io/${{ github.repository }} + ghcr.io/swing-opensource/swingmusic - name: Build and push uses: docker/build-push-action@v2 with: context: . platforms: linux/amd64,linux/arm, linux/arm64 push: true - tags: ghcr.io/${{github.repository}}:${{inputs.tag}}, ${{env.LATEST_TAG}} + tags: ghcr.io/swing-opensource/swingmusic:${{inputs.tag}}, ${{env.LATEST_TAG}} labels: org.opencontainers.image.title=Docker build-args: | --provenance=false env: - LATEST_TAG: ${{ inputs.is_latest == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }} + LATEST_TAG: ${{ inputs.is_latest == 'true' && format('ghcr.io/{0}:latest', 'swing-opensource/swingmusic') || '' }} + + # TODO: REPLACE SWING-OPENSWINGMUSIC WITH github.repository in Docker meta step and following steps \ No newline at end of file diff --git a/app/lib/artistlib.py b/app/lib/artistlib.py index 02ff773..f0c0267 100644 --- a/app/lib/artistlib.py +++ b/app/lib/artistlib.py @@ -32,7 +32,11 @@ def get_artist_image_link(artist: str): url = f"https://api.deezer.com/search/artist?q={query}" response = requests.get(url, timeout=30) - data = response.json() + try: + data = response.json() + except requests.exceptions.JSONDecodeError: + print(f"Failed to decode json for {artist}") + return None for res in data["data"]: res_hash = create_hash(res["name"], decode=True)