From 8f0c784187e55a7cd1015222a4347bf3fda14e90 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Wed, 22 Oct 2025 21:52:20 +0200 Subject: refactor(gui): ✨ update album download options and improve session validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added a new action to download all albums in a playlist. * Removed the deprecated `validate_session` method and replaced it with a direct call to `self.tidal.session.check_login()`. * Adjusted the UI layout in `dialog_settings` to accommodate new options and improved sizing. --- tidal_dl_ng/ui/dialog_settings.py | 48 ++++++++++++++++----------------------- tidal_dl_ng/ui/dialog_settings.ui | 28 ++++++++++++++++++++++- 2 files changed, 47 insertions(+), 29 deletions(-) (limited to 'tidal_dl_ng/ui') diff --git a/tidal_dl_ng/ui/dialog_settings.py b/tidal_dl_ng/ui/dialog_settings.py index 8ab6092..b7ae709 100644 --- a/tidal_dl_ng/ui/dialog_settings.py +++ b/tidal_dl_ng/ui/dialog_settings.py @@ -27,7 +27,7 @@ class Ui_DialogSettings: def setupUi(self, DialogSettings): if not DialogSettings.objectName(): DialogSettings.setObjectName("DialogSettings") - DialogSettings.resize(640, 800) + DialogSettings.resize(640, 832) sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) sizePolicy.setHorizontalStretch(100) sizePolicy.setVerticalStretch(100) @@ -187,47 +187,38 @@ class Ui_DialogSettings: self.horizontalLayout_12.addLayout(self.lv_playlist_create) - self.lv_flag_use_primary_album_artist = QVBoxLayout() - self.lv_flag_use_primary_album_artist.setObjectName("lv_flag_use_primary_album_artist") - self.cb_use_primary_album_artist = QCheckBox(self.gb_flags) - self.cb_use_primary_album_artist.setObjectName("cb_use_primary_album_artist") + self.lv_mark_explicit = QVBoxLayout() + self.lv_mark_explicit.setObjectName("lv_mark_explicit") + self.cb_mark_explicit = QCheckBox(self.gb_flags) + self.cb_mark_explicit.setObjectName("cb_mark_explicit") - self.lv_flag_use_primary_album_artist.addWidget(self.cb_use_primary_album_artist) + self.lv_mark_explicit.addWidget(self.cb_mark_explicit) - self.horizontalLayout_12.addLayout(self.lv_flag_use_primary_album_artist) + self.horizontalLayout_12.addLayout(self.lv_mark_explicit) self.lv_flags.addLayout(self.horizontalLayout_12) self.horizontalLayout_13 = QHBoxLayout() self.horizontalLayout_13.setObjectName("horizontalLayout_13") + self.lv_use_primary_album_artist = QVBoxLayout() + self.lv_use_primary_album_artist.setObjectName("lv_use_primary_album_artist") + self.cb_use_primary_album_artist = QCheckBox(self.gb_flags) + self.cb_use_primary_album_artist.setObjectName("cb_use_primary_album_artist") - self.lv_mark_explicit = QVBoxLayout() - self.lv_mark_explicit.setObjectName("lv_mark_explicit") - self.cb_mark_explicit = QCheckBox(self.gb_flags) - self.cb_mark_explicit.setObjectName("cb_mark_explicit") - - self.lv_mark_explicit.addWidget(self.cb_mark_explicit) - - self.horizontalLayout_13.addLayout(self.lv_mark_explicit) + self.lv_use_primary_album_artist.addWidget(self.cb_use_primary_album_artist) - self.lv_flags.addLayout(self.horizontalLayout_13) + self.horizontalLayout_13.addLayout(self.lv_use_primary_album_artist) - self.lh_flags_atmos = QHBoxLayout() - self.lh_flags_atmos.setObjectName("lh_flags_atmos") - self.lv_flag_download_dolby_atmos = QVBoxLayout() - self.lv_flag_download_dolby_atmos.setObjectName("lv_flag_download_dolby_atmos") + self.lv_download_dolby_atmos = QVBoxLayout() + self.lv_download_dolby_atmos.setObjectName("lv_download_dolby_atmos") self.cb_download_dolby_atmos = QCheckBox(self.gb_flags) self.cb_download_dolby_atmos.setObjectName("cb_download_dolby_atmos") - self.lv_flag_download_dolby_atmos.addWidget(self.cb_download_dolby_atmos) - - self.lh_flags_atmos.addLayout(self.lv_flag_download_dolby_atmos) + self.lv_download_dolby_atmos.addWidget(self.cb_download_dolby_atmos) - self.lv_flag_empty_atmos = QVBoxLayout() - self.lv_flag_empty_atmos.setObjectName("lv_flag_empty_atmos") - self.lh_flags_atmos.addLayout(self.lv_flag_empty_atmos) + self.horizontalLayout_13.addLayout(self.lv_download_dolby_atmos) - self.lv_flags.addLayout(self.lh_flags_atmos) + self.lv_flags.addLayout(self.horizontalLayout_13) self.lv_main.addWidget(self.gb_flags) @@ -626,7 +617,6 @@ class Ui_DialogSettings: # endif // QT_CONFIG(whatsthis) self.cb_lyrics_embed.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_lyrics_file.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) - self.cb_use_primary_album_artist.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_download_delay.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_extract_flac.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_metadata_cover_embed.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) @@ -635,6 +625,8 @@ class Ui_DialogSettings: self.cb_symlink_to_track.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_playlist_create.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_mark_explicit.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) + self.cb_use_primary_album_artist.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) + self.cb_download_dolby_atmos.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.gb_choices.setTitle(QCoreApplication.translate("DialogSettings", "Choices", None)) self.l_icon_quality_audio.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None)) self.l_quality_audio.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None)) diff --git a/tidal_dl_ng/ui/dialog_settings.ui b/tidal_dl_ng/ui/dialog_settings.ui index 95c6b52..3161095 100644 --- a/tidal_dl_ng/ui/dialog_settings.ui +++ b/tidal_dl_ng/ui/dialog_settings.ui @@ -7,7 +7,7 @@ 0 0 640 - 800 + 832 @@ -262,6 +262,32 @@ + + + + + + + + CheckBox + + + + + + + + + + + CheckBox + + + + + + + -- cgit v1.3.1