Skip to content

Commit

Permalink
Jellyfin Transcoding Fix (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
tesnos6921 authored Mar 21, 2024
1 parent 21ed1ac commit 443bb83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion music_assistant/server/providers/jellyfin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
ITEM_TYPE_ARTIST,
ITEM_TYPE_AUDIO,
MAX_IMAGE_WIDTH,
SUPPORTED_CONTAINER_FORMATS,
USER_APP_NAME,
)

Expand Down Expand Up @@ -812,7 +813,9 @@ async def get_audio_stream(
self, streamdetails: StreamDetails, seek_position: int = 0
) -> AsyncGenerator[bytes, None]:
"""Return the audio stream for the provider item."""
url = API.audio_url(self._jellyfin_server.jellyfin, streamdetails.item_id)
url = API.audio_url(
self._jellyfin_server.jellyfin, streamdetails.item_id, SUPPORTED_CONTAINER_FORMATS
)

async for chunk in get_http_stream(self.mass, url, streamdetails, seek_position):
yield chunk
2 changes: 2 additions & 0 deletions music_assistant/server/providers/jellyfin/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@

SUPPORTED_COLLECTION_TYPES: Final = [COLLECTION_TYPE_MUSIC]

SUPPORTED_CONTAINER_FORMATS: Final = "ogg,flac,mp3,aac,mpeg,alac,wav,aiff,wma,m4a,m4b,dsf,opus,wv"

PLAYABLE_ITEM_TYPES: Final = [ITEM_TYPE_AUDIO]


Expand Down

0 comments on commit 443bb83

Please sign in to comment.