Skip to content

Commit

Permalink
Tidal: add missing session object to add/remove from library (#911)
Browse files Browse the repository at this point in the history
Co-authored-by: Jozef Kruszynski <jozef.kruszynski@gmail.com>
  • Loading branch information
jozefKruszynski and Jozef Kruszynski authored Nov 4, 2023
1 parent 7e0c336 commit 3617005
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions music_assistant/server/providers/tidal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@ async def get_similar_tracks(self, prov_track_id: str, limit: int = 25) -> list[

async def library_add(self, prov_item_id: str, media_type: MediaType):
"""Add item to library."""
tidal_session = await self._get_tidal_session()
return await library_items_add_remove(
self,
tidal_session,
self._tidal_user_id,
prov_item_id,
media_type,
Expand All @@ -363,8 +364,9 @@ async def library_add(self, prov_item_id: str, media_type: MediaType):

async def library_remove(self, prov_item_id: str, media_type: MediaType):
"""Remove item from library."""
tidal_session = await self._get_tidal_session()
return await library_items_add_remove(
self,
tidal_session,
self._tidal_user_id,
prov_item_id,
media_type,
Expand Down

0 comments on commit 3617005

Please sign in to comment.