fix frontend and docker build
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 19 Dec 2020 22:46:45 +0000 (23:46 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 19 Dec 2020 22:46:45 +0000 (23:46 +0100)
.github/workflows/docker-build-multiarch.yml
Dockerfile
music_assistant/constants.py
music_assistant/managers/streams.py
music_assistant/web/server.py

index 731cdc27a5e0a060cd13efdbd0c7f308b99020ea..986c7e09673783d7bd852a80f8587ef221fb2e64 100644 (file)
@@ -34,7 +34,7 @@ jobs:
 
           # If this is git tag, use the tag name as a docker tag
           elif [[ $GITHUB_REF == refs/tags/* ]]; then
-            VERSION=${GITHUB_REF}
+            VERSION=${GITHUB_REF#refs/tags/}
           fi
           TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
 
@@ -65,22 +65,12 @@ jobs:
           username: ${{ secrets.DOCKER_USERNAME }}
           password: ${{ secrets.DOCKER_PASSWORD }}
 
-      - name: Cache Docker layers
-        uses: actions/cache@v2
-        with:
-          path: /tmp/.buildx-cache
-          key: ${{ runner.os }}-buildx-${{ github.sha }}
-          restore-keys: |
-            ${{ runner.os }}-buildx-
-
       - name: Build
         uses: docker/build-push-action@v2
         with:
           builder: ${{ steps.buildx.outputs.name }}
           context: .
           file: ./Dockerfile
-          platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64
+          platforms: linux/amd64,linux/arm/v7,linux/arm64
           push: true
           tags: ${{ steps.prep.outputs.tags }}
-          cache-from: type=local,src=/tmp/.buildx-cache
-          cache-to: type=local,dest=/tmp/.buildx-cache
\ No newline at end of file
index 04c6371cdb67b17ee15904741f126582b2e74fc7..05f2009fed59d9d2df9bbfbc5d95e4b3dd0733be 100644 (file)
@@ -25,6 +25,8 @@ RUN curl -L -s https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC
         | tar -xjf - -C /tmp \
     && cd /tmp/jemalloc-${JEMALLOC_VERSION} \
     && ./configure \
+    && NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \
+    && export MAKEFLAGS="-j$((NB_CORES+1)) -l${NB_CORES}" \
     && make \
     && make install
 
index f16216816dc3ce5e5afb62c38c444c6b7f3d4086..930e0c1e6aa5bc48a185126ba4c6915aae34870c 100755 (executable)
@@ -1,6 +1,6 @@
 """All constants for Music Assistant."""
 
-__version__ = "0.0.75"
+__version__ = "0.0.76"
 REQUIRED_PYTHON_VER = "3.7"
 
 # configuration keys/attributes
index b1f0942ab0722232d6ab5b74b76b884168c2ab0c..09141af8fd8ca0f40367acff265172746bb637a7 100755 (executable)
@@ -308,13 +308,13 @@ class StreamManager:
                 player_id,
             )
             # run garbage collect manually to avoid too much memory fragmentation
-            gc.collect()
+            self.mass.add_job(gc.collect)
         # end of queue reached, pass last fadeout bits to final output
         yield last_fadeout_data
         del last_fadeout_data
         # END OF QUEUE STREAM
         # run garbage collect manually to avoid too much memory fragmentation
-        gc.collect()
+        self.mass.add_job(gc.collect)
         LOGGER.info("streaming of queue for player %s completed", player_id)
 
     async def async_stream_queue_item(
index 67dcc4bde07eb93d9596bd1880acda7ccbcc3078..99a5ce32374d58f35bf09e218e8c5e4b6b11df22 100755 (executable)
@@ -175,10 +175,6 @@ class WebServer:
     async def async_index(self, request: web.Request):
         """Get the index page, redirect if we do not have a web directory."""
         # pylint: disable=unused-argument
-        if not self.mass.config.stored_config["initialized"]:
-            return web.FileResponse(
-                os.path.join(os.path.dirname(os.path.abspath(__file__)), "setup.html")
-            )
         html_app = os.path.join(
             os.path.dirname(os.path.abspath(__file__)), "static/index.html"
         )