Support FLAC audio playback and file lookup

This commit is contained in:
Rafael Moraes
2026-02-28 10:59:52 -03:00
parent 3b26b3db6c
commit b346820841
3 changed files with 20 additions and 7 deletions
+10 -1
View File
@@ -105,10 +105,19 @@ class SpotifyBaseInterface:
def is_video(self, playback_info: dict) -> bool:
return bool(playback_info["manifest"].get("manifest_ids_video"))
async def get_playback_info(self, media_id: str, media_type: str) -> dict | None:
async def get_playback_info(
self,
media_id: str,
media_type: str,
flac: bool = False,
) -> dict | None:
playback_info_response = await self.api.get_playback_info(
media_id=media_id,
media_type=media_type,
file_formats=[
"manifest_ids_video",
"file_ids_mp4flac" if flac else "file_ids_mp4",
],
)
playback_info_key = next(iter(playback_info_response.get("media", {})), None)