✨ Config options created for symlinking tracks and playlist creation.

This commit is contained in:
Robert Honz
2024-12-16 08:14:39 +01:00
parent 8d5af178f2
commit 107afd5e3a
4 changed files with 65 additions and 6 deletions
+2
View File
@@ -182,6 +182,8 @@ class DialogPreferences(QtWidgets.QDialog):
"metadata_cover_embed", "metadata_cover_embed",
"cover_album_file", "cover_album_file",
"skip_existing", "skip_existing",
"symlink_to_track",
"playlist_create",
] ]
def gui_populate(self): def gui_populate(self):
+7
View File
@@ -42,6 +42,8 @@ class Settings:
download_delay_sec_max: float = 5.0 download_delay_sec_max: float = 5.0
album_track_num_pad_min: int = 1 album_track_num_pad_min: int = 1
downloads_concurrent_max: int = 3 downloads_concurrent_max: int = 3
symlink_to_track: bool = False
playlist_create: bool = False
@dataclass_json @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." "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)." 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 @dataclass_json
+28 -4
View File
@@ -27,7 +27,7 @@ class Ui_DialogSettings:
def setupUi(self, DialogSettings): def setupUi(self, DialogSettings):
if not DialogSettings.objectName(): if not DialogSettings.objectName():
DialogSettings.setObjectName("DialogSettings") DialogSettings.setObjectName("DialogSettings")
DialogSettings.resize(640, 767) DialogSettings.resize(640, 800)
sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
sizePolicy.setHorizontalStretch(100) sizePolicy.setHorizontalStretch(100)
sizePolicy.setVerticalStretch(100) sizePolicy.setVerticalStretch(100)
@@ -165,13 +165,35 @@ class Ui_DialogSettings:
self.horizontalLayout.addLayout(self.lv_flag_skip_existing) self.horizontalLayout.addLayout(self.lv_flag_skip_existing)
self.verticalLayout_3 = QVBoxLayout() self.lv_symlink_to_track = QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3") 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.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.lv_main.addWidget(self.gb_flags)
self.gb_choices = QGroupBox(DialogSettings) 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_metadata_cover_embed.setText(QCoreApplication.translate("DialogSettings", "CheckBox", None))
self.cb_cover_album_file.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_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.gb_choices.setTitle(QCoreApplication.translate("DialogSettings", "Choices", None))
self.l_icon_quality_audio.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None)) self.l_icon_quality_audio.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
self.l_quality_audio.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None)) self.l_quality_audio.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
+28 -2
View File
@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>640</width> <width>640</width>
<height>767</height> <height>800</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@@ -224,7 +224,33 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"/> <layout class="QVBoxLayout" name="lv_symlink_to_track">
<item>
<widget class="QCheckBox" name="cb_symlink_to_track">
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<layout class="QVBoxLayout" name="lv_playlist_create">
<item>
<widget class="QCheckBox" name="cb_playlist_create">
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4"/>
</item> </item>
</layout> </layout>
</item> </item>