fix playback issues
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Mon, 26 Aug 2024 06:06:25 +0000 (08:06 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Mon, 26 Aug 2024 06:06:25 +0000 (08:06 +0200)
music_assistant/common/models/config_entries.py
music_assistant/server/controllers/streams.py
music_assistant/server/models/player_provider.py

index fa42c0e2baf3f593989fefd66025fba8ee0d43fc..2d8941d9eb1f99e47afbfd3322cf0ef3d4d0fd6f 100644 (file)
@@ -613,6 +613,9 @@ CONF_ENTRY_HTTP_PROFILE = ConfigEntry(
 CONF_ENTRY_HTTP_PROFILE_DEFAULT_2 = ConfigEntry.from_dict(
     {**CONF_ENTRY_HTTP_PROFILE.to_dict(), "default_value": "no_content_length"}
 )
+CONF_ENTRY_HTTP_PROFILE_FORCED_1 = ConfigEntry.from_dict(
+    {**CONF_ENTRY_HTTP_PROFILE.to_dict(), "default_value": "chunked", "hidden": True}
+)
 CONF_ENTRY_HTTP_PROFILE_FORCED_2 = ConfigEntry.from_dict(
     {**CONF_ENTRY_HTTP_PROFILE.to_dict(), "default_value": "no_content_length", "hidden": True}
 )
index 5322bc2cdedb181f78b65f33a5f921b4559e22d7..c39399a159b45828b73a045c27b42b04287257f9 100644 (file)
@@ -9,7 +9,6 @@ the upnp callbacks and json rpc api for slimproto clients.
 from __future__ import annotations
 
 import asyncio
-import logging
 import os
 import time
 import urllib.parse
@@ -40,6 +39,7 @@ from music_assistant.constants import (
     CONF_PUBLISH_IP,
     CONF_SAMPLE_RATES,
     SILENCE_FILE,
+    VERBOSE_LOG_LEVEL,
 )
 from music_assistant.server.helpers.audio import LOGGER as AUDIO_LOGGER
 from music_assistant.server.helpers.audio import (
@@ -864,9 +864,10 @@ class StreamsController(CoreController):
 
     def _log_request(self, request: web.Request) -> None:
         """Log request."""
-        if not self.logger.isEnabledFor(logging.DEBUG):
+        if not self.logger.isEnabledFor(VERBOSE_LOG_LEVEL):
             return
-        self.logger.debug(
+        self.logger.log(
+            VERBOSE_LOG_LEVEL,
             "Got %s request to %s from %s\nheaders: %s\n",
             request.method,
             request.path,
index 6fc2daced00a8183f52fe0a03da29531e05cab21..c40b6180c60396e24c8d5ec64b9bcca92d90a781 100644 (file)
@@ -15,6 +15,7 @@ from music_assistant.common.models.config_entries import (
     CONF_ENTRY_AUTO_PLAY,
     CONF_ENTRY_FLOW_MODE,
     CONF_ENTRY_HIDE_PLAYER,
+    CONF_ENTRY_HTTP_PROFILE_FORCED_1,
     CONF_ENTRY_PLAYER_ICON,
     CONF_ENTRY_PLAYER_ICON_GROUP,
     CONF_ENTRY_SAMPLE_RATES,
@@ -57,6 +58,7 @@ class PlayerProvider(Provider):
             CONF_ENTRY_HIDE_PLAYER,
             CONF_ENTRY_TTS_PRE_ANNOUNCE,
             CONF_ENTRY_SAMPLE_RATES,
+            CONF_ENTRY_HTTP_PROFILE_FORCED_1,
         )
         if player_id.startswith(SYNCGROUP_PREFIX):
             # add default entries for syncgroups