summaryrefslogtreecommitdiff
path: root/tidal_dl_ng
diff options
context:
space:
mode:
Diffstat (limited to 'tidal_dl_ng')
-rw-r--r--tidal_dl_ng/config.py6
-rw-r--r--tidal_dl_ng/gui.py44
-rw-r--r--tidal_dl_ng/model/cfg.py2
-rw-r--r--tidal_dl_ng/ui/main.py223
-rw-r--r--tidal_dl_ng/ui/main.ui62
5 files changed, 93 insertions, 244 deletions
diff --git a/tidal_dl_ng/config.py b/tidal_dl_ng/config.py
index 72b9f93..7ab9f24 100644
--- a/tidal_dl_ng/config.py
+++ b/tidal_dl_ng/config.py
@@ -96,9 +96,11 @@ class Tidal(BaseConfig, metaclass=SingletonMeta):
def __init__(self, settings: Settings = None):
self.cls_model = ModelToken
tidal_config: tidalapi.Config = tidalapi.Config(item_limit=10000)
+ if settings and settings.data.api_key_client_id:
+ tidal_config.client_id = settings.data.api_key_client_id
+ tidal_config.client_secret = settings.data.api_key_client_secret
+
self.session = tidalapi.Session(tidal_config)
- # self.session.config.client_id = "km8T1xS355y7dd3H"
- # self.session.config.client_secret = "vcmeGW1OuZ0fWYMCSZ6vNvSLJlT3XEpW0ambgYt5ZuI="
self.file_path = path_file_token()
self.token_from_storage = self.read(self.file_path)
diff --git a/tidal_dl_ng/gui.py b/tidal_dl_ng/gui.py
index d0ee637..f38461b 100644
--- a/tidal_dl_ng/gui.py
+++ b/tidal_dl_ng/gui.py
@@ -52,7 +52,7 @@ from typing import Any
from requests.exceptions import HTTPError
from tidalapi.session import LinkLogin
-
+from tidal_dl_ng import api as ApiKeys
from tidal_dl_ng import __version__, update_available
from tidal_dl_ng.dialog import DialogLogin, DialogPreferences, DialogVersion
from tidal_dl_ng.helper.gui import (
@@ -170,6 +170,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self._init_progressbar()
self._populate_quality(self.cb_quality_audio, Quality)
self._populate_quality(self.cb_quality_video, QualityVideo)
+ self._populate_api_keys(self.cb_api_key)
self._populate_search_types(self.cb_search_type, SearchTypes)
self.apply_settings(self.settings)
self._init_signals()
@@ -305,6 +306,14 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self.te_debug.setTextCursor(cursor)
self.te_debug.ensureCursorVisible()
+
+ def _populate_api_keys(self, ui_target: QtWidgets.QComboBox) -> None:
+ """Puebla el ComboBox con los API keys disponibles."""
+ ui_target.addItem("Por defecto", None)
+ for i, key_data in enumerate(ApiKeys.getItems()):
+ if key_data["valid"] == "True":
+ platform_name = f"{key_data['platform']} - ({key_data['formats']})"
+ ui_target.addItem(platform_name, i)
def _populate_quality(self, ui_target: QtWidgets.QComboBox, options: Iterable[Any]) -> None:
"""Populate a combo box with quality options.
@@ -516,6 +525,17 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
item["element"].setCurrentIndex(idx)
else:
item["element"].setCurrentIndex(item["default_id"])
+ if settings.data.api_key_client_id:
+ for i in range(self.cb_api_key.count()):
+ key_index = self.cb_api_key.itemData(i)
+ if key_index is not None:
+ key_data = ApiKeys.getItem(key_index)
+ if key_data["clientId"] == settings.data.api_key_client_id:
+ self.cb_api_key.setCurrentIndex(i)
+ break
+ else:
+ self.cb_api_key.setCurrentIndex(0) # "Por defecto"
+
def on_spinner_start(self, parent: QtWidgets.QWidget) -> None:
"""Start a loading spinner on the given parent widget.
@@ -885,6 +905,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
Returns:
ResultItem: The constructed ResultItem.
"""
+
+ final_quality = quality_audio_highest(item)
+ if hasattr(item, "audio_modes") and "DOLBY_ATMOS" in item.audio_modes:
+ final_quality = "Dolby Atmos"
+
return ResultItem(
position=idx,
artist=name_builder_artist(item),
@@ -892,7 +917,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
album=item.album.name,
duration_sec=item.duration,
obj=item,
- quality=quality_audio_highest(item),
+ quality=final_quality,
explicit=bool(item.explicit),
date_user_added=date_user_added,
date_release=date_release,
@@ -1105,6 +1130,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
)
self.cb_quality_audio.currentIndexChanged.connect(self.on_quality_set_audio)
self.cb_quality_video.currentIndexChanged.connect(self.on_quality_set_video)
+ self.cb_api_key.currentIndexChanged.connect(self.on_api_key_set)
self.tr_lists_user.itemClicked.connect(self.on_list_items_show)
self.s_spinner_start[QtWidgets.QWidget].connect(self.on_spinner_start)
self.s_spinner_stop.connect(self.on_spinner_stop)
@@ -1207,6 +1233,20 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
if self.tidal:
self.tidal.settings_apply()
+ def on_api_key_set(self, index: int) -> None:
+ """Guarda el API Key seleccionado en la configuración."""
+ key_index = self.cb_api_key.itemData(index)
+ if key_index is not None:
+ key_data = ApiKeys.getItem(key_index)
+ self.settings.data.api_key_client_id = key_data["clientId"]
+ self.settings.data.api_key_client_secret = key_data["clientSecret"]
+ else: # Si se selecciona "Por defecto"
+ self.settings.data.api_key_client_id = ""
+ self.settings.data.api_key_client_secret = ""
+
+ self.settings.save()
+ logger_gui.info("API Key cambiado. Reinicia la aplicación para aplicar los cambios.")
+
def on_list_items_show(self, item: QtWidgets.QTreeWidgetItem) -> None:
"""Show the items in the selected playlist or mix.
diff --git a/tidal_dl_ng/model/cfg.py b/tidal_dl_ng/model/cfg.py
index 44db92f..b3bc202 100644
--- a/tidal_dl_ng/model/cfg.py
+++ b/tidal_dl_ng/model/cfg.py
@@ -56,6 +56,8 @@ class Settings:
filename_delimiter_artist: str = ", "
filename_delimiter_album_artist: str = ", "
metadata_target_upc: MetadataTargetUPC = MetadataTargetUPC.UPC
+ api_key_client_id: str = ""
+ api_key_client_secret: str = ""
@dataclass_json
diff --git a/tidal_dl_ng/ui/main.py b/tidal_dl_ng/ui/main.py
index 4b60620..221db1e 100644
--- a/tidal_dl_ng/ui/main.py
+++ b/tidal_dl_ng/ui/main.py
@@ -39,15 +39,9 @@ class Ui_MainWindow:
self.a_preferences.setEnabled(True)
self.a_preferences.setText("Preferences...")
self.a_preferences.setIconText("Preferences...")
- # if QT_CONFIG(tooltip)
self.a_preferences.setToolTip("Preferences...")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.a_preferences.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.a_preferences.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
self.a_version = QAction(MainWindow)
self.a_version.setObjectName("a_version")
self.a_exit = QAction(MainWindow)
@@ -64,21 +58,11 @@ class Ui_MainWindow:
sizePolicy.setVerticalStretch(100)
sizePolicy.setHeightForWidth(self.w_central.sizePolicy().hasHeightForWidth())
self.w_central.setSizePolicy(sizePolicy)
- # if QT_CONFIG(tooltip)
self.w_central.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.w_central.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.w_central.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.w_central.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.w_central.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.horizontalLayout = QHBoxLayout(self.w_central)
self.horizontalLayout.setObjectName("horizontalLayout")
self.lv_list_user = QVBoxLayout()
@@ -95,21 +79,11 @@ class Ui_MainWindow:
__qtreewidgetitem3 = QTreeWidgetItem(self.tr_lists_user)
__qtreewidgetitem3.setFlags(Qt.ItemIsEnabled)
self.tr_lists_user.setObjectName("tr_lists_user")
- # if QT_CONFIG(tooltip)
self.tr_lists_user.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.tr_lists_user.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.tr_lists_user.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.tr_lists_user.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.tr_lists_user.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.tr_lists_user.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
self.tr_lists_user.setProperty("showDropIndicator", False)
self.tr_lists_user.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
@@ -119,9 +93,7 @@ class Ui_MainWindow:
self.tr_lists_user.header().setCascadingSectionResizes(True)
self.tr_lists_user.header().setHighlightSections(True)
self.tr_lists_user.header().setProperty("showSortIndicator", True)
-
self.lv_list_user.addWidget(self.tr_lists_user)
-
self.lv_list_control = QHBoxLayout()
self.lv_list_control.setObjectName("lv_list_control")
self.pb_reload_user_lists = QPushButton(self.w_central)
@@ -131,99 +103,54 @@ class Ui_MainWindow:
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.pb_reload_user_lists.sizePolicy().hasHeightForWidth())
self.pb_reload_user_lists.setSizePolicy(sizePolicy1)
-
self.lv_list_control.addWidget(self.pb_reload_user_lists)
-
self.pb_download_list = QPushButton(self.w_central)
self.pb_download_list.setObjectName("pb_download_list")
sizePolicy1.setHeightForWidth(self.pb_download_list.sizePolicy().hasHeightForWidth())
self.pb_download_list.setSizePolicy(sizePolicy1)
-
self.lv_list_control.addWidget(self.pb_download_list)
-
self.lv_list_user.addLayout(self.lv_list_control)
-
self.horizontalLayout.addLayout(self.lv_list_user)
-
self.lv_search_result = QVBoxLayout()
- # ifndef Q_OS_MAC
self.lv_search_result.setSpacing(-1)
- # endif
self.lv_search_result.setObjectName("lv_search_result")
self.lh_search = QHBoxLayout()
self.lh_search.setObjectName("lh_search")
self.l_search = QLineEdit(self.w_central)
self.l_search.setObjectName("l_search")
self.l_search.setAcceptDrops(False)
- # if QT_CONFIG(tooltip)
self.l_search.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.l_search.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.l_search.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.l_search.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.l_search.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.l_search.setLocale(QLocale(QLocale.English, QLocale.UnitedStates))
self.l_search.setText("")
self.l_search.setPlaceholderText("Type and press ENTER to search...")
self.l_search.setClearButtonEnabled(True)
-
self.lh_search.addWidget(self.l_search)
-
self.cb_search_type = QComboBox(self.w_central)
self.cb_search_type.setObjectName("cb_search_type")
self.cb_search_type.setMinimumSize(QSize(100, 0))
- # if QT_CONFIG(tooltip)
self.cb_search_type.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.cb_search_type.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.cb_search_type.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.cb_search_type.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.cb_search_type.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.cb_search_type.setCurrentText("")
self.cb_search_type.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContentsOnFirstShow)
self.cb_search_type.setPlaceholderText("")
-
self.lh_search.addWidget(self.cb_search_type)
-
self.pb_search = QPushButton(self.w_central)
self.pb_search.setObjectName("pb_search")
- # if QT_CONFIG(statustip)
self.pb_search.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.pb_search.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.pb_search.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.pb_search.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.pb_search.setText("Search")
- # if QT_CONFIG(shortcut)
self.pb_search.setShortcut("")
- # endif // QT_CONFIG(shortcut)
-
self.lh_search.addWidget(self.pb_search)
-
self.lv_search_result.addLayout(self.lh_search)
-
self.tr_results = QTreeView(self.w_central)
self.tr_results.setObjectName("tr_results")
self.tr_results.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
@@ -233,138 +160,81 @@ class Ui_MainWindow:
self.tr_results.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
self.tr_results.setIndentation(10)
self.tr_results.setSortingEnabled(True)
-
self.lv_search_result.addWidget(self.tr_results)
-
self.lh_download = QHBoxLayout()
self.lh_download.setObjectName("lh_download")
self.l_quality_audio = QLabel(self.w_central)
self.l_quality_audio.setObjectName("l_quality_audio")
- # if QT_CONFIG(tooltip)
self.l_quality_audio.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.l_quality_audio.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.l_quality_audio.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.l_quality_audio.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.l_quality_audio.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.l_quality_audio.setText("Audio")
- self.l_quality_audio.setAlignment(
- Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignTrailing | Qt.AlignmentFlag.AlignVCenter
- )
-
+ self.l_quality_audio.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignTrailing | Qt.AlignmentFlag.AlignVCenter)
self.lh_download.addWidget(self.l_quality_audio)
-
self.cb_quality_audio = QComboBox(self.w_central)
self.cb_quality_audio.setObjectName("cb_quality_audio")
self.cb_quality_audio.setMinimumSize(QSize(140, 0))
- # if QT_CONFIG(tooltip)
self.cb_quality_audio.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.cb_quality_audio.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.cb_quality_audio.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.cb_quality_audio.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.cb_quality_audio.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.cb_quality_audio.setCurrentText("")
self.cb_quality_audio.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContentsOnFirstShow)
self.cb_quality_audio.setPlaceholderText("")
self.cb_quality_audio.setFrame(True)
-
self.lh_download.addWidget(self.cb_quality_audio)
-
self.l_quality_video = QLabel(self.w_central)
self.l_quality_video.setObjectName("l_quality_video")
- # if QT_CONFIG(tooltip)
self.l_quality_video.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.l_quality_video.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.l_quality_video.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.l_quality_video.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.l_quality_video.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.l_quality_video.setText("Video")
- self.l_quality_video.setAlignment(
- Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignTrailing | Qt.AlignmentFlag.AlignVCenter
- )
-
+ self.l_quality_video.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignTrailing | Qt.AlignmentFlag.AlignVCenter)
self.lh_download.addWidget(self.l_quality_video)
-
self.cb_quality_video = QComboBox(self.w_central)
self.cb_quality_video.setObjectName("cb_quality_video")
self.cb_quality_video.setMinimumSize(QSize(100, 0))
- # if QT_CONFIG(tooltip)
self.cb_quality_video.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.cb_quality_video.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.cb_quality_video.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.cb_quality_video.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.cb_quality_video.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.cb_quality_video.setCurrentText("")
self.cb_quality_video.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContentsOnFirstShow)
self.cb_quality_video.setPlaceholderText("")
-
self.lh_download.addWidget(self.cb_quality_video)
+
+ # Start of manually added API Key UI
+ self.l_api_key = QLabel(self.w_central)
+ self.l_api_key.setObjectName("l_api_key")
+ self.l_api_key.setText("API Key")
+ self.l_api_key.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignTrailing | Qt.AlignmentFlag.AlignVCenter)
+ self.lh_download.addWidget(self.l_api_key)
+ self.cb_api_key = QComboBox(self.w_central)
+ self.cb_api_key.setObjectName("cb_api_key")
+ self.cb_api_key.setMinimumSize(QSize(140, 0))
+ self.lh_download.addWidget(self.cb_api_key)
+ # End of manually added API Key UI
self.pb_download = QPushButton(self.w_central)
self.pb_download.setObjectName("pb_download")
- # if QT_CONFIG(tooltip)
self.pb_download.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.pb_download.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.pb_download.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.pb_download.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.pb_download.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.pb_download.setText("Download")
- # if QT_CONFIG(shortcut)
self.pb_download.setShortcut("")
- # endif // QT_CONFIG(shortcut)
-
self.lh_download.addWidget(self.pb_download)
-
self.lh_download.setStretch(0, 5)
self.lh_download.setStretch(2, 5)
self.lh_download.setStretch(4, 15)
-
self.lv_search_result.addLayout(self.lh_download)
-
self.te_debug = QPlainTextEdit(self.w_central)
self.te_debug.setObjectName("te_debug")
self.te_debug.setEnabled(True)
@@ -375,28 +245,15 @@ class Ui_MainWindow:
self.te_debug.setSizePolicy(sizePolicy2)
self.te_debug.setMaximumSize(QSize(16777215, 16777215))
self.te_debug.setAcceptDrops(False)
- # if QT_CONFIG(tooltip)
self.te_debug.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.te_debug.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.te_debug.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.te_debug.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.te_debug.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.te_debug.setUndoRedoEnabled(False)
self.te_debug.setReadOnly(True)
-
self.lv_search_result.addWidget(self.te_debug)
-
self.horizontalLayout.addLayout(self.lv_search_result)
-
self.lv_info = QVBoxLayout()
self.lv_info.setObjectName("lv_info")
self.lv_info_item = QVBoxLayout()
@@ -416,13 +273,9 @@ class Ui_MainWindow:
self.l_pm_cover.setPixmap(QPixmap("default_album_image.png"))
self.l_pm_cover.setScaledContents(True)
self.l_pm_cover.setAlignment(Qt.AlignmentFlag.AlignHCenter | Qt.AlignmentFlag.AlignTop)
-
self.horizontalLayout_2.addWidget(self.l_pm_cover)
-
self.lv_info_item.addLayout(self.horizontalLayout_2)
-
self.lv_info.addLayout(self.lv_info_item)
-
self.lv_queue_download = QVBoxLayout()
self.lv_queue_download.setObjectName("lv_queue_download")
self.l_h_queue_download = QLabel(self.w_central)
@@ -432,9 +285,7 @@ class Ui_MainWindow:
font.setItalic(False)
font.setKerning(True)
self.l_h_queue_download.setFont(font)
-
self.lv_queue_download.addWidget(self.l_h_queue_download)
-
self.tr_queue_download = QTreeWidget(self.w_central)
__qtreewidgetitem4 = QTreeWidgetItem()
__qtreewidgetitem4.setText(0, "\ud83e\uddd1\u200d\ud83d\udcbb\ufe0f")
@@ -452,9 +303,7 @@ class Ui_MainWindow:
self.tr_queue_download.setExpandsOnDoubleClick(False)
self.tr_queue_download.header().setProperty("showSortIndicator", False)
self.tr_queue_download.header().setStretchLastSection(False)
-
self.lv_queue_download.addWidget(self.tr_queue_download)
-
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.pb_queue_download_remove = QPushButton(self.w_central)
@@ -462,94 +311,52 @@ class Ui_MainWindow:
self.pb_queue_download_remove.setEnabled(True)
icon = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.EditClear))
self.pb_queue_download_remove.setIcon(icon)
-
self.horizontalLayout_4.addWidget(self.pb_queue_download_remove)
-
self.pb_queue_download_toggle = QPushButton(self.w_central)
self.pb_queue_download_toggle.setObjectName("pb_queue_download_toggle")
icon1 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackPause))
self.pb_queue_download_toggle.setIcon(icon1)
-
self.horizontalLayout_4.addWidget(self.pb_queue_download_toggle)
-
self.lv_queue_download.addLayout(self.horizontalLayout_4)
-
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.pb_queue_download_clear_finished = QPushButton(self.w_central)
self.pb_queue_download_clear_finished.setObjectName("pb_queue_download_clear_finished")
-
self.horizontalLayout_3.addWidget(self.pb_queue_download_clear_finished)
-
self.pb_queue_download_clear_all = QPushButton(self.w_central)
self.pb_queue_download_clear_all.setObjectName("pb_queue_download_clear_all")
-
self.horizontalLayout_3.addWidget(self.pb_queue_download_clear_all)
-
self.lv_queue_download.addLayout(self.horizontalLayout_3)
-
self.lv_info.addLayout(self.lv_queue_download)
-
self.horizontalLayout.addLayout(self.lv_info)
-
self.horizontalLayout.setStretch(1, 50)
self.horizontalLayout.setStretch(2, 25)
MainWindow.setCentralWidget(self.w_central)
self.menubar = QMenuBar(MainWindow)
self.menubar.setObjectName("menubar")
self.menubar.setGeometry(QRect(0, 0, 1200, 24))
- # if QT_CONFIG(tooltip)
self.menubar.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.menubar.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.menubar.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.menubar.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.menubar.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.m_file = QMenu(self.menubar)
self.m_file.setObjectName("m_file")
- # if QT_CONFIG(tooltip)
self.m_file.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.m_file.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.m_file.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.m_file.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.m_file.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.m_help = QMenu(self.menubar)
self.m_help.setObjectName("m_help")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
- # if QT_CONFIG(tooltip)
self.statusbar.setToolTip("")
- # endif // QT_CONFIG(tooltip)
- # if QT_CONFIG(statustip)
self.statusbar.setStatusTip("")
- # endif // QT_CONFIG(statustip)
- # if QT_CONFIG(whatsthis)
self.statusbar.setWhatsThis("")
- # endif // QT_CONFIG(whatsthis)
- # if QT_CONFIG(accessibility)
self.statusbar.setAccessibleName("")
- # endif // QT_CONFIG(accessibility)
- # if QT_CONFIG(accessibility)
self.statusbar.setAccessibleDescription("")
- # endif // QT_CONFIG(accessibility)
self.statusbar.setLayoutDirection(Qt.LayoutDirection.LeftToRight)
MainWindow.setStatusBar(self.statusbar)
@@ -604,4 +411,4 @@ class Ui_MainWindow:
self.m_file.setTitle(QCoreApplication.translate("MainWindow", "File", None))
self.m_help.setTitle(QCoreApplication.translate("MainWindow", "Help", None))
- # retranslateUi
+ # retranslateUi \ No newline at end of file
diff --git a/tidal_dl_ng/ui/main.ui b/tidal_dl_ng/ui/main.ui
index 23d98e6..55394e1 100644
--- a/tidal_dl_ng/ui/main.ui
+++ b/tidal_dl_ng/ui/main.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow">
+ <class>cb_api_key</class>
+ <widget class="QMainWindow" name="cb_api_key">
<property name="geometry">
<rect>
<x>0</x>
@@ -59,13 +59,13 @@
<string notr="true"/>
</property>
<property name="editTriggers">
- <set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
+ <set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="selectionMode">
- <enum>QAbstractItemView::SelectionMode::ExtendedSelection</enum>
+ <enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="indentation">
<number>10</number>
@@ -195,9 +195,9 @@
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="lv_search_result" stretch="0,0,0,0">
+ <layout class="QVBoxLayout" name="lv_search_result" stretch="0,0,0,0,0">
<property name="spacing">
- <number>-1</number>
+ <number>7</number>
</property>
<item>
<layout class="QHBoxLayout" name="lh_search">
@@ -262,9 +262,9 @@
<string notr="true"/>
</property>
<property name="sizeAdjustPolicy">
- <enum>QComboBox::SizeAdjustPolicy::AdjustToContentsOnFirstShow</enum>
+ <enum>QComboBox::AdjustToContents</enum>
</property>
- <property name="placeholderText">
+ <property name="placeholderText" stdset="0">
<string notr="true"/>
</property>
</widget>
@@ -296,7 +296,7 @@
<item>
<widget class="QTreeView" name="tr_results">
<property name="editTriggers">
- <set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
+ <set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
@@ -308,7 +308,7 @@
<bool>false</bool>
</property>
<property name="selectionMode">
- <enum>QAbstractItemView::SelectionMode::ExtendedSelection</enum>
+ <enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="indentation">
<number>10</number>
@@ -340,9 +340,6 @@
<property name="text">
<string notr="true">Audio</string>
</property>
- <property name="alignment">
- <set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
- </property>
</widget>
</item>
<item>
@@ -372,14 +369,14 @@
<string notr="true"/>
</property>
<property name="sizeAdjustPolicy">
- <enum>QComboBox::SizeAdjustPolicy::AdjustToContentsOnFirstShow</enum>
- </property>
- <property name="placeholderText">
- <string notr="true"/>
+ <enum>QComboBox::AdjustToContents</enum>
</property>
<property name="frame">
<bool>true</bool>
</property>
+ <property name="placeholderText" stdset="0">
+ <string notr="true"/>
+ </property>
</widget>
</item>
<item>
@@ -402,9 +399,6 @@
<property name="text">
<string notr="true">Video</string>
</property>
- <property name="alignment">
- <set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
- </property>
</widget>
</item>
<item>
@@ -434,9 +428,9 @@
<string notr="true"/>
</property>
<property name="sizeAdjustPolicy">
- <enum>QComboBox::SizeAdjustPolicy::AdjustToContentsOnFirstShow</enum>
+ <enum>QComboBox::AdjustToContents</enum>
</property>
- <property name="placeholderText">
+ <property name="placeholderText" stdset="0">
<string notr="true"/>
</property>
</widget>
@@ -469,6 +463,9 @@
</layout>
</item>
<item>
+ <widget class="QComboBox" name="comboBox"/>
+ </item>
+ <item>
<widget class="QPlainTextEdit" name="te_debug">
<property name="enabled">
<bool>true</bool>
@@ -543,7 +540,7 @@
</size>
</property>
<property name="frameShape">
- <enum>QFrame::Shape::NoFrame</enum>
+ <enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string/>
@@ -554,9 +551,6 @@
<property name="scaledContents">
<bool>true</bool>
</property>
- <property name="alignment">
- <set>Qt::AlignmentFlag::AlignHCenter|Qt::AlignmentFlag::AlignTop</set>
- </property>
</widget>
</item>
</layout>
@@ -569,6 +563,7 @@
<widget class="QLabel" name="l_h_queue_download">
<property name="font">
<font>
+ <weight>75</weight>
<italic>false</italic>
<bold>true</bold>
<kerning>true</kerning>
@@ -582,7 +577,7 @@
<item>
<widget class="QTreeWidget" name="tr_queue_download">
<property name="editTriggers">
- <set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
+ <set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
@@ -594,10 +589,10 @@
<bool>false</bool>
</property>
<property name="selectionMode">
- <enum>QAbstractItemView::SelectionMode::ExtendedSelection</enum>
+ <enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="selectionBehavior">
- <enum>QAbstractItemView::SelectionBehavior::SelectRows</enum>
+ <enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
@@ -660,7 +655,8 @@
<string>Remove</string>
</property>
<property name="icon">
- <iconset theme="QIcon::ThemeIcon::EditClear"/>
+ <iconset theme="QIcon::ThemeIcon::EditClear">
+ <normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
@@ -671,6 +667,8 @@
</property>
<property name="icon">
<iconset theme="QIcon::ThemeIcon::MediaPlaybackPause"/>
+ <iconset theme="QIcon::ThemeIcon::MediaPlaybackStart">
+ <normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
@@ -706,7 +704,7 @@
<x>0</x>
<y>0</y>
<width>1200</width>
- <height>24</height>
+ <height>26</height>
</rect>
</property>
<property name="toolTip">
@@ -774,7 +772,7 @@
<string notr="true"/>
</property>
<property name="layoutDirection">
- <enum>Qt::LayoutDirection::LeftToRight</enum>
+ <enum>Qt::LeftToRight</enum>
</property>
</widget>
<action name="a_preferences">