From 9c35e6362bdc901d5ed72367de6c32353f7ab406 Mon Sep 17 00:00:00 2001 From: kokarare1212 Date: Wed, 20 Oct 2021 21:14:50 +0900 Subject: [PATCH] Fix AudioFile selection --- librespot/audio/decoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librespot/audio/decoders.py b/librespot/audio/decoders.py index 7910f20..2982227 100644 --- a/librespot/audio/decoders.py +++ b/librespot/audio/decoders.py @@ -51,7 +51,7 @@ class VorbisOnlyAudioQuality(AudioQualityPicker): @staticmethod def get_vorbis_file(files: typing.List[Metadata.AudioFile]): for file in files: - if hasattr(file, "format") and SuperAudioFormat.get( + if file.HasField("format") and SuperAudioFormat.get( file.format) == SuperAudioFormat.VORBIS: return file return None