From b083913afe14a01a99d6445e80febce7e8394014 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Sun, 29 Mar 2026 15:36:24 -0300 Subject: [PATCH] Use ExtendedAudioFile directly in audio logic --- votify/interface/audio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/votify/interface/audio.py b/votify/interface/audio.py index a5b5cb3..ebe90c1 100644 --- a/votify/interface/audio.py +++ b/votify/interface/audio.py @@ -267,7 +267,7 @@ class SpotifyAudioInterface(SpotifyBaseInterface): audio_file_info = next( ( - (extended_audio_file, extended_audio_file.average_bitrate) + extended_audio_file for extended_audio_file in audio_files.files if extended_audio_file.file.format == int(audio_quality.format_id) ), @@ -278,14 +278,14 @@ class SpotifyAudioInterface(SpotifyBaseInterface): stream_url = await self._get_stream_url( audio_quality.format_id, - audio_file_info[0].file.file_id.hex(), + audio_file_info.file.file_id.hex(), ) stream_info = StreamInfoAv( audio_track=StreamInfo( stream_url=stream_url, widevine_pssh=None, - file_id=audio_file_info[0].file.file_id, + file_id=audio_file_info.file.file_id, file_format=audio_quality.file_format, actual_file_format=audio_quality.actual_file_format, ),