diff --git a/components/MusicTable.py b/components/MusicTable.py index 91b73b6..919bab5 100644 --- a/components/MusicTable.py +++ b/components/MusicTable.py @@ -689,8 +689,13 @@ class MusicTable(QTableView): return # Populate the model row_count: int = 0 + # TODO: total time of playlist + # but how do i want to do this if user doesn't choose to see length field? + # spawn new thread and calculate myself? total_time: int = 0 # total time of all songs in seconds for row_data in data: + print(row_data) + # if "length" in fields: row_count += 1 id, *rest_of_data = row_data # handle different datatypes diff --git a/main.py b/main.py index 54719e8..5e0dd93 100644 --- a/main.py +++ b/main.py @@ -23,11 +23,13 @@ from PyQt5.QtWidgets import ( QGraphicsScene, QGraphicsPixmapItem, QMessageBox, + QPushButton, QStatusBar, QStyle, ) from PyQt5.QtCore import ( QSize, + QThread, QUrl, QTimer, Qt, @@ -140,29 +142,22 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): def __init__(self, clipboard): super(ApplicationWindow, self).__init__() - - # clipboard good self.clipboard = clipboard - - # Config self.config: ConfigParser = ConfigParser() self.cfg_file = ( Path(user_config_dir(appname="musicpom", appauthor="billypom")) / "config.ini" ) self.config.read(self.cfg_file) - - # Multithreading stuff... - self.threadpool = QThreadPool() + self.threadpool: QThreadPool = QThreadPool() # UI self.setupUi(self) self.setWindowTitle("musicpom") - self.setup_fonts() # self.vLayoutAlbumArt.SetFixedSize() - self.status_bar = QStatusBar() - self.permanent_status_label = QLabel("") + self.status_bar: QStatusBar = QStatusBar() + self.permanent_status_label: QLabel = QLabel("") self.status_bar.addPermanentWidget(self.permanent_status_label) self.setStatusBar(self.status_bar) @@ -195,6 +190,7 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): self.previousButton.setIcon(icon) pixmapi = QStyle.StandardPixmap.SP_MediaPlay icon = style.standardIcon(pixmapi) + self.playButton: QPushButton self.playButton.setIcon(icon) # sharing functions with other classes and that