1
0
Fork 0
mirror of synced 2024-06-26 10:11:19 +12:00

Updated version

This commit is contained in:
Dummerle 2021-03-18 16:00:43 +01:00
parent 1e0854c26c
commit 0e4ae573e9
5 changed files with 12 additions and 9 deletions

View file

@ -59,7 +59,7 @@ class SyncSaves(QScrollArea):
if len(saves) == 0:
# QMessageBox.information(self.tr("No Games Found"), self.tr("Your games don't support cloud save"))
self.widget = QLabel("No Games found, supporting cloud saves")
self.title.setText(f"<h1>" + self.tr("Cloud Saves") + "</h1>\n" + self.tr("Your games does not support Cloud Saves"))
self.setWidget(self.widget)
return
@ -94,6 +94,7 @@ class SyncSaves(QScrollArea):
self.update()
def sync_all(self):
logger.info("Sync all Games")
for w in self.widgets:
if not w.igame.save_path:
save_path = self.core.get_save_path(w.igame.app_name)
@ -108,6 +109,8 @@ class SyncSaves(QScrollArea):
if w.res == SaveGameStatus.SAME_AGE:
continue
if w.res == SaveGameStatus.REMOTE_NEWER:
logger.info("Download")
w.download()
elif w.res == SaveGameStatus.LOCAL_NEWER:
logger.info("Upload")
w.upload()

View file

@ -175,9 +175,9 @@ class SyncWidget(QWidget):
self.download_button.setDisabled(True)
self.logger.info("Downloading Saves for game " + self.igame.title)
self.info_text.setText(self.tr("Downloading..."))
thr = _DownloadThread(self.igame.app_name, self.save, self.igame.save_path, self.core)
thr.finished.connect(self.downloaded)
thr.start()
self.thr = _DownloadThread(self.igame.app_name, self.save, self.igame.save_path, self.core)
self.thr.finished.connect(self.downloaded)
self.thr.start()
def downloaded(self):
self.info_text.setText(self.tr("Download finished"))

View file

@ -288,8 +288,10 @@ class DownloadTab(QWidget):
notification.message = self.tr("Download of game ") + self.active_game.app_title
notification.send()
# QMessageBox.information(self, "Info", "Download finished")
self.update_widgets[self.active_game.app_name].setVisible(False)
self.update_widgets.pop(self.active_game.app_name)
logger.info("Download finished: "+ self.active_game.app_title)
if self.active_game.app_name in self.update_widgets.keys():
self.update_widgets[self.active_game.app_name].setVisible(False)
self.update_widgets.pop(self.active_game.app_name)
for i in self.update_widgets.values():
i.update_button.setDisabled(False)

View file

@ -54,8 +54,6 @@ class Games(QWidget):
self.head_bar.installed_only.stateChanged.connect(lambda:
self.game_list.installed_only(
self.head_bar.installed_only.isChecked()))
self.head_bar.refresh_list.clicked.connect(
lambda: self.game_list.update_list(not self.head_bar.view.isChecked()))
self.layout.addWidget(self.head_bar)
self.layout.addWidget(self.game_list)
# self.layout.addStretch(1)

View file

@ -1,5 +1,5 @@
import os
__version__ = "0.9.5"
__version__ = "0.9.5.1"
style_path = os.path.join(os.path.dirname(__file__), "Styles/")
lang_path = os.path.join(os.path.dirname(__file__), "languages/")