Merge pull request #284 from loathingKernel/develop
Fixes for the next release
This commit is contained in:
commit
ea41e85f95
22
.github/ISSUE_TEMPLATE/bug_report.md
vendored
22
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -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\<username>\AppData\Local\Rare\Rare\cache\logs`
|
||||
- Linux: `~/.cache/Rare/Rare/logs`
|
4
.github/ISSUE_TEMPLATE/feature_request.md
vendored
4
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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]:
|
||||
|
|
|
@ -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__":
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>501</width>
|
||||
<height>162</height>
|
||||
<height>184</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -81,7 +81,14 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="import_button_label">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="button_info_layout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="import_button">
|
||||
|
@ -98,6 +105,25 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="import_force_label">
|
||||
<property name="text">
|
||||
<string>Force import</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="import_force_check">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Import game despite missing files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
Loading…
Reference in a new issue