Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/music-assistant/server into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Nov 2, 2024
2 parents 36a706f + dc7cbd4 commit 03530f9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
path: dist/
- name: Publish release to PyPI
if: ${{ github.event.release.prerelease == false }}
uses: pypa/gh-action-pypi-publish@v1.10.3
uses: pypa/gh-action-pypi-publish@v1.11.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion music_assistant/providers/chromecast/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@music-assistant"
],
"requirements": [
"PyChromecast==14.0.4"
"PyChromecast==14.0.5"
],
"documentation": "https://music-assistant.io/player-support/google-cast/",
"multi_instance": false,
Expand Down
2 changes: 1 addition & 1 deletion music_assistant/providers/opensubsonic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@khers"
],
"requirements": [
"py-opensonic==5.1.1"
"py-opensonic==5.2.1"
],
"documentation": "https://music-assistant.io/music-providers/subsonic/",
"multi_instance": true
Expand Down
27 changes: 14 additions & 13 deletions music_assistant/providers/opensubsonic/sonic_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ async def handle_async_init(self) -> None:
try:
success = await self._run_async(self._conn.ping)
if not success:
msg = (
f"Failed to connect to {self.config.get_value(CONF_BASE_URL)}, "
"check your settings."
)
raise LoginFailed(msg)
raise CredentialError
except (AuthError, CredentialError) as e:
msg = (
f"Failed to connect to {self.config.get_value(CONF_BASE_URL)}, check your settings."
"Failed to connect to "
f"{self.config.get_value(CONF_BASE_URL)}"
", check your settings."
)
raise LoginFailed(msg) from e
self._enable_podcasts = self.config.get_value(CONF_ENABLE_PODCASTS)
Expand Down Expand Up @@ -318,8 +316,9 @@ def _parse_album(self, sonic_album: SonicAlbum, sonic_info: SonicAlbumInfo = Non
)
else:
self.logger.info(
f"Unable to find an artist ID for album '{sonic_album.name}' with "
f"ID '{sonic_album.id}'."
"Unable to find an artist ID for album '%s' with ID '%s'.",
sonic_album.name,
sonic_album.id,
)
album.artists.append(
Artist(
Expand Down Expand Up @@ -365,7 +364,7 @@ def _parse_track(self, sonic_song: SonicSong) -> Track:
# We are setting disc number to 0 because the standard for what is part of
# a Open Subsonic Song is not yet set and the implementations I have checked
# do not contain this field. We should revisit this when the spec is finished
disc_number=0,
disc_number=sonic_song.disc_number or 0,
favorite=bool(sonic_song.starred),
provider_mappings={
ProviderMapping(
Expand Down Expand Up @@ -407,22 +406,24 @@ def _parse_track(self, sonic_song: SonicSong) -> Track:
# because it will not have an entry in the artists table so the best we can do it
# add a 'fake' id with the proper artist name and have get_artist() check for this
# id and handle it locally.
fake_id = f"{NAVI_VARIOUS_PREFIX}{sonic_song.artist}"
artist = Artist(
item_id=f"{NAVI_VARIOUS_PREFIX}{sonic_song.artist}",
item_id=fake_id,
provider=self.domain,
name=sonic_song.artist,
provider_mappings={
ProviderMapping(
item_id=UNKNOWN_ARTIST_ID,
item_id=fake_id,
provider_domain=self.domain,
provider_instance=self.instance_id,
)
},
)
else:
self.logger.info(
f"Unable to find artist ID for track '{sonic_song.title}' with "
f"ID '{sonic_song.id}'."
"Unable to find artist ID for track '%s' with ID '%s'.",
sonic_song.title,
sonic_song.id,
)
artist = Artist(
item_id=UNKNOWN_ARTIST_ID,
Expand Down
1 change: 1 addition & 0 deletions music_assistant/providers/snapcast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ async def _streamer() -> None:
while stream.status != "idle":
await asyncio.sleep(0.25)
player.state = PlayerState.IDLE
player.elapsed_time = time.time() - player.elapsed_time_last_updated
self.mass.players.update(player_id)
self._set_childs_state(player_id)
finally:
Expand Down
4 changes: 2 additions & 2 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ orjson==3.10.7
pillow==11.0.0
pkce==1.0.3
plexapi==4.15.16
py-opensonic==5.1.1
py-opensonic==5.2.1
pyblu==1.0.4
PyChromecast==14.0.4
PyChromecast==14.0.5
pycryptodome==3.21.0
python-fullykiosk==0.0.14
python-slugify==8.0.4
Expand Down

0 comments on commit 03530f9

Please sign in to comment.