diff --git a/rare/components/tabs/__init__.py b/rare/components/tabs/__init__.py index 5dad6791..ad4f925e 100644 --- a/rare/components/tabs/__init__.py +++ b/rare/components/tabs/__init__.py @@ -86,25 +86,9 @@ class TabWidget(QTabWidget): if tab_num == 0: self.games_tab.layout().setCurrentIndex(0) - if not shared.args.offline and tab_num == 3: + if not shared.args.offline and tab_num == 2: self.store.load() - def game_imported(self, app_name: str): - igame = self.core.get_installed_game(app_name) - if self.core.get_asset(app_name, False).build_version != igame.version: - self.downloadTab.add_update(igame) - downloads = len(self.downloadTab.dl_queue) + len(self.downloadTab.update_widgets.keys()) - self.setTabText(1, "Downloads" + ((" (" + str(downloads) + ")") if downloads != 0 else "")) - self.games_tab.update_list(app_name) - self.games_tab.setCurrentIndex(0) - def resizeEvent(self, event): self.tabBar().setMinimumWidth(self.width()) super(TabWidget, self).resizeEvent(event) - - # Remove text "sync game" - def finished_sync(self, app_name): - if self.core.is_installed(app_name): - self.games_tab.widgets[app_name][0].info_text = "" - self.games_tab.widgets[app_name][0].info_label.setText("") - self.games_tab.widgets[app_name][1].info_label.setText("") diff --git a/rare/components/tabs/games/game_utils.py b/rare/components/tabs/games/game_utils.py index 22e0b57d..04aae006 100644 --- a/rare/components/tabs/games/game_utils.py +++ b/rare/components/tabs/games/game_utils.py @@ -95,7 +95,7 @@ class GameUtils(QObject): igame = self.core.get_installed_game(app_name) if QSettings().value("confirm_start", False, bool): - if not QMessageBox.question(None, "Launch", self.tr("Do you want to launch {}").format(self.game.app_title), + if not QMessageBox.question(None, "Launch", self.tr("Do you want to launch {}").format(game.app_title), QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: logger.info("Cancel Startup") logger.info("Launching " + game.app_title) diff --git a/rare/components/tabs/settings/legendary.py b/rare/components/tabs/settings/legendary.py index 75b77bf3..a9da54bc 100644 --- a/rare/components/tabs/settings/legendary.py +++ b/rare/components/tabs/settings/legendary.py @@ -83,7 +83,7 @@ class LegendarySettings(QWidget, Ui_LegendarySettings): if not text and "install_dir" in self.core.lgd.config["Legendary"].keys(): self.core.lgd.config["Legendary"].pop("install_dir") else: - logger.info("Set config install_dir to " + text) + logger.debug("Set config install_dir to " + text) self.core.lgd.save_config() def max_worker_save(self, workers: str): diff --git a/rare/components/tabs/settings/linux.py b/rare/components/tabs/settings/linux.py index a6cb8480..4c87052f 100644 --- a/rare/components/tabs/settings/linux.py +++ b/rare/components/tabs/settings/linux.py @@ -43,7 +43,7 @@ class LinuxSettings(QWidget, Ui_LinuxSettings): if not text: self.core.lgd.config.remove_option(self.name, setting_name) else: - logger.info("Set config of wine_prefix to " + text) + logger.debug("Set config of wine_prefix to " + text) if self.core.lgd.config[self.name] == {}: self.core.lgd.config.remove_section(self.name) self.core.lgd.save_config() diff --git a/rare/components/tabs/shop/shop_api_core.py b/rare/components/tabs/shop/shop_api_core.py index 834db6e5..e0e481bc 100644 --- a/rare/components/tabs/shop/shop_api_core.py +++ b/rare/components/tabs/shop/shop_api_core.py @@ -27,7 +27,7 @@ class ShopApiCore(QObject): self.next_browse_request = tuple(()) def get_free_games(self, handle_func: callable): - url = "https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions" + url = f"https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale={self.language_code}&country={self.country_code}&allowCountries={self.country_code}" self.manager.get(url, lambda data: self._handle_free_games(data, handle_func)) diff --git a/rare/languages/placeholder.ts b/rare/languages/placeholder.ts index 0a2a4177..5d1e9969 100644 --- a/rare/languages/placeholder.ts +++ b/rare/languages/placeholder.ts @@ -76,63 +76,88 @@ BaseInstalledWidget - + Launch - + Remove Desktop link - + Create Desktop link - + Remove start menu link - + Create start menu link - + Reload Image - + Uninstall - + Remove Start menu link - + Create Start menu link - - Do you want to launch {} + + Please verify game before playing - - Game cannot run offline. Please start game in Online mode + + Start game without version check - - Origin is not installed. Do you want to download installer file? + + Launch Game + + + + + Launch/Link + + + + + Game running + + + + + Syncing cloud saves + + + + + Update available + + + + + Sync with cloud @@ -177,29 +202,73 @@ - - ConsoleWindow - - - Save output to file - - - - - Saved - - - - - Constants - - - Action - - - - - Adventure + + CloudSaveDialog + + + (newer) + + + + + CloudSaveUtils + + + Could not compute cloud save path. Please set it in Game settings manually. + Do you want to launch {} anyway? + + + + + + No savepath found. Please set it in Game Settings manually + + + + + No savepath set. Skip syncing with cloud + + + + + There are no saves local and online. Maybe you have to change save path of {} + + + + + Syncing with cloud failed: + + + + + + ConsoleWindow + + + Save output to file + + + + + Saved + + + + + Clear + + + + + Constants + + + Action + + + + + Adventure @@ -470,44 +539,6 @@ - - DxvkWidget - - - GPU usage - - - - - Used Memory - - - - - Device info - - - - - DXVK version - - - - - D3D Level of application - - - - - Frame time graph - - - - - dxvk settings - - - EGLSyncGroup @@ -632,7 +663,7 @@ - + Base Game is not installed. Please install {} first @@ -660,7 +691,7 @@ - + Install DLC @@ -670,27 +701,27 @@ - + Installed - + Not installed - + Installing - + Uninstall DLC - + Uninstalling @@ -758,40 +789,45 @@ - + Link to Origin/Launch - + Repair file does not exist or game does not need a repair. Please verify game first - + Verification failed, {} file(s) corrupted, {} file(s) are missing. Do you want to repair them? - + Loading + + + Installation path of {} does not exist. Cannot verify + + GameInfoTabs - + Information - + Settings - + Downloadable Content @@ -842,144 +878,221 @@ GameSettings - + GameSettings - + Launch Settings - + Skip update check - + Default - + Yes - + No - + Offline mode - + Sync with cloud - + Launch parameters - + parameters - + Save - + Wrapper - + e.g. optirun - + Linux Settings - + Proton - + Don't use Proton - + Prefix - + Please select path for proton prefix - - - GameWidget - - Free + + Cloud Saves + + + + + Cloud save path + + + + + Auto compute save path + + + + + Save path + + + + + Loading + + + + + Error while launching {}. No permission to create {} - GamesTab + GameUtils - - Installed Games: {} Available Games: {} + + Game files of {} do not exist. Remove it from installed games? - - Launch + + Do you want to launch {} - - Sync CLoud saves + + Game not found in available games - - Game running + + Game is a DLC. Please launch base game instead + + + + + Game files of {} do not exist. Please install game + + + + + Metadata doesn't exist + + + + + Please update game + + + + + Error while launching {}. No permission to create {} for {} + Launch anyway? + + + + + + No wine executable selected. Please set it in settings + + + + + Origin is not installed. Do you want to download installer file? + + + + + Game exited with code {}, which is not a normal code. It could be caused by a crash. Do you want to sync + cloud saves + - - IconWidgetUninstalled - - - Game Info - - - - - Installation running - - - - - ImportGroup - - + + GameWidget + + + Free + + + + + GamesTab + + + Installed Games: {} Available Games: {} + + + + + IconWidgetUninstalled + + + Game Info + + + + + Installation running + + + + + ImportGroup + + ImportGroup @@ -1090,27 +1203,27 @@ ImportSyncTabs - + Import Game - + To import games from Epic Games Store, please enable EGL Sync. - + Import Games - + Sync with EGL - + To import EGL games from directories, please use Import Game. @@ -1231,55 +1344,25 @@ InstalledIconWidget - - Update available - - - - - Game needs verification - - - - - Game running - - - - - Please verify game before playing - - - - - Start game without version check - - - - - Start Game - - - - - Launch/Link + + Information InstalledListWidget - + Launch - + Link/Play - + Developer: @@ -1307,7 +1390,7 @@ - + Starting... @@ -1472,7 +1555,7 @@ MainWindow - + There is a download active. Do you really want to exit app? @@ -1480,22 +1563,22 @@ MiniWidget - + Logged in as - + Account settings - + Logout - + Do you really want to logout @@ -1513,7 +1596,7 @@ - + Choose path @@ -1900,161 +1983,58 @@ SideTabWidget - + Back - SyncSaves + SyncSaveDialog - - Cloud Saves + + Sync saves with cloud - - Found Saves for folowing Games + + Select save, you want to use for - - Your games does not support Cloud Saves + + Local - - Sync all games + + Upload - - You finished playing game, but Remote game is newer. Do you want to download anyway? This could remove your game progress. Please check your save path or make a backup + + Cloud - - Found no savepath + + Download - - No save path was found. Please select path or skip - - - - - SyncWidget - - - Please edit save path of game {} manually in Cload saves tab - - - - - Local Save date: - - - - - No Local Save files - - - - - Cloud save date: - - - - - No Cloud saves - - - - - Game is up to date - - - - - Upload anyway - - - - - Download anyway - - - - - Cloud save is newer - - - - - Download Cloud saves - - - - - Upload Saves - - - - - Local save is newer - - - - - Upload saves - - - - - Download saves - - - - - Change path - - - - - Uploading... - - - - - Upload finished - - - - - Upload failed - - - - - Downloading... - - - - - Download finished + + Cancel TabWidget - + Games - + Store (Beta) @@ -2132,12 +2112,12 @@ VerifyWorker - + Path does not exist - + No files to validate @@ -2284,24 +2264,6 @@ - - dlg - - - Yes - - - - - No - - - - - Cancel - - - shop_info diff --git a/rare/utils/qt_requests.py b/rare/utils/qt_requests.py index 10d3560b..4c3d64f7 100644 --- a/rare/utils/qt_requests.py +++ b/rare/utils/qt_requests.py @@ -48,7 +48,6 @@ class QtRequestManager(QObject): self.request_active = RequestQueueItem(handle_func=handle_func) self.request = self.manager.get(request) - self.request.finished.connect(self.prepare_data) else: self.request_queue.append(RequestQueueItem(method="get", url=url, handle_func=handle_func)) @@ -64,7 +63,6 @@ class QtRequestManager(QObject): json_data = QJsonDocument.fromJson(self.request.readAll().data(), error) if QJsonParseError.NoError == error.error: data = json.loads(json_data.toJson().data().decode()) - else: logger.error(error.errorString()) else: