Restyled by black
This commit is contained in:
@@ -15,11 +15,17 @@ class PlayerConfiguration:
|
||||
initial_volume: int
|
||||
volume_steps: int
|
||||
|
||||
def __init__(self, preferred_quality: AudioQuality,
|
||||
enable_normalisation: bool, normalisation_pregain: float,
|
||||
autoplay_enabled: bool, crossfade_duration: int,
|
||||
preload_enabled: bool, initial_volume: int,
|
||||
volume_steps: int):
|
||||
def __init__(
|
||||
self,
|
||||
preferred_quality: AudioQuality,
|
||||
enable_normalisation: bool,
|
||||
normalisation_pregain: float,
|
||||
autoplay_enabled: bool,
|
||||
crossfade_duration: int,
|
||||
preload_enabled: bool,
|
||||
initial_volume: int,
|
||||
volume_steps: int,
|
||||
):
|
||||
self.preferred_quality = preferred_quality
|
||||
self.enable_normalisation = enable_normalisation
|
||||
self.normalisation_pregain = normalisation_pregain
|
||||
@@ -44,18 +50,15 @@ class PlayerConfiguration:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def set_preferred_quality(
|
||||
self, preferred_quality: AudioQuality) -> __class__:
|
||||
def set_preferred_quality(self, preferred_quality: AudioQuality) -> __class__:
|
||||
self.preferred_quality = preferred_quality
|
||||
return self
|
||||
|
||||
def set_enable_normalisation(self,
|
||||
enable_normalisation: bool) -> __class__:
|
||||
def set_enable_normalisation(self, enable_normalisation: bool) -> __class__:
|
||||
self.enable_normalisation = enable_normalisation
|
||||
return self
|
||||
|
||||
def set_normalisation_pregain(
|
||||
self, normalisation_pregain: float) -> __class__:
|
||||
def set_normalisation_pregain(self, normalisation_pregain: float) -> __class__:
|
||||
self.normalisation_pregain = normalisation_pregain
|
||||
return self
|
||||
|
||||
@@ -73,7 +76,12 @@ class PlayerConfiguration:
|
||||
|
||||
def build(self) -> PlayerConfiguration:
|
||||
return PlayerConfiguration(
|
||||
self.preferred_quality, self.enable_normalisation,
|
||||
self.normalisation_pregain, self.autoplay_enabled,
|
||||
self.crossfade_duration, self.preload_enabled,
|
||||
self.initial_volume, self.volume_steps)
|
||||
self.preferred_quality,
|
||||
self.enable_normalisation,
|
||||
self.normalisation_pregain,
|
||||
self.autoplay_enabled,
|
||||
self.crossfade_duration,
|
||||
self.preload_enabled,
|
||||
self.initial_volume,
|
||||
self.volume_steps,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user