Merge branch 'feature/json-downloaded' into fusion-refac-&-info

# Conflicts:
#	.gitignore
#	README.md
#	tidal_dl_ng/gui.py
This commit is contained in:
Warry
2025-12-03 11:41:18 +01:00
22 changed files with 5339 additions and 226 deletions
+171
View File
@@ -0,0 +1,171 @@
################################################################################
## Form generated from reading UI file 'dialog_history.ui'
##
## Created by: Qt User Interface Compiler version 6.10.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import QCoreApplication, QMetaObject
from PySide6.QtWidgets import (
QAbstractItemView,
QGroupBox,
QHBoxLayout,
QLabel,
QLineEdit,
QPushButton,
QSizePolicy,
QSpacerItem,
QTreeWidget,
QVBoxLayout,
)
class Ui_DialogHistory:
def setupUi(self, DialogHistory):
if not DialogHistory.objectName():
DialogHistory.setObjectName("DialogHistory")
DialogHistory.resize(900, 600)
self.verticalLayout = QVBoxLayout(DialogHistory)
self.verticalLayout.setObjectName("verticalLayout")
self.l_info = QLabel(DialogHistory)
self.l_info.setObjectName("l_info")
self.l_info.setWordWrap(True)
self.verticalLayout.addWidget(self.l_info)
self.gb_file_info = QGroupBox(DialogHistory)
self.gb_file_info.setObjectName("gb_file_info")
self.horizontalLayout = QHBoxLayout(self.gb_file_info)
self.horizontalLayout.setObjectName("horizontalLayout")
self.le_file_path = QLineEdit(self.gb_file_info)
self.le_file_path.setObjectName("le_file_path")
self.le_file_path.setReadOnly(True)
self.horizontalLayout.addWidget(self.le_file_path)
self.pb_open_folder = QPushButton(self.gb_file_info)
self.pb_open_folder.setObjectName("pb_open_folder")
self.horizontalLayout.addWidget(self.pb_open_folder)
self.verticalLayout.addWidget(self.gb_file_info)
self.gb_statistics = QGroupBox(DialogHistory)
self.gb_statistics.setObjectName("gb_statistics")
self.horizontalLayout_2 = QHBoxLayout(self.gb_statistics)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.l_total_tracks = QLabel(self.gb_statistics)
self.l_total_tracks.setObjectName("l_total_tracks")
self.horizontalLayout_2.addWidget(self.l_total_tracks)
self.l_by_albums = QLabel(self.gb_statistics)
self.l_by_albums.setObjectName("l_by_albums")
self.horizontalLayout_2.addWidget(self.l_by_albums)
self.l_by_playlists = QLabel(self.gb_statistics)
self.l_by_playlists.setObjectName("l_by_playlists")
self.horizontalLayout_2.addWidget(self.l_by_playlists)
self.l_by_mixes = QLabel(self.gb_statistics)
self.l_by_mixes.setObjectName("l_by_mixes")
self.horizontalLayout_2.addWidget(self.l_by_mixes)
self.l_by_manual = QLabel(self.gb_statistics)
self.l_by_manual.setObjectName("l_by_manual")
self.horizontalLayout_2.addWidget(self.l_by_manual)
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_2.addItem(self.horizontalSpacer)
self.verticalLayout.addWidget(self.gb_statistics)
self.tw_history = QTreeWidget(DialogHistory)
self.tw_history.setObjectName("tw_history")
self.tw_history.setAlternatingRowColors(True)
self.tw_history.setSelectionMode(QAbstractItemView.ExtendedSelection)
self.tw_history.setSortingEnabled(True)
self.verticalLayout.addWidget(self.tw_history)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.pb_export = QPushButton(DialogHistory)
self.pb_export.setObjectName("pb_export")
self.horizontalLayout_3.addWidget(self.pb_export)
self.pb_import = QPushButton(DialogHistory)
self.pb_import.setObjectName("pb_import")
self.horizontalLayout_3.addWidget(self.pb_import)
self.pb_clear_history = QPushButton(DialogHistory)
self.pb_clear_history.setObjectName("pb_clear_history")
self.pb_clear_history.setStyleSheet("background-color: #dc3545; color: white;")
self.horizontalLayout_3.addWidget(self.pb_clear_history)
self.pb_remove_selected = QPushButton(DialogHistory)
self.pb_remove_selected.setObjectName("pb_remove_selected")
self.horizontalLayout_3.addWidget(self.pb_remove_selected)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_3.addItem(self.horizontalSpacer_2)
self.pb_refresh = QPushButton(DialogHistory)
self.pb_refresh.setObjectName("pb_refresh")
self.horizontalLayout_3.addWidget(self.pb_refresh)
self.pb_close = QPushButton(DialogHistory)
self.pb_close.setObjectName("pb_close")
self.horizontalLayout_3.addWidget(self.pb_close)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.retranslateUi(DialogHistory)
QMetaObject.connectSlotsByName(DialogHistory)
# setupUi
def retranslateUi(self, DialogHistory):
DialogHistory.setWindowTitle(QCoreApplication.translate("DialogHistory", "Download History", None))
self.l_info.setText(
QCoreApplication.translate(
"DialogHistory",
"View and manage your download history. Tracks are grouped by source (album, playlist, mix).",
None,
)
)
self.gb_file_info.setTitle(QCoreApplication.translate("DialogHistory", "History File Location", None))
self.pb_open_folder.setText(QCoreApplication.translate("DialogHistory", "Open Folder", None))
self.gb_statistics.setTitle(QCoreApplication.translate("DialogHistory", "Statistics", None))
self.l_total_tracks.setText(QCoreApplication.translate("DialogHistory", "Total Tracks: 0", None))
self.l_by_albums.setText(QCoreApplication.translate("DialogHistory", "Albums: 0", None))
self.l_by_playlists.setText(QCoreApplication.translate("DialogHistory", "Playlists: 0", None))
self.l_by_mixes.setText(QCoreApplication.translate("DialogHistory", "Mixes: 0", None))
self.l_by_manual.setText(QCoreApplication.translate("DialogHistory", "Manual: 0", None))
___qtreewidgetitem = self.tw_history.headerItem()
___qtreewidgetitem.setText(3, QCoreApplication.translate("DialogHistory", "Track ID", None))
___qtreewidgetitem.setText(2, QCoreApplication.translate("DialogHistory", "Download Date", None))
___qtreewidgetitem.setText(1, QCoreApplication.translate("DialogHistory", "Type", None))
___qtreewidgetitem.setText(0, QCoreApplication.translate("DialogHistory", "Source / Track", None))
self.pb_export.setText(QCoreApplication.translate("DialogHistory", "Export...", None))
self.pb_import.setText(QCoreApplication.translate("DialogHistory", "Import...", None))
self.pb_clear_history.setText(QCoreApplication.translate("DialogHistory", "Clear History", None))
self.pb_remove_selected.setText(QCoreApplication.translate("DialogHistory", "Remove Selected", None))
self.pb_refresh.setText(QCoreApplication.translate("DialogHistory", "Refresh", None))
self.pb_close.setText(QCoreApplication.translate("DialogHistory", "Close", None))
# retranslateUi
+206
View File
@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogHistory</class>
<widget class="QDialog" name="DialogHistory">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>900</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>Download History</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="l_info">
<property name="text">
<string>View and manage your download history. Tracks are grouped by source (album, playlist, mix).</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_file_info">
<property name="title">
<string>History File Location</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="le_file_path">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_open_folder">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_statistics">
<property name="title">
<string>Statistics</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="l_total_tracks">
<property name="text">
<string>Total Tracks: 0</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_by_albums">
<property name="text">
<string>Albums: 0</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_by_playlists">
<property name="text">
<string>Playlists: 0</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_by_mixes">
<property name="text">
<string>Mixes: 0</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_by_manual">
<property name="text">
<string>Manual: 0</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="tw_history">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column>
<property name="text">
<string>Source / Track</string>
</property>
</column>
<column>
<property name="text">
<string>Type</string>
</property>
</column>
<column>
<property name="text">
<string>Download Date</string>
</property>
</column>
<column>
<property name="text">
<string>Track ID</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="pb_export">
<property name="text">
<string>Export...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_import">
<property name="text">
<string>Import...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_clear_history">
<property name="text">
<string>Clear History</string>
</property>
<property name="styleSheet">
<string notr="true">background-color: #dc3545; color: white;</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_remove_selected">
<property name="text">
<string>Remove Selected</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pb_refresh">
<property name="text">
<string>Refresh</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_close">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
+165 -2
View File
@@ -106,7 +106,8 @@ class Ui_DialogSettings:
"}\n"
"\n"
"QWidget {\n"
" background-color: transparent;\n"
" background-color: #2b2b2b;\n"
" color: #e0e0e0;\n"
"}\n"
"\n"
"QGroupBox {\n"
@@ -124,6 +125,165 @@ class Ui_DialogSettings:
" padding: 4px 8px;\n"
" background-color: #3a3a3a;\n"
" border-radius: 4px;\n"
"}\n"
"\n"
"QComboBox {\n"
" background-color: #2b2b2b;\n"
" border: 1px solid #3d3d3d;\n"
" border-radius: 4px;\n"
" padding: 4px 8px;\n"
" color: #e0e0e0;\n"
" min-height: 20px;\n"
"}\n"
"\n"
"QComboBox:hover {\n"
" border: 1px solid #4a4a4a;\n"
" background-color: #333333;\n"
"}\n"
"\n"
"QComboBox:focus {\n"
" border: 1px solid #3d5a80;\n"
"}\n"
"\n"
"QComboBox::drop-down {\n"
" border"
": none;\n"
" width: 20px;\n"
"}\n"
"\n"
"QComboBox QAbstractItemView {\n"
" background-color: #2b2b2b !important;\n"
" border: 1px solid #3d3d3d !important;\n"
" selection-background-color: #3d5a80;\n"
" selection-color: white;\n"
" color: #e0e0e0;\n"
" outline: none;\n"
"}\n"
"\n"
"QComboBox QAbstractItemView * {\n"
" background-color: #2b2b2b !important;\n"
" color: #e0e0e0 !important;\n"
"}\n"
"\n"
"QComboBox QAbstractItemView::item {\n"
" padding: 4px 8px;\n"
" min-height: 20px;\n"
" background-color: transparent;\n"
"}\n"
"\n"
"QComboBox QAbstractItemView::item:hover {\n"
" background-color: #3a3a3a !important;\n"
"}\n"
"\n"
"QComboBox QAbstractItemView::item:selected {\n"
" background-color: #3d5a80 !important;\n"
" color: white !important;\n"
"}\n"
"\n"
"QLineEdit {\n"
" background-color: #2b2b2b;\n"
" border: 1px solid #3d3d3d;\n"
" border-radius: 4px;\n"
" padding: 4px 8px;\n"
" color: #e0e0e0;\n"
"}\n"
"\n"
"QLineEdit:hover {\n"
" border:"
" 1px solid #4a4a4a;\n"
"}\n"
"\n"
"QLineEdit:focus {\n"
" border: 1px solid #3d5a80;\n"
"}\n"
"\n"
"QSpinBox {\n"
" background-color: #2b2b2b;\n"
" border: 1px solid #3d3d3d;\n"
" border-radius: 4px;\n"
" padding: 4px 8px;\n"
" color: #e0e0e0;\n"
"}\n"
"\n"
"QSpinBox:hover {\n"
" border: 1px solid #4a4a4a;\n"
"}\n"
"\n"
"QSpinBox:focus {\n"
" border: 1px solid #3d5a80;\n"
"}\n"
"\n"
"QSpinBox::up-button, QSpinBox::down-button {\n"
" background-color: #3a3a3a;\n"
" border: none;\n"
" width: 16px;\n"
"}\n"
"\n"
"QSpinBox::up-button:hover, QSpinBox::down-button:hover {\n"
" background-color: #4a4a4a;\n"
"}\n"
"\n"
"QSpinBox::up-arrow {\n"
" image: none;\n"
" border-left: 4px solid transparent;\n"
" border-right: 4px solid transparent;\n"
" border-bottom: 5px solid #e0e0e0;\n"
"}\n"
"\n"
"QSpinBox::down-arrow {\n"
" image: none;\n"
" border-left: 4px solid transparent;\n"
" border-right: 4px solid transparent;\n"
" border-top: 5px solid #e0e0e0;\n"
"}\n"
""
"\n"
"QCheckBox {\n"
" color: #e0e0e0;\n"
" spacing: 8px;\n"
"}\n"
"\n"
"QCheckBox::indicator {\n"
" width: 18px;\n"
" height: 18px;\n"
" border: 1px solid #3d3d3d;\n"
" border-radius: 3px;\n"
" background-color: #2b2b2b;\n"
"}\n"
"\n"
"QCheckBox::indicator:hover {\n"
" border: 1px solid #4a4a4a;\n"
" background-color: #333333;\n"
"}\n"
"\n"
"QCheckBox::indicator:checked {\n"
" background-color: #3d5a80;\n"
" border: 1px solid #3d5a80;\n"
"}\n"
"\n"
"QCheckBox::indicator:checked:hover {\n"
" background-color: #4a6a9a;\n"
" border: 1px solid #4a6a9a;\n"
"}\n"
"\n"
"QPushButton {\n"
" background-color: #3a3a3a;\n"
" border: 1px solid #4a4a4a;\n"
" border-radius: 4px;\n"
" padding: 4px 12px;\n"
" color: #e0e0e0;\n"
"}\n"
"\n"
"QPushButton:hover {\n"
" background-color: #4a4a4a;\n"
"}\n"
"\n"
"QPushButton:pressed {\n"
" background-color: #2a2a2a;\n"
"}\n"
"\n"
"QLabel {\n"
" color: #e0e0e0;\n"
"}"
)
self.sw_categories.setFrameShape(QFrame.Shape.StyledPanel)
@@ -876,7 +1036,7 @@ class Ui_DialogSettings:
self.bb_dialog.accepted.connect(DialogSettings.accept)
self.bb_dialog.rejected.connect(DialogSettings.reject)
self.sw_categories.setCurrentIndex(0)
self.sw_categories.setCurrentIndex(1)
QMetaObject.connectSlotsByName(DialogSettings)
@@ -905,10 +1065,13 @@ class Ui_DialogSettings:
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))
self.c_quality_audio.setPlaceholderText(QCoreApplication.translate("DialogSettings", "text", None))
self.l_icon_quality_video.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
self.l_quality_video.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
self.c_quality_video.setPlaceholderText(QCoreApplication.translate("DialogSettings", "text", None))
self.l_icon_metadata_cover_dimension.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
self.l_metadata_cover_dimension.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
self.c_metadata_cover_dimension.setPlaceholderText(QCoreApplication.translate("DialogSettings", "text", None))
self.gb_numbers.setTitle(QCoreApplication.translate("DialogSettings", "Numbers", None))
self.l_album_track_num_pad_min.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
self.l_icon_album_track_num_pad_min.setText(QCoreApplication.translate("DialogSettings", "TextLabel", None))
+170 -3
View File
@@ -147,6 +147,162 @@ QGroupBox::title {
padding: 4px 8px;
background-color: #3a3a3a;
border-radius: 4px;
}
QComboBox {
background-color: #2b2b2b;
border: 1px solid #3d3d3d;
border-radius: 4px;
padding: 4px 8px;
color: #e0e0e0;
min-height: 20px;
}
QComboBox:hover {
border: 1px solid #4a4a4a;
background-color: #333333;
}
QComboBox:focus {
border: 1px solid #3d5a80;
}
QComboBox::drop-down {
border: none;
width: 20px;
}
QComboBox QAbstractItemView {
background-color: #2b2b2b !important;
border: 1px solid #3d3d3d !important;
selection-background-color: #3d5a80;
selection-color: white;
color: #e0e0e0;
outline: none;
}
QComboBox QAbstractItemView * {
background-color: #2b2b2b !important;
color: #e0e0e0 !important;
}
QComboBox QAbstractItemView::item {
padding: 4px 8px;
min-height: 20px;
background-color: transparent;
}
QComboBox QAbstractItemView::item:hover {
background-color: #3a3a3a !important;
}
QComboBox QAbstractItemView::item:selected {
background-color: #3d5a80 !important;
color: white !important;
}
QLineEdit {
background-color: #2b2b2b;
border: 1px solid #3d3d3d;
border-radius: 4px;
padding: 4px 8px;
color: #e0e0e0;
}
QLineEdit:hover {
border: 1px solid #4a4a4a;
}
QLineEdit:focus {
border: 1px solid #3d5a80;
}
QSpinBox {
background-color: #2b2b2b;
border: 1px solid #3d3d3d;
border-radius: 4px;
padding: 4px 8px;
color: #e0e0e0;
}
QSpinBox:hover {
border: 1px solid #4a4a4a;
}
QSpinBox:focus {
border: 1px solid #3d5a80;
}
QSpinBox::up-button, QSpinBox::down-button {
background-color: #3a3a3a;
border: none;
width: 16px;
}
QSpinBox::up-button:hover, QSpinBox::down-button:hover {
background-color: #4a4a4a;
}
QSpinBox::up-arrow {
image: none;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-bottom: 5px solid #e0e0e0;
}
QSpinBox::down-arrow {
image: none;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 5px solid #e0e0e0;
}
QCheckBox {
color: #e0e0e0;
spacing: 8px;
}
QCheckBox::indicator {
width: 18px;
height: 18px;
border: 1px solid #3d3d3d;
border-radius: 3px;
background-color: #2b2b2b;
}
QCheckBox::indicator:hover {
border: 1px solid #4a4a4a;
background-color: #333333;
}
QCheckBox::indicator:checked {
background-color: #3d5a80;
border: 1px solid #3d5a80;
}
QCheckBox::indicator:checked:hover {
background-color: #4a6a9a;
border: 1px solid #4a6a9a;
}
QPushButton {
background-color: #3a3a3a;
border: 1px solid #4a4a4a;
border-radius: 4px;
padding: 4px 12px;
color: #e0e0e0;
}
QPushButton:hover {
background-color: #4a4a4a;
}
QPushButton:pressed {
background-color: #2a2a2a;
}
QLabel {
color: #e0e0e0;
}</string>
</property>
<property name="frameShape">
@@ -159,7 +315,7 @@ QGroupBox::title {
<number>1</number>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="page_flags">
<layout class="QVBoxLayout" name="lv_page_flags">
@@ -463,7 +619,11 @@ QGroupBox::title {
</widget>
</item>
<item>
<widget class="QComboBox" name="c_quality_audio"/>
<widget class="QComboBox" name="c_quality_audio">
<property name="placeholderText">
<string>text</string>
</property>
</widget>
</item>
</layout>
</item>
@@ -496,7 +656,11 @@ QGroupBox::title {
</widget>
</item>
<item>
<widget class="QComboBox" name="c_quality_video"/>
<widget class="QComboBox" name="c_quality_video">
<property name="placeholderText">
<string>text</string>
</property>
</widget>
</item>
</layout>
</item>
@@ -539,6 +703,9 @@ QGroupBox::title {
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="placeholderText">
<string>text</string>
</property>
</widget>
</item>
</layout>