diff options
| author | Rikrdoga <ricardoga@outlook.com> | 2025-11-12 15:18:35 -0600 |
|---|---|---|
| committer | Rikrdoga <ricardoga@outlook.com> | 2025-11-12 15:18:35 -0600 |
| commit | 4f0026fadae02d34cf3ce5a2b1dd9c7e29b5bd99 (patch) | |
| tree | 8f2916f7c4f49bfd416639eb47935b188d5f2749 /tidal_dl_ng/config.py | |
| parent | af58b0a83db5f1ae6d5ca4a74e280f97b8ec6b13 (diff) | |
| download | tidal-dl-ng-4f0026fadae02d34cf3ce5a2b1dd9c7e29b5bd99.tar.gz | |
Create TrackStreamInfo dataclass & Add proper docstrings
Diffstat (limited to 'tidal_dl_ng/config.py')
| -rw-r--r-- | tidal_dl_ng/config.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tidal_dl_ng/config.py b/tidal_dl_ng/config.py index 134f3ff..8be4459 100644 --- a/tidal_dl_ng/config.py +++ b/tidal_dl_ng/config.py @@ -179,6 +179,9 @@ class Tidal(BaseConfig, metaclass=SingletonMeta): """ Switches the shared session to Dolby Atmos credentials. Only re-authenticates if not already in Atmos mode. + + Returns: + bool: True if successful or already in Atmos mode, False otherwise. """ # If we are already in Atmos mode, do nothing. if self.is_atmos_session: @@ -204,6 +207,12 @@ class Tidal(BaseConfig, metaclass=SingletonMeta): """ Restores the shared session to the original user credentials. Only re-authenticates if not already in Normal mode. + + Args: + force: If True, forces restoration even if already in Normal mode. + + Returns: + bool: True if successful or already in Normal mode, False otherwise. """ # If we are already in Normal mode (and not forced), do nothing. if not self.is_atmos_session and not force: @@ -213,8 +222,8 @@ class Tidal(BaseConfig, metaclass=SingletonMeta): self.session.config.client_id = self.original_client_id self.session.config.client_secret = self.original_client_secret - # Re-apply user's quality setting - self.settings_apply() + # Explicitly restore audio quality to user's configured setting + self.session.audio_quality = tidalapi.Quality(self.settings.data.quality_audio) # Re-login with original credentials if not self.login_token(do_pkce=self.is_pkce): |
