Skip to content

Commit

Permalink
fix playback issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Aug 26, 2024
1 parent 193ed5f commit 5739e03
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions music_assistant/common/models/config_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,9 @@ class CoreConfig(Config):
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}
)
Expand Down
7 changes: 4 additions & 3 deletions music_assistant/server/controllers/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from __future__ import annotations

import asyncio
import logging
import os
import time
import urllib.parse
Expand Down Expand Up @@ -40,6 +39,7 @@
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 (
Expand Down Expand Up @@ -864,9 +864,10 @@ async def get_media_stream(

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,
Expand Down
2 changes: 2 additions & 0 deletions music_assistant/server/models/player_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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,
Expand Down Expand Up @@ -57,6 +58,7 @@ async def get_player_config_entries(self, player_id: str) -> tuple[ConfigEntry,
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
Expand Down

0 comments on commit 5739e03

Please sign in to comment.