feat: Enhance favorites functionality; add favorites filtering to playlists and sounds, and improve favorite indicators in responses

This commit is contained in:
JSC
2025-08-16 21:41:50 +02:00
parent 78508c84eb
commit f906b6d643
10 changed files with 97 additions and 52 deletions

View File

@@ -246,6 +246,8 @@ class PlaylistService:
include_stats: bool = False,
limit: int | None = None,
offset: int = 0,
favorites_only: bool = False,
current_user_id: int | None = None,
) -> list[dict]:
"""Search and sort playlists with optional statistics."""
return await self.playlist_repo.search_and_sort(
@@ -256,6 +258,8 @@ class PlaylistService:
include_stats=include_stats,
limit=limit,
offset=offset,
favorites_only=favorites_only,
current_user_id=current_user_id,
)
async def get_playlist_sounds(self, playlist_id: int) -> list[Sound]: