diff --git a/tidal_dl_ng/dialog.py b/tidal_dl_ng/dialog.py index 4e36d8a..b17c151 100644 --- a/tidal_dl_ng/dialog.py +++ b/tidal_dl_ng/dialog.py @@ -182,6 +182,8 @@ class DialogPreferences(QtWidgets.QDialog): "metadata_cover_embed", "cover_album_file", "skip_existing", + "symlink_to_track", + "playlist_create", ] def gui_populate(self): diff --git a/tidal_dl_ng/model/cfg.py b/tidal_dl_ng/model/cfg.py index 88636f1..557371a 100644 --- a/tidal_dl_ng/model/cfg.py +++ b/tidal_dl_ng/model/cfg.py @@ -42,6 +42,8 @@ class Settings: download_delay_sec_max: float = 5.0 album_track_num_pad_min: int = 1 downloads_concurrent_max: int = 3 + symlink_to_track: bool = False + playlist_create: bool = False @dataclass_json @@ -90,6 +92,11 @@ class HelpSettings: "Minimum length of the album track count, will be padded with zeroes (0). To disable padding set this to 1." ) downloads_concurrent_max: str = "Maximum concurrent number of downloads (threads)." + symlink_to_track: str = ( + "If enabled the tracks of albums, playlists and mixes will be downloaded to the track directory but symlinked " + "accordingly." + ) + playlist_create: str = "Creates a '_playlist.m3u8' file for downloaded albums, playlists and mixes." @dataclass_json diff --git a/tidal_dl_ng/ui/dialog_settings.py b/tidal_dl_ng/ui/dialog_settings.py index 945af92..3098817 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, 767) + DialogSettings.resize(640, 800) sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) sizePolicy.setHorizontalStretch(100) sizePolicy.setVerticalStretch(100) @@ -165,13 +165,35 @@ class Ui_DialogSettings: self.horizontalLayout.addLayout(self.lv_flag_skip_existing) - self.verticalLayout_3 = QVBoxLayout() - self.verticalLayout_3.setObjectName("verticalLayout_3") + self.lv_symlink_to_track = QVBoxLayout() + self.lv_symlink_to_track.setObjectName("lv_symlink_to_track") + self.cb_symlink_to_track = QCheckBox(self.gb_flags) + self.cb_symlink_to_track.setObjectName("cb_symlink_to_track") - self.horizontalLayout.addLayout(self.verticalLayout_3) + self.lv_symlink_to_track.addWidget(self.cb_symlink_to_track) + + self.horizontalLayout.addLayout(self.lv_symlink_to_track) self.lv_flags.addLayout(self.horizontalLayout) + self.horizontalLayout_12 = QHBoxLayout() + self.horizontalLayout_12.setObjectName("horizontalLayout_12") + self.lv_playlist_create = QVBoxLayout() + self.lv_playlist_create.setObjectName("lv_playlist_create") + self.cb_playlist_create = QCheckBox(self.gb_flags) + self.cb_playlist_create.setObjectName("cb_playlist_create") + + self.lv_playlist_create.addWidget(self.cb_playlist_create) + + self.horizontalLayout_12.addLayout(self.lv_playlist_create) + + self.verticalLayout_4 = QVBoxLayout() + self.verticalLayout_4.setObjectName("verticalLayout_4") + + self.horizontalLayout_12.addLayout(self.verticalLayout_4) + + self.lv_flags.addLayout(self.horizontalLayout_12) + self.lv_main.addWidget(self.gb_flags) self.gb_choices = QGroupBox(DialogSettings) @@ -574,6 +596,8 @@ class Ui_DialogSettings: self.cb_metadata_cover_embed.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_cover_album_file.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) self.cb_skip_existing.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) + self.cb_symlink_to_track.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None)) + self.cb_playlist_create.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 d81701a..5287e38 100644 --- a/tidal_dl_ng/ui/dialog_settings.ui +++ b/tidal_dl_ng/ui/dialog_settings.ui @@ -7,7 +7,7 @@ 0 0 640 - 767 + 800 @@ -224,7 +224,33 @@ - + + + + + CheckBox + + + + + + + + + + + + + + + CheckBox + + + + + + +