diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8bcee663..dfc5f405 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,9 +8,11 @@ assignees: '' --- **Describe the bug** + A clear and concise description of what the bug is. **To Reproduce** + Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' @@ -18,19 +20,27 @@ Steps to reproduce the behavior: 4. See error **Expected behavior** + A clear and concise description of what you expected to happen. **Screenshots** + If applicable, add screenshots to help explain your problem. -**Desktop (please complete the following information):** - - OS: [e.g. Manjaro/Windows 10] - - Version [e.g. 1.6.2] -- Installation [e.g. pip/msi/AppImage] -- Python version +**System information** + +Please complete the following information +- Operating system: [e.g. Manjaro/Windows 10] +- Version [e.g. 1.6.2] +- Installation method [e.g. pip/msi/AppImage] +- Python version (if installed through `pip` or your package manager) **Additional context** + Add any other context about the problem here. **Error message** -You can find error message in ~/.cache/rare/logs/ + +You can find logs in these locations +- Windows: `C:\Users\\AppData\Local\Rare\Rare\cache\logs` +- Linux: `~/.cache/Rare/Rare/logs` \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c4762529..fec3c8c7 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,13 +8,17 @@ assignees: '' --- **Is your feature request related to a problem? Please describe.** + A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** + A clear and concise description of what you want to happen. **Describe alternatives you've considered** + A clear and concise description of any alternative solutions or features you've considered. **Additional context** + Add any other context or screenshots about the feature request here. diff --git a/rare/components/tabs/games/integrations/import_group.py b/rare/components/tabs/games/integrations/import_group.py index 1a411aaf..e623862c 100644 --- a/rare/components/tabs/games/integrations/import_group.py +++ b/rare/components/tabs/games/integrations/import_group.py @@ -69,7 +69,14 @@ class ImportWorker(QRunnable): progress = pyqtSignal(ImportedGame, int) result = pyqtSignal(list) - def __init__(self, core: LegendaryCore, path: str, app_name: str = None, import_folder: bool = False, import_dlcs: bool = False): + def __init__( + self, + core: LegendaryCore, path: str, + app_name: str = None, + import_folder: bool = False, + import_dlcs: bool = False, + import_force: bool = False + ): super(ImportWorker, self).__init__() self.signals = ImportWorker.Signals() self.core = core @@ -78,6 +85,7 @@ class ImportWorker(QRunnable): self.app_name = app_name self.import_folder = import_folder self.import_dlcs = import_dlcs + self.import_force = import_force def run(self) -> None: result_list: List = [] @@ -116,6 +124,9 @@ class ImportWorker(QRunnable): args = LgndrImportGameArgs( app_path=str(path), app_name=app_name, + disable_check=self.import_force, + skip_dlcs=not self.import_dlcs, + with_dlcs=self.import_dlcs, indirect_status=status, get_boolean_choice=lambda prompt, default=True: self.import_dlcs ) @@ -237,6 +248,7 @@ class ImportGroup(QGroupBox): def path_changed(self, path: str): self.info_label.setText("") self.ui.import_folder_check.setCheckState(Qt.Unchecked) + self.ui.import_force_check.setCheckState(Qt.Unchecked) if self.path_edit.is_valid: self.app_name_edit.setText(find_app_name(path, self.core)) else: @@ -254,6 +266,7 @@ class ImportGroup(QGroupBox): def app_name_changed(self, app_name: str): self.info_label.setText("") self.ui.import_dlcs_check.setCheckState(Qt.Unchecked) + self.ui.import_force_check.setCheckState(Qt.Unchecked) if self.app_name_edit.is_valid: self.ui.import_dlcs_check.setEnabled( bool(self.core.get_dlc_for_game(app_name)) @@ -267,6 +280,7 @@ class ImportGroup(QGroupBox): def import_folder_changed(self, state: Qt.CheckState): self.app_name_edit.setEnabled(not state) self.ui.import_dlcs_check.setCheckState(Qt.Unchecked) + self.ui.import_force_check.setCheckState(Qt.Unchecked) self.ui.import_dlcs_check.setEnabled( state or (self.app_name_edit.is_valid and bool(self.core.get_dlc_for_game(self.app_name_edit.text()))) @@ -287,6 +301,7 @@ class ImportGroup(QGroupBox): self.app_name_edit.text(), self.ui.import_folder_check.isChecked(), self.ui.import_dlcs_check.isChecked(), + self.ui.import_force_check.isChecked() ) worker.signals.result.connect(self.__on_import_result) worker.signals.progress.connect(self.__on_import_progress) diff --git a/rare/models/game.py b/rare/models/game.py index 9e2addab..eeb3e876 100644 --- a/rare/models/game.py +++ b/rare/models/game.py @@ -438,7 +438,11 @@ class RareGame(RareGameSlim): @property def folder_name(self) -> str: - return self.game.metadata.get("customAttributes", {}).get("FolderName", {}).get("value") + return ( + folder_name + if (folder_name := self.game.metadata.get("customAttributes", {}).get("FolderName", {}).get("value")) + else self.app_title + ) @property def save_path(self) -> Optional[str]: diff --git a/rare/ui/components/tabs/games/integrations/import_group.py b/rare/ui/components/tabs/games/integrations/import_group.py index 826acb36..3f7796db 100644 --- a/rare/ui/components/tabs/games/integrations/import_group.py +++ b/rare/ui/components/tabs/games/integrations/import_group.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'rare/ui/components/tabs/games/import_sync/import_group.ui' +# Form implementation generated from reading ui file 'rare/ui/components/tabs/games/integrations/import_group.ui' # -# Created by: PyQt5 UI code generator 5.15.7 +# Created by: PyQt5 UI code generator 5.15.9 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. @@ -14,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets class Ui_ImportGroup(object): def setupUi(self, ImportGroup): ImportGroup.setObjectName("ImportGroup") - ImportGroup.resize(501, 162) + ImportGroup.resize(501, 184) ImportGroup.setWindowTitle("ImportGroup") ImportGroup.setWindowFilePath("") self.import_layout = QtWidgets.QFormLayout(ImportGroup) @@ -50,6 +50,10 @@ class Ui_ImportGroup(object): self.import_dlcs_check.setFont(font) self.import_dlcs_check.setObjectName("import_dlcs_check") self.import_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.import_dlcs_check) + self.import_button_label = QtWidgets.QLabel(ImportGroup) + self.import_button_label.setText("") + self.import_button_label.setObjectName("import_button_label") + self.import_layout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.import_button_label) self.button_info_layout = QtWidgets.QHBoxLayout() self.button_info_layout.setObjectName("button_info_layout") self.import_button = QtWidgets.QPushButton(ImportGroup) @@ -60,7 +64,16 @@ class Ui_ImportGroup(object): self.import_button.setSizePolicy(sizePolicy) self.import_button.setObjectName("import_button") self.button_info_layout.addWidget(self.import_button) - self.import_layout.setLayout(4, QtWidgets.QFormLayout.FieldRole, self.button_info_layout) + self.import_layout.setLayout(5, QtWidgets.QFormLayout.FieldRole, self.button_info_layout) + self.import_force_label = QtWidgets.QLabel(ImportGroup) + self.import_force_label.setObjectName("import_force_label") + self.import_layout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.import_force_label) + self.import_force_check = QtWidgets.QCheckBox(ImportGroup) + font = QtGui.QFont() + font.setItalic(True) + self.import_force_check.setFont(font) + self.import_force_check.setObjectName("import_force_check") + self.import_layout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.import_force_check) self.retranslateUi(ImportGroup) @@ -74,6 +87,8 @@ class Ui_ImportGroup(object): self.import_dlcs_label.setText(_translate("ImportGroup", "Import DLCs")) self.import_dlcs_check.setText(_translate("ImportGroup", "If a game has DLCs, try to import them too")) self.import_button.setText(_translate("ImportGroup", "Import Game")) + self.import_force_label.setText(_translate("ImportGroup", "Force import")) + self.import_force_check.setText(_translate("ImportGroup", "Import game despite missing files")) if __name__ == "__main__": diff --git a/rare/ui/components/tabs/games/integrations/import_group.ui b/rare/ui/components/tabs/games/integrations/import_group.ui index 5318ea3e..c8499e03 100644 --- a/rare/ui/components/tabs/games/integrations/import_group.ui +++ b/rare/ui/components/tabs/games/integrations/import_group.ui @@ -7,7 +7,7 @@ 0 0 501 - 162 + 184 @@ -81,7 +81,14 @@ - + + + + + + + + @@ -98,6 +105,25 @@ + + + + Force import + + + + + + + + true + + + + Import game despite missing files + + +