diff --git a/.gitignore b/.gitignore
index 2233e7f..9784d9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -163,3 +163,7 @@ download/Playlist/Boy Bands- K-Pop Kings/Tmp0/22.part
.idea
tidal_dl-BAK
/TIDALDL-PY2/tidal_dl
+/TIDALDL-GUI-CROSS/tidal_gui/view/__pycache__
+/TIDALDL-GUI-CROSS/tidal_gui/viewModel/__pycache__
+/TIDALDL-GUI-CROSS/tidal_gui/control/__pycache__
+__pycache__
diff --git a/.vscode/launch.json b/.vscode/launch.json
index fe8bee2..c9c13c0 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -53,11 +53,11 @@
"name": "Python: gui",
"type": "python",
"request": "launch",
- "program": "${workspaceRoot}/TIDALDL-GUI/tidal_gui/__init__.py",
+ "program": "${workspaceRoot}/TIDALDL-PY/tidal_gui/__init__.py",
"console": "integratedTerminal",
// "python": "python3",
"env": {
- "PYTHONPATH": "${workspaceRoot}/TIDALDL-GUI/"
+ "PYTHONPATH": "${workspaceRoot}/TIDALDL-PY/"
},
"justMyCode": false
diff --git a/TIDALDL-GUI-CROSS/setup.py b/TIDALDL-GUI-CROSS/setup.py
deleted file mode 100644
index 58ccf79..0000000
--- a/TIDALDL-GUI-CROSS/setup.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from setuptools import setup, find_packages
-setup(
- name = 'tidal-gui',
- version = '1.0.0.1',
- license = "Apache2",
- description = "Tidal Music Downloader.",
-
- author = 'YaronH',
- author_email = "yaronhuang@foxmail.com",
-
- packages = find_packages(),
- include_package_data = True,
- platforms = "any",
- install_requires=["aigpy", "PyQt5", "requests>=2.22.0", "pycryptodome", "pydub", "prettytable", "lyricsgenius"],
- entry_points={'console_scripts': [ 'tidal-gui = tidal_gui:main', ]}
-)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/__init__.py b/TIDALDL-GUI-CROSS/tidal_gui/__init__.py
deleted file mode 100644
index 1024cad..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/__init__.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : __init__.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-import sys
-
-from PyQt5.QtWidgets import QApplication
-
-from tidal_gui import theme
-from tidal_gui.viewModel.loginModel import LoginModel
-from tidal_gui.viewModel.mainModel import MainModel
-
-
-def main():
- qss = theme.getThemeQssContent()
- app = QApplication(sys.argv)
- app.setStyleSheet(qss)
-
- mainView = MainModel()
- mainView.show()
-
- sys.exit(app.exec_())
-
-
-if __name__ == '__main__':
- main()
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/__init__.py b/TIDALDL-GUI-CROSS/tidal_gui/control/__init__.py
deleted file mode 100644
index 5d66b0c..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/__init__.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : __init__.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/checkBox.py b/TIDALDL-GUI-CROSS/tidal_gui/control/checkBox.py
deleted file mode 100644
index 8066429..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/checkBox.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : checkBox.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-
-from PyQt5.QtWidgets import QCheckBox
-
-
-class CheckBox(QCheckBox):
- def __init__(self, text: str = "", checked: bool = False):
- super(CheckBox, self).__init__()
- self.setChecked(checked)
- self.setText(text)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/comboBox.py b/TIDALDL-GUI-CROSS/tidal_gui/control/comboBox.py
deleted file mode 100644
index 941ffb6..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/comboBox.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : comboBox.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtWidgets import QComboBox, QListView
-from PyQt5.QtCore import Qt
-
-
-class ComboBox(QComboBox):
- def __init__(self, items: list):
- super(ComboBox, self).__init__()
- self.setItems(items)
- self.setFixedWidth(200)
- self.setView(QListView())
- # remove shadow
- self.view().window().setWindowFlags(Qt.Popup | Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint)
- self.view().window().setAttribute(Qt.WA_TranslucentBackground)
-
- def setItems(self, items):
- for item in items:
- self.addItem(str(item))
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/framelessWidget.py b/TIDALDL-GUI-CROSS/tidal_gui/control/framelessWidget.py
deleted file mode 100644
index 9cad663..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/framelessWidget.py
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : framelessWidget.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import Qt, QPoint
-from PyQt5.QtGui import QMouseEvent
-from PyQt5.QtWidgets import QWidget, QGridLayout, QHBoxLayout
-
-from tidal_gui.control.pushButton import PushButton
-from tidal_gui.style import ButtonStyle
-
-
-class FramelessWidget(QWidget):
- def __init__(self):
- super(FramelessWidget, self).__init__()
- self.setWindowFlags(Qt.FramelessWindowHint)
-
- self.borderWidget = QWidget()
- self.borderWidget.setObjectName("widgetMain")
- self.borderWidget.setStyleSheet("QWidget#widgetMain{border: 1px solid #000000;};")
-
- self.contentGrid = QGridLayout()
- self.contentGrid.setContentsMargins(1, 1, 1, 1)
-
- self.windowBtnGrid = self.__createWindowsButtonLayout__()
- self.enableMove = True
- self.validMoveWidget = None
- self.clickPos = None
-
- self.grid = QGridLayout()
- self.grid.setSpacing(0)
- self.grid.setContentsMargins(0, 0, 0, 0)
- self.grid.addWidget(self.borderWidget, 0, 0)
- self.grid.addLayout(self.contentGrid, 0, 0)
- self.setLayout(self.grid)
-
- def __showMaxWindows__(self):
- if self.windowState() == Qt.WindowMaximized:
- self.showNormal()
- else:
- self.showMaximized()
-
- def __createWindowsButtonLayout__(self):
- self.closeBtn = PushButton('', ButtonStyle.CloseWindow)
- self.maxBtn = PushButton('', ButtonStyle.MaxWindow)
- self.minBtn = PushButton('', ButtonStyle.MinWindow)
-
- self.closeBtn.clicked.connect(self.close)
- self.minBtn.clicked.connect(self.showMinimized)
- self.maxBtn.clicked.connect(self.__showMaxWindows__)
-
- layout = QHBoxLayout()
- layout.setSpacing(0)
- layout.setContentsMargins(1, 1, 1, 1)
- layout.addWidget(self.minBtn)
- layout.addWidget(self.maxBtn)
- layout.addWidget(self.closeBtn)
- return layout
-
- def __clickInValidMoveWidget__(self, x=-1, y=-1) -> bool:
- if self.validMoveWidget is None:
- return True
- if x == -1 and y == -1:
- x = self.clickPos.x()
- y = self.clickPos.y()
-
- pos = self.validMoveWidget.pos()
- if x < pos.x() or x > pos.x() + self.validMoveWidget.width():
- return False
- if y < pos.y() or y > pos.y() + self.validMoveWidget.height():
- return False
- return True
-
- def mousePressEvent(self, e: QMouseEvent):
- if e.button() == Qt.LeftButton:
- self.clickPos = e.pos()
-
- def mouseReleaseEvent(self, e: QMouseEvent):
- if e.button() == Qt.LeftButton:
- self.clickPos = QPoint(-1, -1)
-
- def mouseMoveEvent(self, e: QMouseEvent):
- if not self.enableMove:
- return
- if Qt.LeftButton & e.buttons():
- if self.__clickInValidMoveWidget__() and self.clickPos:
- self.move(e.pos() + self.pos() - self.clickPos)
-
- def mouseDoubleClickEvent(self, e: QMouseEvent):
- if self.maxBtn.isHidden():
- return
- if Qt.LeftButton & e.buttons():
- if self.__clickInValidMoveWidget__(e.x(), e.y()):
- self.__showMaxWindows__()
-
- def getGrid(self):
- return self.contentGrid
-
- def disableMove(self):
- self.enableMove = False
-
- def setValidMoveWidget(self, widget):
- self.validMoveWidget = widget
-
- def setWindowButton(self, showClose=True, showMin=True, showMax=True):
- if not showMax:
- self.maxBtn.hide()
- if not showMin:
- self.minBtn.hide()
- if not showClose:
- self.closeBtn.hide()
- self.grid.addLayout(self.windowBtnGrid, 0, 0, Qt.AlignTop | Qt.AlignRight)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/label.py b/TIDALDL-GUI-CROSS/tidal_gui/control/label.py
deleted file mode 100644
index 6656370..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/label.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : label.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtWidgets import QLabel
-
-from tidal_gui.style import LabelStyle
-
-
-class Label(QLabel):
- def __init__(self, text: str = "", style: LabelStyle = LabelStyle.Default):
- super(Label, self).__init__()
- self.setText(text)
- self.setObjectName(style.name + "Label")
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/layout.py b/TIDALDL-GUI-CROSS/tidal_gui/control/layout.py
deleted file mode 100644
index 4b38808..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/layout.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : layout.py
-@Date : 2021/8/13
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout
-
-
-def createHBoxLayout(widgets):
- layout = QHBoxLayout()
- for item in widgets:
- layout.addWidget(item)
- return layout
-
-
-def createVBoxLayout(widgets):
- layout = QVBoxLayout()
- for item in widgets:
- layout.addWidget(item)
- return layout
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/line.py b/TIDALDL-GUI-CROSS/tidal_gui/control/line.py
deleted file mode 100644
index 3573f86..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/line.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : line.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtWidgets import QFrame
-
-
-class Line(QFrame):
- def __init__(self, shape: str = 'V'):
- super(Line, self).__init__()
- self.setFrameShape(QFrame.VLine if shape == 'V' else QFrame.HLine)
- self.setFrameShadow(QFrame.Sunken)
-
- self.setObjectName('VLineQFrame' if shape == 'V' else 'HLineQFrame')
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/lineEdit.py b/TIDALDL-GUI-CROSS/tidal_gui/control/lineEdit.py
deleted file mode 100644
index 66184d8..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/lineEdit.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : lineEdit.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtWidgets import QLineEdit
-
-
-class LineEdit(QLineEdit):
- def __init__(self, placeholderText: str = ""):
- super(LineEdit, self).__init__()
- self.setPlaceholderText(placeholderText)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/listWidget.py b/TIDALDL-GUI-CROSS/tidal_gui/control/listWidget.py
deleted file mode 100644
index a29cce2..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/listWidget.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : listWidget.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import QSize
-from PyQt5.QtGui import QIcon
-from PyQt5.QtWidgets import QListWidget, QListWidgetItem
-
-from tidal_gui.style import ListWidgetStyle
-
-
-class ListWidget(QListWidget):
- def __init__(self, style: ListWidgetStyle = ListWidgetStyle.Default):
- super(ListWidget, self).__init__()
- self.setObjectName(style.name + "ListWidget")
-
- def addIConTextItem(self, iconUrl: str, text: str):
- self.addItem(QListWidgetItem(QIcon(iconUrl), text))
-
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/pushButton.py b/TIDALDL-GUI-CROSS/tidal_gui/control/pushButton.py
deleted file mode 100644
index 475a48c..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/pushButton.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : pushButton.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtGui import QIcon
-from PyQt5.QtWidgets import QPushButton
-
-from tidal_gui.style import ButtonStyle
-
-
-class PushButton(QPushButton):
- def __init__(self,
- text: str = '',
- style: ButtonStyle = ButtonStyle.Default,
- width=0,
- iconUrl=''):
- super(PushButton, self).__init__()
- self.setText(text)
- self.setObjectName(style.name + "PushButton")
-
- if width > 0:
- self.setFixedWidth(width)
-
- if iconUrl != '':
- self.setIcon(QIcon(iconUrl))
-
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/tableView.py b/TIDALDL-GUI-CROSS/tidal_gui/control/tableView.py
deleted file mode 100644
index 05f9349..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/tableView.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : tableView.py
-@Date : 2021/9/10
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import Qt
-from PyQt5.QtGui import QStandardItemModel, QStandardItem
-from PyQt5.QtWidgets import QTableView, QTableWidgetItem, QAbstractItemView
-
-
-class TableView(QTableView):
- def __init__(self, columnNames: list, rowCount: int = 20):
- super(TableView, self).__init__()
-
- self._model = QStandardItemModel()
- self._model.setColumnCount(len(columnNames))
- self._model.setRowCount(rowCount)
-
- for index, name in enumerate(columnNames):
- self._model.setHeaderData(index, Qt.Horizontal, name)
-
- self.setModel(self._model)
- # self.setHorizontalHeaderItem(index, QTableWidgetItem(name))
- # for index in range(0, rowCount):
- # self.setRowHeight(index, 50)
-
- self.setShowGrid(False)
- self.verticalHeader().setVisible(False)
- self.setSelectionBehavior(QAbstractItemView.SelectRows)
- self.setSelectionMode(QAbstractItemView.SingleSelection)
-
- self.horizontalHeader().setStretchLastSection(True)
- self.setEditTriggers(QAbstractItemView.NoEditTriggers)
-
- self.setFocusPolicy(Qt.NoFocus)
-
- def addItem(self, rowIdx: int, colIdx: int, text: str):
- item = QStandardItem(text)
- item.setTextAlignment(Qt.AlignCenter)
- self._model.setItem(rowIdx, colIdx, item)
- #
- # def addWidgetItem(self, rowIdx: int, colIdx: int, widget):
- # self.setCellWidget(rowIdx, colIdx, widget)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/control/tableWidget.py b/TIDALDL-GUI-CROSS/tidal_gui/control/tableWidget.py
deleted file mode 100644
index 70859d9..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/control/tableWidget.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : tableWidget.py
-@Date : 2021/8/18
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import Qt
-from PyQt5.QtGui import QIcon
-from PyQt5.QtWidgets import QTableWidget, QTableWidgetItem, QAbstractItemView
-
-
-class TableWidget(QTableWidget):
- def __init__(self, columnNames: list, rowCount: int = 20):
- super(TableWidget, self).__init__()
-
- self.setColumnCount(len(columnNames))
- self.setRowCount(rowCount)
-
- for index, name in enumerate(columnNames):
- self.setHorizontalHeaderItem(index, QTableWidgetItem(name))
- for index in range(0, rowCount):
- self.setRowHeight(index, 50)
-
- self.setShowGrid(False)
- self.verticalHeader().setVisible(False)
- self.setSelectionBehavior(QAbstractItemView.SelectRows)
- self.setSelectionMode(QAbstractItemView.SingleSelection)
-
- self.horizontalHeader().setStretchLastSection(True)
- self.setEditTriggers(QAbstractItemView.NoEditTriggers)
-
- self.setFocusPolicy(Qt.NoFocus)
-
- def changeRowCount(self, rows: int):
- if rows != self.rowCount():
- self.setRowCount(rows)
- for index in range(0, rows):
- self.setRowHeight(index, 50)
-
- def addItem(self, rowIdx: int, colIdx: int, text: str):
- item = QTableWidgetItem(text)
- item.setTextAlignment(Qt.AlignCenter)
- self.setItem(rowIdx, colIdx, item)
-
- def addPicItem(self, rowIdx: int, colIdx: int, url: str):
- item = QTableWidgetItem()
- item.setTextAlignment(Qt.AlignCenter)
- item.setIcon(QIcon(url))
- self.setItem(rowIdx, colIdx, item)
-
- def addWidgetItem(self, rowIdx: int, colIdx: int, widget):
- self.setCellWidget(rowIdx, colIdx, widget)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/downloader.py b/TIDALDL-GUI-CROSS/tidal_gui/downloader.py
deleted file mode 100644
index 40bc650..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/downloader.py
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : downloader.py
-@Date : 2021/09/15
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-class DownloaderImp():
- pass
-
-
-
-downloadImp = DownloaderImp()
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/__init__.py b/TIDALDL-GUI-CROSS/tidal_gui/resource/__init__.py
deleted file mode 100644
index fd40910..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/V.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/V.svg
deleted file mode 100644
index 0a1576c..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/V.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/__init__.py b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/__init__.py
deleted file mode 100644
index fd40910..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/buymeacoffee.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/buymeacoffee.svg
deleted file mode 100644
index 9a8bd88..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/buymeacoffee.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/check.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/check.svg
deleted file mode 100644
index 3bfad7e..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/check.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/down.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/down.svg
deleted file mode 100644
index a171c81..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/down.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/downHover.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/downHover.svg
deleted file mode 100644
index 24cbb35..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/downHover.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/github.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/github.svg
deleted file mode 100644
index 2d1cea6..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/github.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/left.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/left.svg
deleted file mode 100644
index e931f47..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/left.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/download.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/download.svg
deleted file mode 100644
index be5235f..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/download.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/downloadHover.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/downloadHover.svg
deleted file mode 100644
index 3eeb232..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/downloadHover.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/info.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/info.svg
deleted file mode 100644
index b428605..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/info.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/search.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/search.svg
deleted file mode 100644
index 0c1900f..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/search.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/settings.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/settings.svg
deleted file mode 100644
index dee79cf..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/leftTab/settings.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/paypal.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/paypal.svg
deleted file mode 100644
index a46caba..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/paypal.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/right.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/right.svg
deleted file mode 100644
index 96bf9b1..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/right.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/search.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/search.svg
deleted file mode 100644
index a1cffbe..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/search.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/complete.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/complete.svg
deleted file mode 100644
index 9397de9..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/complete.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/download.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/download.svg
deleted file mode 100644
index 0e9d285..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/download.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/error.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/error.svg
deleted file mode 100644
index a2bc642..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/taskTab/error.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/upHover.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/upHover.svg
deleted file mode 100644
index 9fff595..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/upHover.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/close.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/close.svg
deleted file mode 100644
index d06198c..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/close.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/closeHover.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/closeHover.svg
deleted file mode 100644
index 0cb0e59..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/closeHover.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/max.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/max.svg
deleted file mode 100644
index 016e62b..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/max.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/min.svg b/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/min.svg
deleted file mode 100644
index a180f19..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/svg/windows/min.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/resource/themeDefault.qss b/TIDALDL-GUI-CROSS/tidal_gui/resource/themeDefault.qss
deleted file mode 100644
index 010b112..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/resource/themeDefault.qss
+++ /dev/null
@@ -1,633 +0,0 @@
-:root {
- --Font_Family: Microsoft YaHei UI;
- --Font_Size: 12px;
- --Font_Size_TableHeader: 15px;
- --Font_Size_PageTitle: 15px;
- --Font_Size_HugeTitle: 30px;
- --Font_Size_MsgLabel: 15px;
-
- --Color_Default: #ffffff;
- --Color_DefaultHover: #f0f0f0;
- --Color_DefaultPressed: #ececec;
- --Color_DefaultText: #212121;
-
- --Color_Primary: #326cf3;
- --Color_PrimaryHover: #477bf4;
- --Color_PrimaryPressed: #84a7f8;
- --Color_PrimaryText: #ffffff;
-
- --Color_Success: #2db84d;
- --Color_SuccessHover: #42bf5f;
- --Color_SuccessPressed: #81d494;
-
- --Color_Danger: #db3340;
- --Color_DangerHover: #df4853;
- --Color_DangerPressed: #e9858c;
-
- --Color_Warning: #e9af20;
- --Color_WarningHover: #ebb737;
- --Color_WarningPressed: #f2cf79;
-
- --Color_Info: #00bcd4;
- --Color_InfoHover: #1ac3d8;
- --Color_InfoPressed: #66d7e5;
-
- --Color_Border: #cbcbcb;
- --Color_WindowsIcon: #cbcbcb;
- --Color_Background: #eeeeee;
- --Color_Shadow: #AA000000;
-
- --Color_Transparent: transparent;
-
- --Size_InputPaddingLR: 8px;
- --Size_InputPaddingTB: 6px;
-
- --Size_HeaderHeight: 50px;
- --Size_ItemHeight: 18px;
- --Size_ProgressHeight: 26px;
- --Size_ControlHeight: 18px;
-
- --Size_ControlPaddingLR: 8px;
- --Size_ControlPaddingTB: 6px;
-
- --Size_IconSize: 24px;
- --Size_CornerRadius: 4px;
-
- --Size_CalendarWidth: 287px;
- --Size_CalendarHeight: 300px;
-}
-
-/* #QSS_START */
-
-* {
- font-family: var(--Font_Family);
- font-size: var(--Font_Size);
-
- background: var(--Color_Default);
- color: var(--Color_DefaultText);
-}
-
-/* Widget */
-
-QWidget#MainViewLeftWidget {
- background: #000000;
-}
-
-QWidget#TestWidget {
- background: #000000;
-}
-
-QWidget#AboutWidget {
-
-}
-
-
-
-/* PushButton Style */
-
-QPushButton {
- border-style: solid;
- border-width: 1px;
- border-color: var(--Color_DefaultPressed);
- padding-left: var(--Size_InputPaddingLR);
- padding-right: var(--Size_InputPaddingLR);
- padding-top: var(--Size_InputPaddingTB);
- padding-bottom: var(--Size_InputPaddingTB);
- border-radius: var(--Size_CornerRadius);
- color: var(--Color_DefaultText);
- background: var(--Color_Default);
-}
-
-QPushButton::hover {
- color: var(--Color_DefaultText);
- background: var(--Color_DefaultHover);
-}
-
-QPushButton::pressed {
- color: var(--Color_DefaultText);
- background: var(--Color_DefaultPressed);
-}
-
-
-QPushButton#PrimaryPushButton {
- border-color: var(--Color_PrimaryPressed);
- color: var(--Color_PrimaryText);
- background: var(--Color_Primary);
-}
-
-QPushButton#PrimaryPushButton::hover {
- background: var(--Color_PrimaryHover);
-}
-
-QPushButton#PrimaryPushButton::pressed {
- background: var(--Color_PrimaryPressed);
-}
-
-QPushButton#SuccessPushButton {
- border-color: var(--Color_SuccessPressed);
- color: var(--Color_PrimaryText);
- background: var(--Color_Success);
-}
-
-QPushButton#SuccessPushButton::hover {
- background: var(--Color_SuccessHover);
-}
-
-QPushButton#SuccessPushButton::pressed {
- background: var(--Color_SuccessPressed);
-}
-
-QPushButton#DangerPushButton {
- border-color: var(--Color_DangerPressed);
- color: var(--Color_PrimaryText);
- background: var(--Color_Danger);
-}
-
-QPushButton#DangerPushButton::hover {
- background: var(--Color_DangerHover);
-}
-
-QPushButton#DangerPushButton::pressed {
- background: var(--Color_DangerPressed);
-}
-
-QPushButton#WarningPushButton {
- border-color: var(--Color_WarningPressed);
- color: var(--Color_PrimaryText);
- background: var(--Color_Warning);
-}
-
-QPushButton#WarningPushButton::hover {
- background: var(--Color_WarningHover);
-}
-
-QPushButton#WarningPushButton::pressed {
- background: var(--Color_WarningPressed);
-}
-
-QPushButton#InfoPushButton {
- border-color: var(--Color_InfoPressed);
- color: var(--Color_PrimaryText);
- background: var(--Color_Info);
-}
-
-QPushButton#InfoPushButton::hover {
- background: var(--Color_InfoHover);
-}
-
-QPushButton#InfoPushButton::pressed {
- background: var(--Color_InfoPressed);
-}
-
-/* Software Buton */
-
-QPushButton#SoftwareIconPushButton {
- border-style: none;
- border-radius: 0px;
- height: 26;
- width: 26;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/V.svg)
-}
-QPushButton#SoftwareIconPushButton::hover {
- image: url($PACKAGE_PATH$/resource/svg/V.svg)
-}
-QPushButton#SoftwareIconPushButton::pressed {
- image: url($PACKAGE_PATH$/resource/svg/V.svg)
-}
-
-
-/* Windows Buton */
-QPushButton#CloseWindowPushButton {
- border-style: none;
- border-radius: 0px;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/windows/close.svg)
-}
-
-QPushButton#CloseWindowPushButton::hover {
- background: #ff1a1a;
- image: url($PACKAGE_PATH$/resource/svg/windows/closeHover.svg)
-}
-
-QPushButton#CloseWindowPushButton::pressed {
- background: #ff6666;
- image: url($PACKAGE_PATH$/resource/svg/windows/closeHover.svg)
-}
-
-QPushButton#MaxWindowPushButton {
- border-style: none;
- border-radius: 0px;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/windows/max.svg)
-}
-
-QPushButton#MaxWindowPushButton::hover {
- background: var(--Color_DefaultHover);
-}
-
-QPushButton#MaxWindowPushButton::pressed {
- background: var(var(--Color_DefaultPressed));
-}
-
-QPushButton#MinWindowPushButton {
- border-style: none;
- border-radius: 0px;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/windows/min.svg)
-}
-
-QPushButton#MinWindowPushButton::hover {
- background: var(--Color_DefaultHover);
-}
-
-QPushButton#MinWindowPushButton::pressed {
- background: var(var(--Color_DefaultPressed));
-}
-
-
-/* Icon Button */
-QPushButton#SearchIconPushButton {
- border-style: none;
- border-radius: 0px;
- height: 26;
- width: 26;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/leftTab/search.svg)
-}
-QPushButton#SearchIconPushButton::hover {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/search.svg)
-}
-QPushButton#SearchIconPushButton::pressed {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/search.svg)
-}
-
-QPushButton#TaskIconPushButton {
- border-style: none;
- border-radius: 0px;
- height: 26;
- width: 26;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/leftTab/download.svg)
-}
-QPushButton#TaskIconPushButton::hover {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/downloadHover.svg)
-}
-QPushButton#TaskIconPushButton::pressed {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/downloadHover.svg)
-}
-
-QPushButton#SettingsIconPushButton {
- border-style: none;
- border-radius: 0px;
- height: 26;
- width: 26;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/leftTab/settings.svg)
-}
-QPushButton#SettingsIconPushButton::hover {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/settings.svg)
-}
-QPushButton#SettingsIconPushButton::pressed {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/settings.svg)
-}
-
-QPushButton#AboutIconPushButton {
- border-style: none;
- border-radius: 0px;
- height: 26;
- width: 26;
- background: var(--Color_Transparent);
- image: url($PACKAGE_PATH$/resource/svg/leftTab/info.svg)
-}
-QPushButton#AboutIconPushButton::hover {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/info.svg)
-}
-QPushButton#AboutIconPushButton::pressed {
- image: url($PACKAGE_PATH$/resource/svg/leftTab/info.svg)
-}
-
-
-QPushButton#PrePagePushButton {
- border-style: none;
- border-radius: 0px;
- height: 18;
- width: 18;
- background: var(--Color_DefaultHover);
- image: url($PACKAGE_PATH$/resource/svg/left.svg)
-}
-QPushButton#PrePagePushButton::hover {
- image: url($PACKAGE_PATH$/resource/svg/left.svg)
-}
-QPushButton#PrePagePushButton::pressed {
- image: url($PACKAGE_PATH$/resource/svg/left.svg)
-}
-
-QPushButton#NextPagePushButton {
- border-style: none;
- border-radius: 0px;
- height: 18;
- width: 18;
- background: var(--Color_DefaultHover);
- image: url($PACKAGE_PATH$/resource/svg/right.svg)
-}
-QPushButton#NextPagePushButton::hover {
- image: url($PACKAGE_PATH$/resource/svg/right.svg)
-}
-QPushButton#NextPagePushButton::pressed {
- image: url($PACKAGE_PATH$/resource/svg/right.svg)
-}
-/* LineEdit Style */
-
-QLineEdit {
- border-style: solid;
- border-width: 1px;
- border-color: var(--Color_Border);
- padding-left: var(--Size_InputPaddingLR);
- padding-right: var(--Size_InputPaddingLR);
- padding-top: var(--Size_InputPaddingTB);
- padding-bottom: var(--Size_InputPaddingTB);
- border-radius: var(--Size_CornerRadius);
- min-height: var(--Size_ControlHeight);
- color: var(--Color_DefaultText);
- background: var(--Color_Default);
-}
-
-QLineEdit::hover {
- border-color: var(--Color_Primary);
-}
-
-QLineEdit::focus {
- border-color: var(--Color_Primary);
-}
-
-/* CheckBox Style */
-
-QCheckBox::indicator {
- width: 14px;
- height: 14px;
- padding: 2px;
-
- border: 1px solid var(--Color_Border);
- border-radius: 2px;
-}
-
-QCheckBox::indicator::unchecked:hover {
- border: 1px solid var(--Color_PrimaryHover);
-}
-
-QCheckBox::indicator::checked {
- background: var(--Color_Primary);
- image: url($PACKAGE_PATH$/resource/svg/check.svg);
- border: 1px solid var(--Color_Primary);
-}
-
-/* TabWidget */
-
-QTabWidget::pane {
- border:none;
- border-top: 1px solid var(--Color_Border);
-}
-QTabBar::tab {
- border:none;
- padding-left: 10px;
- padding-right: 10px;
- padding-bottom: 3px;
- font-size: var(--Font_Size_TableHeader);
- font-weight: bold;
- min-width: 70;
-}
-QTabBar::tab:selected {
- color: var(--Color_Primary);
- border-color: var(--Color_Primary);
- border-style: solid;
- border-bottom-width: 3px;
-}
-
-/* Label */
-QLabel#PageTitleLabel {
- font-size: var(--Font_Size_PageTitle);
- font-weight: bold;
-}
-
-QLabel#PageSubTitleLabel {
- font-size: var(--Font_Size_PageTitle);
-}
-
-QLabel#HugeTitleLabel {
- font-size: var(--Font_Size_HugeTitle);
- font-weight: bold;
-}
-
-QLabel#LogoBottomLabel {
- font-size: var(--Font_Size_MsgLabel);
- color: #ffffff;
-}
-
-/* QFrame */
-QFrame#VLineQFrame
-{
- border-top-style: none;
- border-bottom-style: none;
- border-right-style: none;
- border-left: 1px solid var(--Color_Border);
-}
-
-QFrame#HLineQFrame
-{
- border-top: 1px solid var(--Color_Border);
- border-bottom-style: none;
- border-right-style: none;
- border-left-style: none;
-}
-
-/* QComboBox */
-QComboBox {
- border-style: solid;
- border-width: 1px;
- border-color: var(--Color_Border);
- padding-left: var(--Size_InputPaddingLR);
- padding-right: var(--Size_InputPaddingLR);
- padding-top: var(--Size_InputPaddingTB);
- padding-bottom: var(--Size_InputPaddingTB);
- border-radius: var(--Size_CornerRadius);
- min-height: var(--Size_ControlHeight);
- color: var(--Color_DefaultText);
- background: var(--Color_Default);
-}
-
-QComboBox::hover {
- border-color: var(--Color_Primary);
-}
-
-QComboBox::focus {
- border-color: var(--Color_Primary);
-}
-
-QComboBox::drop-down {
- subcontrol-position:center right;
- margin-right: 15px;
- border-left-style: none;
-}
-QComboBox::down-arrow {
- image: url($PACKAGE_PATH$/resource/svg/down.svg);
- width : 24px;
- height : 24px;
-}
-QComboBox::down-arrow:hover {
- image: url($PACKAGE_PATH$/resource/svg/downHover.svg);
-}
-
-QComboBox::down-arrow:on {
- image: url($PACKAGE_PATH$/resource/svg/upHover.svg);
-}
-
-QComboBox QAbstractItemView {
- margin-top:5px;
- border:1px solid var(--Color_Primary);
- outline:none;
-}
-
-QComboBox QAbstractItemView::item {
- height: var(--Size_ItemHeight);
-
- padding-top: var(--Size_InputPaddingTB);
- padding-bottom: var(--Size_InputPaddingTB);
-}
-
-QComboBox QAbstractItemView::item:selected{
- color: var(--Color_PrimaryText);
- background: var(--Color_Primary);
-}
-
-
-/* QListWidget */
-QListWidget#TaskTabListWidget {
- border-style: none;
- background: var(--Color_Default);
- max-width: 150px;
- outline:none;
-}
-
-QListWidget#TaskTabListWidget::item
-{
- height:32px;
- padding-left: var(--Size_ControlPaddingLR);
- border: none;
- border-radius: var(--Size_CornerRadius);
- margin-top:5px;
-}
-
-QListWidget#TaskTabListWidget::item:hover
-{
- background: var(--Color_DefaultHover);
- color: var(--Color_DefaultText);
-}
-
-QListWidget#TaskTabListWidget::item:selected
-{
- background: var(--Color_Primary);
- color: var(--Color_PrimaryText);
-}
-
-
-QListWidget#TaskContentListWidget {
- border-style: none;
- background: var(--Color_Default);
-}
-
-/* QTableWidget */
-QTableWidget {
- border-left: none;
- border-right: none;
- border-top: none;
- border-bottom: 1px solid var(--Color_Border);
-
- text-align: center;
- color: var(--Color_DefaultText);
- background: var(--Color_DefaultHover);
- padding:5px;
-
-}
-
-QTableWidget::item{
- margin-top: 5px;
- background: var(--Color_Default);
-}
-QTableWidget::item:selected{
- color: var(--Color_PrimaryText);
- background: var(--Color_Primary);
-}
-
-
-QTableWidget QHeaderView::section {
- color: var(--Color_DefaultText);
- background: var(--Color_DefaultHover);
- text-align: center;
- height: var(--Size_HeaderHeight);
- border: none;
- font-size: var(--Font_Size_TableHeader);
- font-weight: bold;
-}
-
-QTableWidget QScrollBar::vertical{
- background:transparent;
- width: 4px;
- border-radius:6px;
-}
-QTableWidget QScrollBar::handle{
- background: lightgray;
- border-radius:6px;
-}
-QTableWidget QScrollBar::handle:hover{background:gray;}
-QTableWidget QScrollBar::sub-line{background:transparent;}
-QTableWidget QScrollBar::add-line{background:transparent;}
-
-
-
-/* QTableView */
-QTableView {
- border-left: none;
- border-right: none;
- border-top: none;
- border-bottom: 1px solid var(--Color_Border);
-
- text-align: center;
- color: var(--Color_DefaultText);
- background: var(--Color_DefaultHover);
- padding:5px;
-
-}
-
-QTableView::item{
- margin-top: 5px;
- background: var(--Color_Default);
-}
-QTableView::item:selected{
- color: var(--Color_PrimaryText);
- background: var(--Color_Primary);
-}
-
-
-QTableView QHeaderView::section {
- color: var(--Color_DefaultText);
- background: var(--Color_DefaultHover);
- text-align: center;
- height: var(--Size_HeaderHeight);
- border: none;
- font-size: var(--Font_Size_TableHeader);
- font-weight: bold;
-}
-
-QTableView QScrollBar::vertical{
- background:transparent;
- width: 4px;
- border-radius:6px;
-}
-QTableView QScrollBar::handle{
- background: lightgray;
- border-radius:6px;
-}
-QTableView QScrollBar::handle:hover{background:gray;}
-QTableView QScrollBar::sub-line{background:transparent;}
-QTableView QScrollBar::add-line{background:transparent;}
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/style.py b/TIDALDL-GUI-CROSS/tidal_gui/style.py
deleted file mode 100644
index 902ee36..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/style.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-'''
-@File : enum.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-'''
-
-from enum import Enum
-
-
-class ButtonStyle(Enum):
- Default = 0,
- Primary = 1,
- Success = 2,
- Danger = 3,
- Warning = 4,
- Info = 5,
-
- CloseWindow = 6,
- MaxWindow = 7,
- MinWindow = 8,
-
- SearchIcon = 9,
- TaskIcon = 10,
- SettingsIcon = 11,
- AboutIcon = 12,
-
- SoftwareIcon = 13
-
- PrePage = 14
- NextPage = 15
-
-
-class LabelStyle(Enum):
- Default = 0,
- PageTitle = 1,
- PageSubTitle = 2,
- HugeTitle = 3,
- LogoBottom = 4,
-
-
-class ThemeStyle(Enum):
- Default = 0,
- Dark = 1,
-
-
-class ListWidgetStyle(Enum):
- Default = 0,
- TaskTab = 1,
- TaskContent = 2,
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/theme.py b/TIDALDL-GUI-CROSS/tidal_gui/theme.py
deleted file mode 100644
index 5aa25dc..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/theme.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : qssParse.py
-@Date : 2021/05/08
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-
-import aigpy
-
-from tidal_gui.style import ThemeStyle
-
-
-def __getParam__(line: str):
- key = aigpy.string.getSub(line, "--", ":")
- value = aigpy.string.getSub(line, ":", ";")
- return key, value
-
-
-def __parseParamsList__(content: str) -> dict:
- globalStr = aigpy.string.getSub(content, ":root", "}")
- lines = globalStr.split("\n")
-
- array = {}
- for line in lines:
- key, value = __getParam__(line)
- if key == "" or value == "":
- continue
- array[key] = value
- return array
-
-
-def __parseQss__(content: str, params: dict) -> str:
- content = aigpy.string.getSub(content, "/* #QSS_START */")
- for key in params:
- content = content.replace("var(--" + key + ")", params[key])
-
- content = content.replace("$PACKAGE_PATH$", getPackagePath())
- return content
-
-
-def __getQss__(filePath: str) -> str:
- content = aigpy.file.getContent(filePath)
- params = __parseParamsList__(content)
- qss = __parseQss__(content, params)
- return qss
-
-
-def getPackagePath():
- path = __file__
- return aigpy.path.getDirName(path).replace('\\', '/')
-
-
-def getThemeQssContent(style: ThemeStyle = ThemeStyle.Default):
- name = "theme" + style.name + ".qss"
- path = getPackagePath() + "/resource/"
- return __getQss__(path + name)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/tidalImp.py b/TIDALDL-GUI-CROSS/tidal_gui/tidalImp.py
deleted file mode 100644
index a2952d2..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/tidalImp.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : tidalImp.py
-@Date : 2021/9/2
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-import time
-
-import requests
-import tidal_dl.model
-from aigpy.stringHelper import isNull
-from tidal_dl import TokenSettings, TOKEN, TidalAPI
-
-
-class TidalImp(TidalAPI):
- def __init__(self):
- super(TidalImp, self).__init__()
-
- def loginByConfig(self):
- if isNull(TOKEN.accessToken):
- return False
-
- msg, check = self.verifyAccessToken(TOKEN.accessToken)
- if check:
- self.key.countryCode = TOKEN.countryCode
- self.key.userId = TOKEN.userid
- self.key.accessToken = TOKEN.accessToken
- return True
-
- msg, check = self.refreshAccessToken(TOKEN.refreshToken)
- if check:
- TOKEN.userid = self.key.userId
- TOKEN.countryCode = self.key.countryCode
- TOKEN.accessToken = self.key.accessToken
- TOKEN.expiresAfter = time.time() + int(self.key.expiresIn)
- TokenSettings.save(TOKEN)
- return True
- else:
- tmp = TokenSettings() # clears saved tokens
- TokenSettings.save(tmp)
- return False
-
- def loginByWeb(self):
- start = time.time()
- elapsed = 0
- while elapsed < self.key.authCheckTimeout:
- elapsed = time.time() - start
- msg, check = self.checkAuthStatus()
- if not check:
- if msg == "pending":
- time.sleep(self.key.authCheckInterval + 1)
- continue
- return False
- if check:
- TOKEN.userid = self.key.userId
- TOKEN.countryCode = self.key.countryCode
- TOKEN.accessToken = self.key.accessToken
- TOKEN.refreshToken = self.key.refreshToken
- TOKEN.expiresAfter = time.time() + int(self.key.expiresIn)
- TokenSettings.save(TOKEN)
- return True
- return False
-
- @staticmethod
- def getArtistsNames(self, artists: list[tidal_dl.model.Artist]):
- ret = []
- for item in artists:
- ret.append(item.name)
- return ','.join(ret)
-
- @staticmethod
- def getDurationString(seconds: int):
- m, s = divmod(seconds, 60)
- h, m = divmod(m, 60)
- return "%02d:%02d:%02d" % (h, m, s)
-
- def getCoverData(self, sid, width="320", height="320"):
- url = self.getCoverUrl(sid, width, height)
- try:
- respond = requests.get(url)
- return respond.content
- except:
- return ''
-
-
-tidalImp = TidalImp()
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/__init__.py b/TIDALDL-GUI-CROSS/tidal_gui/view/__init__.py
deleted file mode 100644
index 33becbf..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/__init__.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : __init__.py
-@Date : 2021/05/11
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/aboutView.py b/TIDALDL-GUI-CROSS/tidal_gui/view/aboutView.py
deleted file mode 100644
index ca78fc5..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/aboutView.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : aboutView.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import Qt
-from PyQt5.QtGui import QPixmap
-from PyQt5.QtWidgets import QWidget, QVBoxLayout, QGridLayout, QHBoxLayout, QLabel
-
-from tidal_gui.control.label import Label
-from tidal_gui.control.pushButton import PushButton
-from tidal_gui.style import LabelStyle, ButtonStyle
-from tidal_gui.theme import getPackagePath
-
-
-class AboutView(QWidget):
- def __init__(self):
- super(AboutView, self).__init__()
- self.__initView__()
-
- def __initView__(self):
- grid = QGridLayout(self)
- grid.addWidget(self.__initLogo__(), 0, 0, Qt.AlignLeft)
- grid.addLayout(self.__initContent__(), 0, 1)
-
- def __initLogo__(self):
- path = getPackagePath() + "/resource/svg/V.svg"
- self._logo = QLabel()
- self._logo.setPixmap(QPixmap(path))
- return self._logo
-
- def __initButton__(self):
- path = getPackagePath() + "/resource/svg/"
-
- self._feedbackBtn = PushButton('Feedback', ButtonStyle.Default, iconUrl=path + 'github.svg')
- self._buymeacoffeeBtn = PushButton('Buymeacoffee', ButtonStyle.Info, iconUrl=path + 'buymeacoffee.svg')
- self._paypalBtn = PushButton('Paypal', ButtonStyle.Primary, iconUrl=path + 'paypal.svg')
-
- layout = QHBoxLayout()
- layout.addWidget(self._feedbackBtn)
- layout.addWidget(self._buymeacoffeeBtn)
- layout.addWidget(self._paypalBtn)
- return layout
-
- def __initContent__(self):
- self._titleLabel = Label('', LabelStyle.HugeTitle)
- self._authorLabel = Label('')
- self._versionLabel = Label('')
- self._lastVersionLabel = Label('')
-
- layout = QVBoxLayout()
- layout.addWidget(self._titleLabel)
- layout.addWidget(self._authorLabel)
- layout.addWidget(self._versionLabel)
- layout.addWidget(self._lastVersionLabel)
- layout.addLayout(self.__initButton__())
- return layout
-
- def setTitle(self, text: str):
- self._titleLabel.setText(text)
-
- def setAuthor(self, text: str):
- self._authorLabel.setText('MADE WITH ♥ BY ' + text)
-
- def setVersion(self, text: str):
- self._versionLabel.setText('VERSION ' + text)
-
- def setLastVersion(self, text: str):
- self._lastVersionLabel.setText('LAST-VERSION ' + text)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/loginView.py b/TIDALDL-GUI-CROSS/tidal_gui/view/loginView.py
deleted file mode 100644
index f4628c4..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/loginView.py
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : loginView.py
-@Date : 2021/04/30
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import Qt
-from PyQt5.QtGui import QPixmap
-from PyQt5.QtWidgets import *
-
-from tidal_gui.control.checkBox import CheckBox
-from tidal_gui.control.framelessWidget import FramelessWidget
-from tidal_gui.control.label import Label
-from tidal_gui.control.layout import createHBoxLayout
-from tidal_gui.control.lineEdit import LineEdit
-from tidal_gui.control.pushButton import PushButton
-from tidal_gui.style import ButtonStyle, LabelStyle
-from tidal_gui.theme import getPackagePath
-
-
-class LoginView(FramelessWidget):
- viewWidth = 650
- viewHeight = 400
- logoWidth = 300
-
- def __init__(self):
- super(LoginView, self).__init__()
- self.setFixedSize(self.viewWidth, self.viewHeight)
- self.__initView__()
- self.setWindowButton(True, False, False)
-
- def __initAccountTab__(self):
- self._deviceCodeEdit = LineEdit()
- self._confirmBtn = PushButton("LOGIN", ButtonStyle.Primary)
-
- grid = QGridLayout()
- grid.setSpacing(15)
- grid.setRowStretch(0, 1)
-
- grid.addLayout(createHBoxLayout([Label("DeviceCode"), self._deviceCodeEdit]), 1, 0, 1, 2)
- grid.setRowStretch(3, 1)
- grid.addWidget(self._confirmBtn, 5, 0, 1, 2)
- grid.setRowStretch(6, 1)
-
- widget = QWidget()
- widget.setLayout(grid)
- return widget
-
- def __initProxyTab__(self):
- self._enableProxyCheck = CheckBox('')
- self._proxyHostEdit = LineEdit()
- self._proxyPortEdit = LineEdit()
- self._proxyUserEdit = LineEdit()
- self._proxyPwdEdit = LineEdit()
-
- grid = QGridLayout()
- grid.setSpacing(8)
- grid.setRowStretch(0, 1)
- grid.addWidget(Label("HttpProxy"), 1, 0)
- grid.addWidget(self._enableProxyCheck, 1, 1)
- grid.addWidget(Label("Host"), 2, 0)
- grid.addWidget(self._proxyHostEdit, 2, 1)
- grid.addWidget(Label("Port"), 3, 0)
- grid.addWidget(self._proxyPortEdit, 3, 1)
- grid.addWidget(Label("UserName"), 4, 0)
- grid.addWidget(self._proxyUserEdit, 4, 1)
- grid.addWidget(Label("Password"), 5, 0)
- grid.addWidget(self._proxyPwdEdit, 5, 1)
- grid.setRowStretch(6, 1)
-
- widget = QWidget()
- widget.setLayout(grid)
- return widget
-
- def __initIconWidget__(self):
- self._icon = Label('')
- self._icon.setStyleSheet("QLabel{background-color:rgb(0,0,0);}")
-
- self._icon.setPixmap(QPixmap(getPackagePath() + "/resource/svg/V.svg"))
- self._icon.setAlignment(Qt.AlignCenter)
-
- self._iconLabel = Label('', LabelStyle.LogoBottom)
- self._iconLabel.setAlignment(Qt.AlignCenter)
- self._iconLabel.hide()
-
- layout = QVBoxLayout()
- layout.setSpacing(15)
- layout.setContentsMargins(0, 0, 0, 0)
- layout.addStretch(1)
- layout.addWidget(self._icon)
- layout.addWidget(self._iconLabel)
- layout.addStretch(1)
-
- widget = QWidget()
- widget.setStyleSheet("QWidget{background-color:rgb(0,0,0);}")
- widget.setLayout(layout)
- return widget
-
- def __initView__(self):
- iconWidget = self.__initIconWidget__()
-
- self._tab = QTabWidget(self)
- self._tab.addTab(self.__initAccountTab__(), "LOGIN")
- self._tab.addTab(self.__initProxyTab__(), "PROXY")
- self._tab.setFixedWidth(self.viewWidth - self.logoWidth - 60)
- self._tab.hide()
-
- grid = self.getGrid()
- grid.setSpacing(15)
- grid.setContentsMargins(0, 0, 0, 0)
- grid.addWidget(iconWidget)
- grid.addWidget(self._tab, 0, 1, Qt.AlignCenter)
-
- self.setValidMoveWidget(iconWidget)
-
- def showEnterView(self):
- self._tab.show()
-
- def hideEnterView(self):
- self._tab.hide()
-
- def setDeviceCode(self, text):
- self._deviceCodeEdit.setText(text)
-
- def enableHttpProxy(self) -> bool:
- return self._enableProxyCheck.isChecked()
-
- def getProxyInfo(self) -> dict:
- infos = {'host': self._proxyHostEdit.text(), 'port': self._proxyPortEdit.text(),
- 'username': self._proxyUserEdit.text(), 'password': self._proxyPwdEdit.text()}
- return infos
-
- def connectConfirmButton(self, func):
- self._confirmBtn.clicked.connect(func)
-
- def enableConfirmButton(self, enable):
- self._confirmBtn.setEnabled(enable)
-
- def setMsg(self, text):
- if len(text) <= 0:
- self._iconLabel.hide()
- else:
- self._iconLabel.setText(text)
- self._iconLabel.show()
-
- def showErrMessage(self, text: str):
- qmb = QMessageBox(self)
- qmb.setWindowTitle('Error')
- qmb.setIcon(QMessageBox.Warning)
- qmb.setText(text)
- qmb.addButton(QPushButton('OK', qmb), QMessageBox.YesRole)
- qmb.open()
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/mainView.py b/TIDALDL-GUI-CROSS/tidal_gui/view/mainView.py
deleted file mode 100644
index 06cc5ab..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/mainView.py
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : main.py
-@Date : 2021/05/11
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from enum import IntEnum
-
-from PyQt5.QtCore import Qt
-from PyQt5.QtWidgets import QVBoxLayout, QWidget, QGridLayout
-
-from tidal_gui.control.framelessWidget import FramelessWidget
-from tidal_gui.control.pushButton import PushButton
-from tidal_gui.style import ButtonStyle
-
-
-class PageType(IntEnum):
- Search = 0,
- Task = 1,
- Settings = 2,
- About = 3,
- Max = 4,
-
-
-class MainView(FramelessWidget):
- viewWidth = 1200
- viewHeight = 700
-
- def __init__(self):
- super(MainView, self).__init__()
- self.setMinimumHeight(self.viewHeight)
- self.setMinimumWidth(self.viewWidth)
- self.__initPages__()
- self.__initView__()
- self.setWindowButton(True, True, True)
-
- def __initPages__(self):
- self._pages = []
- for index in range(0, PageType.Max):
- self._pages.append(None)
-
- def __initView__(self):
- leftTab = self.__initLeftTab__()
- content = self.__initContent__()
-
- grid = self.getGrid()
- grid.addWidget(leftTab, 0, 0, Qt.AlignLeft)
- grid.addLayout(content, 0, 1)
-
- self.setValidMoveWidget(leftTab)
-
- def __initLeftTab__(self):
- self._icon = PushButton("", ButtonStyle.SoftwareIcon)
- self._searchBtn = PushButton("", ButtonStyle.SearchIcon)
- self._taskBtn = PushButton("", ButtonStyle.TaskIcon)
- self._settingsBtn = PushButton("", ButtonStyle.SettingsIcon)
- self._aboutBtn = PushButton("", ButtonStyle.AboutIcon)
-
- self._searchBtn.clicked.connect(lambda: self.showPage(PageType.Search))
- self._taskBtn.clicked.connect(lambda: self.showPage(PageType.Task))
- self._settingsBtn.clicked.connect(lambda: self.showPage(PageType.Settings))
- self._aboutBtn.clicked.connect(lambda: self.showPage(PageType.About))
-
- layout = QVBoxLayout()
- layout.setSpacing(15)
- layout.setContentsMargins(15, 45, 15, 20)
- layout.addWidget(self._icon)
- layout.addWidget(self._searchBtn)
- layout.addWidget(self._taskBtn)
- layout.addStretch(1)
- layout.addWidget(self._settingsBtn)
- layout.addWidget(self._aboutBtn)
-
- widget = QWidget()
- widget.setLayout(layout)
- widget.setObjectName("MainViewLeftWidget")
- return widget
-
- def __initContent__(self) -> QGridLayout:
- self._searchView = None
- self._settingsView = None
- self._aboutView = None
- self._taskView = None
- self._contentLayout = QGridLayout()
- self._contentLayout.setContentsMargins(10, 30, 10, 10)
- return self._contentLayout
-
- def showPage(self, pageType: PageType = PageType.Search):
- for index in range(0, PageType.Max):
- if index == pageType:
- self._pages[index].show()
- else:
- self._pages[index].hide()
-
- def __setContentPage__(self, view, pageType: PageType):
- self._pages[pageType] = view
- self._pages[pageType].hide()
- self._contentLayout.addWidget(view, 0, 0)
-
- def setSearchView(self, view):
- self.__setContentPage__(view, PageType.Search)
-
- def setTaskView(self, view):
- self.__setContentPage__(view, PageType.Task)
-
- def setSettingsView(self, view):
- self.__setContentPage__(view, PageType.Settings)
-
- def setAboutView(self, view: QWidget):
- # self.__setContentPage__(view, PageType.About)
- self._pages[PageType.About] = view
- self._pages[PageType.About].hide()
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/searchView.py b/TIDALDL-GUI-CROSS/tidal_gui/view/searchView.py
deleted file mode 100644
index 259d5df..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/searchView.py
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : searchView.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-import tidal_dl.model
-from PyQt5.QtCore import Qt
-from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QTabWidget
-from tidal_dl import Type
-
-from tidal_gui.control.comboBox import ComboBox
-from tidal_gui.control.label import Label
-from tidal_gui.control.layout import createHBoxLayout
-from tidal_gui.control.lineEdit import LineEdit
-from tidal_gui.control.pushButton import PushButton
-from tidal_gui.control.tableView import TableView
-from tidal_gui.control.tableWidget import TableWidget
-from tidal_gui.style import ButtonStyle
-from tidal_gui.theme import getPackagePath
-from tidal_gui.tidalImp import tidalImp
-
-
-class SearchView(QWidget):
- def __init__(self):
- super(SearchView, self).__init__()
- self._rowCount = 20
- self._table = {}
- self.__initView__()
- self._searchEdit.setFocus()
- self._searchBtn.setDefault(True)
-
- def __initView__(self):
- grid = QVBoxLayout(self)
- grid.addLayout(self.__initHead__(), Qt.AlignTop)
- grid.addLayout(self.__initContent__())
- grid.addLayout(self.__initTail__(), Qt.AlignBottom)
-
- def __initHead__(self):
- self._searchEdit = LineEdit()
- self._searchBtn = PushButton('Search', ButtonStyle.Primary,
- iconUrl=getPackagePath() + "/resource/svg/search.svg")
-
- layout = createHBoxLayout([self._searchEdit, self._searchBtn])
- return layout
-
- def __initTail__(self):
- self._trackQualityComboBox = ComboBox([])
- self._videoQualityComboBox = ComboBox([])
-
- self._prePageBtn = PushButton('', ButtonStyle.PrePage)
- self._nextPageBtn = PushButton('', ButtonStyle.NextPage)
- self._pageIndexEdit = LineEdit('')
-
- self._downloadBtn = PushButton('Download', ButtonStyle.Primary)
-
- layout = QHBoxLayout()
- layout.addWidget(Label('Track:'))
- layout.addWidget(self._trackQualityComboBox)
- layout.addWidget(Label('Video:'))
- layout.addWidget(self._videoQualityComboBox)
- layout.addStretch(1)
- layout.addWidget(self._prePageBtn)
- layout.addWidget(self._pageIndexEdit)
- layout.addWidget(self._nextPageBtn)
- layout.addWidget(self._downloadBtn)
- return layout
-
- def __initContent__(self):
- self._tabWidget = QTabWidget(self)
- self._tabWidget.addTab(self.__initTable__(Type.Album), "ALBUM")
- self._tabWidget.addTab(self.__initTable__(Type.Track), "TRACK")
- self._tabWidget.addTab(self.__initTable__(Type.Video), "VIDEO")
- self._tabWidget.addTab(self.__initTable__(Type.Playlist), "PLAYLIST")
-
- layout = QVBoxLayout()
- layout.addWidget(self._tabWidget)
- return layout
-
- def __initTable__(self, stype: Type):
- if stype == Type.Album:
- columnHeads = ['#', ' ', 'Title', 'Artists', 'Release', 'Duration']
- self._table[stype] = TableWidget(columnHeads)
- self._table[stype].setColumnWidth(0, 50)
- self._table[stype].setColumnWidth(1, 60)
- self._table[stype].setColumnWidth(2, 400)
- self._table[stype].setColumnWidth(3, 200)
- elif stype == Type.Track:
- columnHeads = ['#', ' ', 'Title', 'Album', 'Artists', 'Duration']
- self._table[stype] = TableWidget(columnHeads)
- self._table[stype].setColumnWidth(0, 50)
- self._table[stype].setColumnWidth(1, 60)
- self._table[stype].setColumnWidth(2, 400)
- self._table[stype].setColumnWidth(3, 200)
- self._table[stype].setColumnWidth(4, 200)
- elif stype == Type.Video:
- columnHeads = ['#', ' ', 'Title', 'Artists', 'Duration']
- self._table[stype] = TableWidget(columnHeads)
- self._table[stype].setColumnWidth(0, 50)
- self._table[stype].setColumnWidth(1, 60)
- self._table[stype].setColumnWidth(2, 400)
- self._table[stype].setColumnWidth(3, 200)
- self._table[stype].setColumnWidth(4, 200)
- elif stype == Type.Playlist:
- columnHeads = ['#', 'Title', 'Artist', 'Duration']
- self._table[stype] = TableWidget(columnHeads)
- self._table[stype].setColumnWidth(0, 50)
- self._table[stype].setColumnWidth(1, 400)
- self._table[stype].setColumnWidth(2, 200)
- self._table[stype].setColumnWidth(3, 200)
- return self._table[stype]
-
- def setTableItems(self, stype: Type, indexOffset: int, result: tidal_dl.model.SearchResult):
- if stype == Type.Album:
- items = result.albums.items
- self._table[stype].changeRowCount(len(items))
- for index, item in enumerate(items):
- self._table[stype].addItem(index, 0, str(index + 1 + indexOffset))
- self._table[stype].addItem(index, 1, tidalImp.getFlag(item, Type.Album, True))
- self._table[stype].addItem(index, 2, item.title)
- self._table[stype].addItem(index, 3, item.artists[0].name)
- self._table[stype].addItem(index, 4, str(item.releaseDate))
- self._table[stype].addItem(index, 5, tidalImp.getDurationString(item.duration))
- elif stype == Type.Track:
- items = result.tracks.items
- self._table[stype].changeRowCount(len(items))
- for index, item in enumerate(items):
- self._table[stype].addItem(index, 0, str(index + 1 + indexOffset))
- self._table[stype].addItem(index, 1, tidalImp.getFlag(item, Type.Track, True))
- self._table[stype].addItem(index, 2, item.title)
- self._table[stype].addItem(index, 3, item.album.title)
- self._table[stype].addItem(index, 4, item.artists[0].name)
- self._table[stype].addItem(index, 5, tidalImp.getDurationString(item.duration))
- elif stype == Type.Video:
- items = result.videos.items
- self._table[stype].changeRowCount(len(items))
- for index, item in enumerate(items):
- self._table[stype].addItem(index, 0, str(index + 1 + indexOffset))
- self._table[stype].addItem(index, 1, tidalImp.getFlag(item, Type.Video, True))
- self._table[stype].addItem(index, 2, item.title)
- self._table[stype].addItem(index, 3, item.artists[0].name)
- self._table[stype].addItem(index, 4, tidalImp.getDurationString(item.duration))
- elif stype == Type.Playlist:
- items = result.playlists.items
- self._table[stype].changeRowCount(len(items))
- for index, item in enumerate(items):
- self._table[stype].addItem(index, 0, str(index + 1 + indexOffset))
- self._table[stype].addItem(index, 1, item.title)
- self._table[stype].addItem(index, 2, '')
- self._table[stype].addItem(index, 3, tidalImp.getDurationString(item.duration))
- self._table[stype].viewport().update()
-
- def getSearchText(self):
- return self._searchEdit.text()
-
- def setPageIndex(self, index):
- self._pageIndexEdit.setText(str(index))
-
- def getPageIndex(self):
- return int(self._pageIndexEdit.text())
-
- def getSelectedTabIndex(self):
- return self._tabWidget.currentIndex()
-
- def getSelectedTableIndex(self, stype: Type):
- array = self._table[stype].selectedIndexes()
- if len(array) <= 0:
- return -1
- return array[0].row()
-
- def setTrackQualityItems(self, items: list):
- self._trackQualityComboBox.setItems(items)
-
- def setVideoQualityItems(self, items: list):
- self._videoQualityComboBox.setItems(items)
-
- def getTrackQualityText(self):
- return self._trackQualityComboBox.currentText()
-
- def getVideoQualityText(self):
- return self._videoQualityComboBox.currentText()
-
- def connectButton(self, name: str, func):
- if name == 'search':
- self._searchBtn.clicked.connect(func)
- self._searchEdit.returnPressed.connect(func)
- elif name == 'prePage':
- self._prePageBtn.clicked.connect(func)
- elif name == 'nextPage':
- self._nextPageBtn.clicked.connect(func)
- elif name == 'download':
- self._downloadBtn.clicked.connect(func)
-
- def connectTab(self, func):
- self._tabWidget.currentChanged.connect(func)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/settingsView.py b/TIDALDL-GUI-CROSS/tidal_gui/view/settingsView.py
deleted file mode 100644
index 836d49e..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/settingsView.py
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : settingsView.py
-@Date : 2021/05/11
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import Qt
-from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QGridLayout
-
-from tidal_gui.control.checkBox import CheckBox
-from tidal_gui.control.comboBox import ComboBox
-from tidal_gui.control.label import Label
-from tidal_gui.control.line import Line
-from tidal_gui.control.lineEdit import LineEdit
-from tidal_gui.control.pushButton import PushButton
-from tidal_gui.style import LabelStyle, ButtonStyle, ThemeStyle
-
-
-class SettingsView(QWidget):
- def __init__(self):
- super(SettingsView, self).__init__()
- self.__initView__()
-
- def __initView__(self):
- grid = QVBoxLayout(self)
- grid.addLayout(self.__initHeader__())
- grid.addLayout(self.__initContent__())
- grid.addLayout(self.__initToolButton__())
-
- def __initHeader__(self):
- self._header = Label("SETTINGS", LabelStyle.PageTitle)
- layout = QVBoxLayout()
- layout.addWidget(self._header)
- layout.addWidget(Line('H'))
- layout.setSpacing(10)
- layout.setContentsMargins(0, 0, 0, 10)
- return layout
-
- def __initToolButton__(self) -> QHBoxLayout:
- self._logoutBtn = PushButton('Logout', ButtonStyle.Danger, 100)
- self._cancelBtn = PushButton('Cancel', ButtonStyle.Default, 100)
- self._confirmBtn = PushButton('OK', ButtonStyle.Primary, 100)
-
- layout = QHBoxLayout()
- layout.addWidget(self._logoutBtn)
- layout.addStretch(1)
- layout.addWidget(self._cancelBtn)
- layout.addWidget(self._confirmBtn)
- return layout
-
- def __addContent__(self, control, desc=''):
- rowIdx = self._contentLayout.rowCount()
- if desc != '':
- self._contentLayout.addWidget(Label(desc), rowIdx, 0, Qt.AlignRight)
- self._contentLayout.addWidget(control, rowIdx, 1)
-
- def __initContent__(self):
- self._contentLayout = QGridLayout()
- self._contentLayout.setSpacing(15)
-
- self._pathEdit = LineEdit()
- self._threadNumComboBox = ComboBox([1, 5, 10, 20])
- self._searchNumComboBox = ComboBox([10, 20, 30, 40, 50])
- self.__addContent__(self._pathEdit, 'Path:')
- self.__addContent__(self._threadNumComboBox, 'ThreadNum:')
- self.__addContent__(self._searchNumComboBox, 'SearchNum:')
-
- self._contentLayout.setRowStretch(self._contentLayout.rowCount(), 1)
-
- self._albumFolderFormatEdit = LineEdit()
- self._trackFileFormatEdit = LineEdit()
- self._videoFileFormatEdit = LineEdit()
- self.__addContent__(self._albumFolderFormatEdit, 'AlbumFolderFormat:')
- self.__addContent__(self._trackFileFormatEdit, 'TrackFileFormat:')
- self.__addContent__(self._videoFileFormatEdit, 'VideoFileFormat:')
-
- self._saveCoverCheck = CheckBox('Download album cover')
- self._skipExistCheck = CheckBox('Skip exist file when downloading')
- self._convertMp4ToM4a = CheckBox('Convert mp4 to m4a')
- self.__addContent__(self._saveCoverCheck)
- self.__addContent__(self._skipExistCheck)
- self.__addContent__(self._convertMp4ToM4a)
-
- self._contentLayout.setRowStretch(self._contentLayout.rowCount(), 1)
-
- self._themeComboBox = ComboBox(list(map(lambda x: x.name, ThemeStyle)))
- self._languageComboBox = ComboBox(['Default'])
- self.__addContent__(self._themeComboBox, 'Theme:')
- self.__addContent__(self._languageComboBox, 'Language:')
-
- self._contentLayout.setRowStretch(self._contentLayout.rowCount(), 10)
- return self._contentLayout
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/taskItemView.py b/TIDALDL-GUI-CROSS/tidal_gui/view/taskItemView.py
deleted file mode 100644
index d87872b..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/taskItemView.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : taskItemView.py
-@Date : 2021/9/14
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtWidgets import QWidget, QHBoxLayout, QTableWidget, QVBoxLayout
-
-from tidal_gui.control.label import Label
-from tidal_gui.control.layout import createHBoxLayout, createVBoxLayout
-from tidal_gui.control.pushButton import PushButton
-
-
-class TaskItemView(QWidget):
- def __init__(self):
- super(TaskItemView, self).__init__()
- self.__initView__()
-
- def __initView__(self):
- grid = QVBoxLayout(self)
- grid.addLayout(self.__initHead__())
- grid.addWidget(self.__initList__())
-
- def __initHead__(self):
- self._btnRetry = PushButton()
- self._btnCancel = PushButton()
- self._btnDelete = PushButton()
- self._btnOpen = PushButton()
- self._btnExpand = PushButton()
- btnLayout = createHBoxLayout([self._btnRetry, self._btnCancel,
- self._btnDelete, self._btnOpen,
- self._btnExpand])
-
- self._titleLabel = Label()
- self._descLabel = Label()
- self._errLabel = Label()
- self._errLabel.hide()
- labelLayout = createVBoxLayout([self._titleLabel, self._descLabel, self._errLabel])
-
- self._picLabel = Label()
- headLayout = QHBoxLayout()
- headLayout.addWidget(self._picLabel)
- headLayout.addLayout(labelLayout)
- headLayout.addStretch(1)
- headLayout.addLayout(btnLayout)
-
- return headLayout
-
- def __initList__(self):
- self._list = QTableWidget()
- return self._list
-
- def setLabel(self, title, desc):
- self._titleLabel.setText(title)
- self._descLabel.setText(desc)
-
- def setErrmsg(self, msg):
- self._errLabel.setText(msg)
-
- def setPic(self, data):
- pass
-
- def addList(self):
- pass
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/view/taskView.py b/TIDALDL-GUI-CROSS/tidal_gui/view/taskView.py
deleted file mode 100644
index 919a411..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/view/taskView.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : taskView.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import Qt, QSize
-from PyQt5.QtWidgets import QWidget, QGridLayout, QListWidgetItem
-
-from tidal_gui.control.label import Label
-from tidal_gui.control.line import Line
-from tidal_gui.control.listWidget import ListWidget
-from tidal_gui.style import LabelStyle, ListWidgetStyle
-from tidal_gui.theme import getPackagePath
-
-
-class TaskView(QWidget):
- def __init__(self):
- super(TaskView, self).__init__()
- self._listMap = {'Download': ListWidget(ListWidgetStyle.TaskContent),
- 'Complete': ListWidget(ListWidgetStyle.TaskContent),
- 'Error': ListWidget(ListWidgetStyle.TaskContent)}
- self._pageMap = {'Download': QWidget(),
- 'Complete': QWidget(),
- 'Error': QWidget()}
- self.__initView__()
-
- def __initView__(self):
- grid = QGridLayout(self)
- grid.addLayout(self.__initLefTab__(), 0, 0, Qt.AlignLeft)
- grid.addWidget(self.__createContent__('Download'), 0, 1, Qt.AlignTop)
- grid.addWidget(self.__createContent__('Complete'), 0, 1, Qt.AlignTop)
- grid.addWidget(self.__createContent__('Error'), 0, 1, Qt.AlignTop)
-
- def __initLefTab__(self):
- self._listTab = ListWidget(ListWidgetStyle.TaskTab)
- self._listTab.setIconSize(QSize(20, 20))
-
- iconPath = getPackagePath() + "/resource/svg/taskTab/"
- self._listTab.addIConTextItem(iconPath + 'download.svg', 'Download')
- self._listTab.addIConTextItem(iconPath + 'complete.svg', 'Complete')
- self._listTab.addIConTextItem(iconPath + 'Error.svg', 'Error')
-
- self._listTab.itemClicked.connect(self.__tabItemChanged__)
-
- layout = QGridLayout()
- layout.addWidget(Label("TASK LIST", LabelStyle.PageTitle), 0, 0, Qt.AlignLeft)
- layout.addWidget(self._listTab, 1, 0, Qt.AlignLeft)
- layout.addWidget(Line('V'), 0, 1, 2, 1, Qt.AlignLeft)
- return layout
-
- def __createContent__(self, typeStr: str):
- layout = QGridLayout()
- layout.setContentsMargins(0, 0, 10, 10)
- layout.setSpacing(10)
- layout.addWidget(Label(typeStr, LabelStyle.PageSubTitle), 0, 0, Qt.AlignTop)
- layout.addWidget(Line('H'), 1, 0, Qt.AlignTop)
- layout.addWidget(self._listMap[typeStr], 2, 0)
-
- self._pageMap[typeStr].setLayout(layout)
- return self._pageMap[typeStr]
-
- def __tabItemChanged__(self, item: QListWidgetItem):
- for name in self._listMap:
- if name == item.text():
- self._pageMap[name].show()
- else:
- self._pageMap[name].hide()
-
\ No newline at end of file
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/__init__.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/__init__.py
deleted file mode 100644
index a4ecc95..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/__init__.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : __init__.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/aboutModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/aboutModel.py
deleted file mode 100644
index b258138..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/aboutModel.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : aboutModel.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from tidal_gui.view.aboutView import AboutView
-from tidal_gui.viewModel.viewModel import ViewModel
-
-
-class AboutModel(ViewModel):
- def __init__(self):
- super(AboutModel, self).__init__()
- self.view = AboutView()
- self.view.setTitle('TIDAL-GUI')
- self.view.setAuthor('Yaronzz')
- self.view.setVersion('1.0.0.1')
- self.view.setLastVersion('1.0.0.1')
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/loginModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/loginModel.py
deleted file mode 100644
index 50300d8..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/loginModel.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : loginModel.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-import _thread
-import time
-import webbrowser
-
-from PyQt5.QtCore import QTimer, pyqtSignal, QObject
-
-from tidal_gui.tidalImp import tidalImp
-from tidal_gui.view.loginView import LoginView
-from tidal_gui.viewModel.viewModel import ViewModel
-
-
-class LoginModel(ViewModel):
- SIGNAL_LOGIN_SUCCESS = pyqtSignal()
-
- def __init__(self):
- super(LoginModel, self).__init__()
- self.view = LoginView()
- self.view.connectConfirmButton(self.__openWebAndWait__)
-
- def loginByConfig(self):
- self.view.hideEnterView()
- self.view.setMsg("LOGIN...")
-
- def __thread_login__(model: LoginModel):
- if tidalImp.loginByConfig():
- model.SIGNAL_LOGIN_SUCCESS.emit()
- return
- model.getDeviceCode()
-
- _thread.start_new_thread(__thread_login__, (self,))
-
- def getDeviceCode(self):
- self.view.hideEnterView()
- self.view.setMsg("GET DEVICE-CODE...")
-
- def __thread_getCode__(model: LoginModel):
- msg, check = tidalImp.getDeviceCode()
- if check:
- model.view.enableConfirmButton(True)
- model.view.setDeviceCode(tidalImp.key.userCode)
- model.view.setMsg(' ')
- model.view.showEnterView()
- else:
- model.view.setMsg(msg)
-
- _thread.start_new_thread(__thread_getCode__, (self,))
-
- def __openWebAndWait__(self):
- self.view.enableConfirmButton(False)
- webbrowser.open('link.tidal.com', new=0, autoraise=True)
-
- def __thread_waitLogin__(model: LoginModel):
- if tidalImp.loginByWeb():
- model.SIGNAL_LOGIN_SUCCESS.emit()
- else:
- model.getDeviceCode()
-
- _thread.start_new_thread(__thread_waitLogin__, (self,))
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/mainModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/mainModel.py
deleted file mode 100644
index 6746472..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/mainModel.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : mainModel.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from tidal_gui.view.mainView import MainView
-from tidal_gui.viewModel.aboutModel import AboutModel
-from tidal_gui.viewModel.loginModel import LoginModel
-from tidal_gui.viewModel.searchModel import SearchModel
-from tidal_gui.viewModel.settingsModel import SettingsModel
-from tidal_gui.viewModel.taskModel import TaskModel
-from tidal_gui.viewModel.viewModel import ViewModel
-
-
-class MainModel(ViewModel):
- def __init__(self):
- super(MainModel, self).__init__()
- self.loginModel = LoginModel()
- self.searchModel = SearchModel()
- self.taskModel = TaskModel()
- self.settingsModel = SettingsModel()
- self.aboutModel = AboutModel()
-
- self.loginModel.SIGNAL_LOGIN_SUCCESS.connect(self.__loginSuccess__)
- self.searchModel.SIGNAL_ADD_TASKITEM.connect(self.taskModel.addTaskItem)
-
- self.view = MainView()
- self.view.setSearchView(self.searchModel.view)
- self.view.setTaskView(self.taskModel.view)
- self.view.setSettingsView(self.settingsModel.view)
- self.view.setAboutView(self.aboutModel.view)
-
- self.view.showPage()
-
- def show(self):
- self.view.hide()
- self.loginModel.loginByConfig()
- self.loginModel.show()
-
- def __loginSuccess__(self):
- self.loginModel.hide()
- self.view.show()
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/searchModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/searchModel.py
deleted file mode 100644
index b6e7d30..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/searchModel.py
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : searchModel.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-import _thread
-import threading
-
-import aigpy.stringHelper
-import tidal_dl
-from PyQt5.QtCore import pyqtSignal
-from aigpy.modelHelper import ModelBase
-from tidal_dl import Type
-from tidal_dl.model import Album, SearchResult
-
-from tidal_gui.tidalImp import tidalImp
-from tidal_gui.view.searchView import SearchView
-from tidal_gui.viewModel.viewModel import ViewModel
-
-
-class SearchModel(ViewModel):
- SIGNAL_ADD_TASKITEM = pyqtSignal(ModelBase)
-
- def __init__(self):
- super(SearchModel, self).__init__()
- self._lock = threading.Lock()
- self._resultData = SearchResult()
- self.view = SearchView()
- self.view.setPageIndex(1)
- self.view.connectButton('search', self.__search__)
- self.view.connectButton('prePage', self.__searchPrePage__)
- self.view.connectButton('nextPage', self.__searchNextPage__)
- self.view.connectButton('download', self.__download__)
- self.view.connectTab(self.__search__)
-
- def __startThread__(self):
- def __thread_search__(model: SearchModel):
- typeIndex = model.view.getSelectedTabIndex()
- pageIndex = model.view.getPageIndex()
- searchText = model.view.getSearchText()
-
- limit = 20
- offset = (pageIndex - 1) * limit
- stype = tidal_dl.Type(typeIndex)
- msg, model._resultData = tidalImp.search(searchText, stype, offset, limit)
-
- if not aigpy.stringHelper.isNull(msg):
- # errmessage
- model._lock.release()
- return
-
- model.view.setTableItems(stype, offset, model._resultData)
- model._lock.release()
-
- _thread.start_new_thread(__thread_search__, (self,))
-
- def __search__(self):
- if not self._lock.acquire(False):
- return
- self.view.setPageIndex(1)
- self.__startThread__()
-
- def __searchNextPage__(self):
- if not self._lock.acquire(False):
- return
- self.view.setPageIndex(self.view.getPageIndex() + 1)
- self.__startThread__()
-
- def __searchPrePage__(self):
- if not self._lock.acquire(False):
- return
- index = self.view.getPageIndex() - 1
- if index < 1:
- index = 1
- self.view.setPageIndex(index)
- self.__startThread__()
-
- def __download__(self):
- typeIndex = self.view.getSelectedTabIndex()
- stype = tidal_dl.Type(typeIndex)
- index = self.view.getSelectedTableIndex(stype)
- if index <= 0:
- pass
-
- data = None
- if stype == Type.Album:
- data = self._resultData.albums.items[index]
- elif stype == Type.Track:
- data = self._resultData.tracks.items[index]
- elif stype == Type.Video:
- data = self._resultData.videos.items[index]
- elif stype == Type.Playlist:
- data = self._resultData.playlists.items[index]
-
- if data is not None:
- self.SIGNAL_ADD_TASKITEM.emit(data)
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/settingsModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/settingsModel.py
deleted file mode 100644
index 242d0a0..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/settingsModel.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : settingsModel.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from tidal_gui.view.settingsView import SettingsView
-from tidal_gui.viewModel.viewModel import ViewModel
-
-
-class SettingsModel(ViewModel):
- def __init__(self):
- super(SettingsModel, self).__init__()
- self.view = SettingsView()
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/taskItemModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/taskItemModel.py
deleted file mode 100644
index 9f2792e..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/taskItemModel.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : taskItemModel.py
-@Date : 2021/9/14
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-import _thread
-
-import aigpy.stringHelper
-from tidal_dl import Type
-from tidal_dl.model import Album, Track, Video, Playlist
-
-from tidal_gui.tidalImp import tidalImp
-from tidal_gui.view.taskItemView import TaskItemView
-from tidal_gui.viewModel.viewModel import ViewModel
-
-
-class TaskItemModel(ViewModel):
- def __init__(self, data):
- super(TaskItemModel, self).__init__()
- self.view = TaskItemView()
- if isinstance(data, Album):
- self.__initAlbum__(data)
- elif isinstance(data, Track):
- self.__initTrack__(data)
- elif isinstance(data, Video):
- self.__initVideo__(data)
- elif isinstance(data, Playlist):
- self.__initPlaylist__(data)
-
- def __initAlbum__(self, data: Album):
- title = data.title
- desc = f"by {data.artist.name} " \
- f"{tidalImp.getDurationString(data.duration)} " \
- f"Track-{data.numberOfTracks} " \
- f"Video-{data.numberOfVideos}"
- self.view.setLabel(title, desc)
-
- def __thread_func__(model: TaskItemModel, album: Album):
- cover = tidalImp.getCoverData(album.cover, '1280', '1280')
- self.view.setPic(cover)
-
- msg, tracks, videos = tidalImp.getItems(album.id, Type.Album)
- if not aigpy.stringHelper.isNull(msg):
- model.view.setErrmsg(msg)
- return
- # TODO
- for item in tracks:
- pass
- for item in videos:
- pass
-
- _thread.start_new_thread(__thread_func__, (self, data))
-
- def __initTrack__(self, data: Track):
- pass
-
- def __initVideo__(self, data: Video):
- pass
-
- def __initPlaylist__(self, data: Playlist):
- pass
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/taskModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/taskModel.py
deleted file mode 100644
index 5b80f56..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/taskModel.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : taskModel.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from tidal_dl import Type
-
-from tidal_gui.view.taskView import TaskView
-from tidal_gui.viewModel.taskItemModel import TaskItemModel
-from tidal_gui.viewModel.viewModel import ViewModel
-
-
-class TaskModel(ViewModel):
- def __init__(self):
- super(TaskModel, self).__init__()
- self.view = TaskView()
-
- def addTaskItem(self, data):
- item = TaskItemModel(data)
-
diff --git a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/viewModel.py b/TIDALDL-GUI-CROSS/tidal_gui/viewModel/viewModel.py
deleted file mode 100644
index 4e3ebc2..0000000
--- a/TIDALDL-GUI-CROSS/tidal_gui/viewModel/viewModel.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-# -*- encoding: utf-8 -*-
-"""
-@File : viewModel.py
-@Date : 2021/8/17
-@Author : Yaronzz
-@Version : 1.0
-@Contact : yaronhuang@foxmail.com
-@Desc :
-"""
-from PyQt5.QtCore import QObject
-
-
-class ViewModel(QObject):
- def __init__(self):
- super(ViewModel, self).__init__()
- self.view = None
-
- def show(self):
- self.view.show()
-
- def hide(self):
- self.view.hide()
diff --git a/TIDALDL-GUI-CROSS/upload.sh b/TIDALDL-GUI-CROSS/upload.sh
deleted file mode 100644
index 7ed7276..0000000
--- a/TIDALDL-GUI-CROSS/upload.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-cd TIDALDL-PY
-rm -rf dist
-rm -rf build
-rm -rf exe
-rm -rf tidal_gui.egg-info
-mkdir exe
-
-# pack
-python setup.py sdist bdist_wheel
-# creat exe file
-pyinstaller -F tidal_gui/__init__.py
-# rename exe name
-mv dist/__init__.exe exe/tidal-gui.exe
-
-pip uninstall -y tidal-gui
-
-# creat requirements.txt
-# pipreqs ./ --force --encoding=utf8
-
-# python setup.py install
-
-# upload
-twine upload dist/*
-
-
-
-
-
-
-
-# powershell·
-cd TIDALDL-PY
-Remove-Item dist -recurse -Force
-Remove-Item build -recurse -Force
-Remove-Item exe -recurse -Force
-Remove-Item tidal_dl.egg-info -recurse -Force
-md exe
-
-# pack
-python setup.py sdist bdist_wheel
-# creat exe file
-pyinstaller -F tidal_dl/__init__.py
-#pyinstaller -F -i ../logo.ico tidal_dl/__init__.py
-# rename exe name
-cp dist/__init__.exe exe/tidal-dl.exe
-rm dist/__init__.exe
-
-pip uninstall -y tidal-dl
-
-# creat requirements.txt
-# pipreqs ./ --force
-
-# python setup.py install
-
-# upload
-twine upload dist/*
diff --git a/TIDALDL-PY/exe/tidal-dl.exe b/TIDALDL-PY/exe/tidal-dl.exe
index 2f703c1..e1ba0a8 100644
Binary files a/TIDALDL-PY/exe/tidal-dl.exe and b/TIDALDL-PY/exe/tidal-dl.exe differ
diff --git a/TIDALDL-PY/tidal_dl/printf.py b/TIDALDL-PY/tidal_dl/printf.py
index a0aedfe..636c5fc 100644
--- a/TIDALDL-PY/tidal_dl/printf.py
+++ b/TIDALDL-PY/tidal_dl/printf.py
@@ -30,7 +30,7 @@ __LOGO__ = '''
https://github.com/yaronzz/Tidal-Media-Downloader
'''
-VERSION = '2021.12.10.1'
+VERSION = '2021.01.11.1'
class Printf(object):
diff --git a/TIDALDL-PY/tidal_gui/control/framelessWidget.py b/TIDALDL-PY/tidal_gui/control/framelessWidget.py
index d97cea6..5ede2a5 100644
--- a/TIDALDL-PY/tidal_gui/control/framelessWidget.py
+++ b/TIDALDL-PY/tidal_gui/control/framelessWidget.py
@@ -86,36 +86,36 @@ class FramelessWidget(QWidget):
def nativeEvent(self, eventType, message):
retVal, result = super(FramelessWidget, self).nativeEvent(eventType, message)
- if eventType == "windows_generic_MSG":
- msg = ctypes.wintypes.MSG.from_address(message.__int__())
- if msg.message != win32con.WM_NCHITTEST:
- return retVal, result
+ # if eventType == "windows_generic_MSG":
+ # msg = ctypes.wintypes.MSG.from_address(message.__int__())
+ # if msg.message != win32con.WM_NCHITTEST:
+ # return retVal, result
- # 获取鼠标移动经过时的坐标
- x = win32api.LOWORD(msg.lParam) - self.frameGeometry().x()
- y = win32api.HIWORD(msg.lParam) - self.frameGeometry().y()
+ # # 获取鼠标移动经过时的坐标
+ # x = win32api.LOWORD(msg.lParam) - self.frameGeometry().x()
+ # y = win32api.HIWORD(msg.lParam) - self.frameGeometry().y()
- w, h = self.width(), self.height()
- lx = x < self.BorderWidth
- rx = x > w - self.BorderWidth
- ty = y < self.BorderWidth
- by = y > h - self.BorderWidth
- if (lx and ty):# 左上角
- return True, win32con.HTTOPLEFT
- elif (rx and by):# 右下角
- return True, win32con.HTBOTTOMRIGHT
- elif (rx and ty):# 右上角
- return True, win32con.HTTOPRIGHT
- elif (lx and by):# 左下角
- return True, win32con.HTBOTTOMLEFT
- elif ty:# 上
- return True, win32con.HTTOP
- elif by:# 下
- return True, win32con.HTBOTTOM
- elif lx:# 左
- return True, win32con.HTLEFT
- elif rx:# 右
- return True, win32con.HTRIGHT
+ # w, h = self.width(), self.height()
+ # lx = x < self.BorderWidth
+ # rx = x > w - self.BorderWidth
+ # ty = y < self.BorderWidth
+ # by = y > h - self.BorderWidth
+ # if (lx and ty):# 左上角
+ # return True, win32con.HTTOPLEFT
+ # elif (rx and by):# 右下角
+ # return True, win32con.HTBOTTOMRIGHT
+ # elif (rx and ty):# 右上角
+ # return True, win32con.HTTOPRIGHT
+ # elif (lx and by):# 左下角
+ # return True, win32con.HTBOTTOMLEFT
+ # elif ty:# 上
+ # return True, win32con.HTTOP
+ # elif by:# 下
+ # return True, win32con.HTBOTTOM
+ # elif lx:# 左
+ # return True, win32con.HTLEFT
+ # elif rx:# 右
+ # return True, win32con.HTRIGHT
return retVal, result
def mousePressEvent(self, e: QMouseEvent):
diff --git a/TIDALDL-PY/tidal_gui/control/scrollWidget.py b/TIDALDL-PY/tidal_gui/control/scrollWidget.py
index c135522..fff07a7 100644
--- a/TIDALDL-PY/tidal_gui/control/scrollWidget.py
+++ b/TIDALDL-PY/tidal_gui/control/scrollWidget.py
@@ -11,18 +11,21 @@
from PyQt5.QtCore import QSize, Qt
from PyQt5.QtGui import QIcon
-from PyQt5.QtWidgets import QListWidget, QListWidgetItem, QWidget, QScrollArea, QVBoxLayout, QPushButton
+from PyQt5.QtWidgets import QListWidget, QListWidgetItem, QWidget, QScrollArea, QVBoxLayout, QPushButton, QBoxLayout
class ScrollWidget(QScrollArea):
def __init__(self):
super(ScrollWidget, self).__init__()
+
+ self._layout = QVBoxLayout()
+ self._layout.addStretch(1)
+
+ self._mainW = QWidget()
+ self._mainW.setLayout(self._layout)
+
+ self.setWidget(self._mainW)
self.setWidgetResizable(True)
- self._widget = QWidget()
- self._layout = QVBoxLayout(self._widget)
- self.setWidget(self._widget)
-
def addWidgetItem(self, widget: QWidget):
- self._layout.addWidget(widget, 0, Qt.AlignTop)
- pass
+ self._layout.insertWidget(0, widget)
diff --git a/TIDALDL-PY/tidal_gui/view/taskItemView.py b/TIDALDL-PY/tidal_gui/view/taskItemView.py
index 96cba3b..91b8ef6 100644
--- a/TIDALDL-PY/tidal_gui/view/taskItemView.py
+++ b/TIDALDL-PY/tidal_gui/view/taskItemView.py
@@ -62,7 +62,7 @@ class TaskItemView(QWidget):
def __initList__(self):
self._list = ListWidget(ListWidgetStyle.DownloadItems)
- self._list.setResizeMode(QListView.Adjust)
+ self._list.setMinimumHeight(200)
return self._list
def setLabel(self, title, desc):
@@ -82,9 +82,9 @@ class TaskItemView(QWidget):
def __expandClick__(self):
if self._list.isHidden():
- self._list.show()
+ self._list.setVisible(True)
else:
- self._list.hide()
+ self._list.setVisible(False)
def connectButton(self, name: str, func):
if name == 'retry':
diff --git a/TIDALDL-PY/tidal_gui/viewModel/downloadItemModel.py b/TIDALDL-PY/tidal_gui/viewModel/downloadItemModel.py
index 7688aab..48b3c0b 100644
--- a/TIDALDL-PY/tidal_gui/viewModel/downloadItemModel.py
+++ b/TIDALDL-PY/tidal_gui/viewModel/downloadItemModel.py
@@ -10,6 +10,7 @@
"""
import _thread
+import os
import time
from enum import Enum
import aigpy.stringHelper
@@ -73,12 +74,12 @@ class DownloadItemModel(ViewModel):
def download(self):
self.__setStatus__(DownloadStatus.Running)
- # if self.isTrack:
- # if not self.__dlTrack__(index):
- # return
- # else:
- # if not self.__dlVideo__(index):
- # return
+ if self.isTrack:
+ if not self.__dlTrack__():
+ return
+ else:
+ if not self.__dlVideo__():
+ return
self.view.setProgress(100)
self.__setStatus__(DownloadStatus.Finish)
@@ -93,12 +94,12 @@ class DownloadItemModel(ViewModel):
self.__setStatus__(DownloadStatus.Error)
return False
- tidalImp.getBasePath(model)
+ tidalImp.getBasePath(track)
path = tidalImp.getTackPath(self.basePath, track, stream)
- # check exist
- if conf.checkExist and __isNeedDownload__(path, stream.url) == False:
- return True
+ # # check exist
+ # if conf.checkExist and tidalImp.__isNeedDownload__(path, stream.url) == False:
+ # return True
tool = aigpy.download.DownloadTool(path + '.part', [stream.url])
check, err = tool.start(conf.showProgress)
diff --git a/TIDALDL-PY/tidal_gui/viewModel/taskItemModel.py b/TIDALDL-PY/tidal_gui/viewModel/taskItemModel.py
index a70e3d4..a383929 100644
--- a/TIDALDL-PY/tidal_gui/viewModel/taskItemModel.py
+++ b/TIDALDL-PY/tidal_gui/viewModel/taskItemModel.py
@@ -29,9 +29,7 @@ class TaskItemModel(ViewModel):
self.view = TaskItemView()
self.data = data
self.downloadModelList = []
- self.path = tidalImp.getBasePath(data)
-
- aigpy.path.mkdirs(self.path)
+ self.path = ''
if isinstance(data, Album):
self.__initAlbum__(data)
@@ -71,10 +69,14 @@ class TaskItemModel(ViewModel):
item.stopDownload()
def __btnFuncOpen__(self):
+ if self.path == '':
+ return
if os.path.exists(self.path):
os.startfile(self.path)
def __initAlbum__(self, data: Album):
+ self.path = tidalImp.getBasePath(data)
+
title = data.title
desc = f"by {tidalImp.getArtistsNames(data.artists)} " \
f"{tidalImp.getDurationString(data.duration)} " \
diff --git a/TIDALDL-PY/updatelog.md b/TIDALDL-PY/updatelog.md
index e4f4661..1c5cdbb 100644
--- a/TIDALDL-PY/updatelog.md
+++ b/TIDALDL-PY/updatelog.md
@@ -1,6 +1,7 @@
TYPE tidal-dl
USE pip3 install tidal-dl --upgrade
+#### v2021-01-11
- [X] Settings: add type-folder(eg Album/Video/Playlist)
- [x] Album folder format support: {None}