@@ -9,18 +9,24 @@ class SuperAudioFormat(enum.Enum):
99
1010 @staticmethod
1111 def get (audio_format : Metadata .AudioFile .Format ):
12- if audio_format == Metadata .AudioFile .Format .OGG_VORBIS_96 or \
13- audio_format == Metadata .AudioFile .Format .OGG_VORBIS_160 or \
14- audio_format == Metadata .AudioFile .Format .OGG_VORBIS_320 :
12+ if audio_format in [
13+ Metadata .AudioFile .Format .OGG_VORBIS_96 ,
14+ Metadata .AudioFile .Format .OGG_VORBIS_160 ,
15+ Metadata .AudioFile .Format .OGG_VORBIS_320 ,
16+ ]:
1517 return SuperAudioFormat .VORBIS
16- if audio_format == Metadata .AudioFile .Format .MP3_256 or \
17- audio_format == Metadata .AudioFile .Format .MP3_320 or \
18- audio_format == Metadata .AudioFile .Format .MP3_160 or \
19- audio_format == Metadata .AudioFile .Format .MP3_96 or \
20- audio_format == Metadata .AudioFile .Format .MP3_160_ENC :
18+ if audio_format in [
19+ Metadata .AudioFile .Format .MP3_256 ,
20+ Metadata .AudioFile .Format .MP3_320 ,
21+ Metadata .AudioFile .Format .MP3_160 ,
22+ Metadata .AudioFile .Format .MP3_96 ,
23+ Metadata .AudioFile .Format .MP3_160_ENC ,
24+ ]:
2125 return SuperAudioFormat .MP3
22- if audio_format == Metadata .AudioFile .Format .AAC_24 or \
23- audio_format == Metadata .AudioFile .Format .AAC_48 or \
24- audio_format == Metadata .AudioFile .Format .AAC_24_NORM :
26+ if audio_format in [
27+ Metadata .AudioFile .Format .AAC_24 ,
28+ Metadata .AudioFile .Format .AAC_48 ,
29+ Metadata .AudioFile .Format .AAC_24_NORM ,
30+ ]:
2531 return SuperAudioFormat .AAC
2632 raise RuntimeError ("Unknown audio format: {}" .format (audio_format ))
0 commit comments