Update v1.7

This commit is contained in:
afkarxyz
2025-02-19 09:41:58 +07:00
committed by GitHub
parent 2acd6fcba1
commit 03cc3d82a7
+3 -2
View File
@@ -4,6 +4,7 @@ import os
import time import time
import requests import requests
from pathlib import Path from pathlib import Path
from packaging import version
from PyQt6.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout, from PyQt6.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout,
QHBoxLayout, QLabel, QLineEdit, QPushButton, QHBoxLayout, QLabel, QLineEdit, QPushButton,
QProgressBar, QFileDialog, QCheckBox, QRadioButton, QProgressBar, QFileDialog, QCheckBox, QRadioButton,
@@ -217,7 +218,7 @@ class UpdateDialog(QDialog):
class SpotiFlacGUI(QMainWindow): class SpotiFlacGUI(QMainWindow):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.current_version = "1.6" self.current_version = "1.7"
self.settings = QSettings('SpotiFlac', 'Settings') self.settings = QSettings('SpotiFlac', 'Settings')
self.setWindowTitle("SpotiFLAC") self.setWindowTitle("SpotiFLAC")
self.check_for_updates = self.settings.value('check_for_updates', True, type=bool) self.check_for_updates = self.settings.value('check_for_updates', True, type=bool)
@@ -253,7 +254,7 @@ class SpotiFlacGUI(QMainWindow):
data = response.json() data = response.json()
new_version = data.get("version") new_version = data.get("version")
if new_version and new_version != self.current_version: if new_version and version.parse(new_version) > version.parse(self.current_version):
dialog = UpdateDialog(self.current_version, new_version, self) dialog = UpdateDialog(self.current_version, new_version, self)
result = dialog.exec() result = dialog.exec()