diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 8964a3c..a69d48d 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -26,6 +26,7 @@ If applicable, add screenshots to help explain your problem.
**System (please complete the following information):**
- OS: [e.g. Fedora Linux]
- Installation method [e.g. Flatpak]
+ - Cartridges version [e.g. 1.5.4]
**Additional context**
Add any other context about the problem here.
diff --git a/data/hu.kramo.Cartridges.metainfo.xml.in b/data/hu.kramo.Cartridges.metainfo.xml.in
index a318483..8acc6b6 100644
--- a/data/hu.kramo.Cartridges.metainfo.xml.in
+++ b/data/hu.kramo.Cartridges.metainfo.xml.in
@@ -44,12 +44,10 @@
-
+
- - Fixes a bug with custom install locations
- - Fixes a potential bug with deleted Steam libraries
- - Translations since 1.5
+ - Fixes an issue with Bottles' custom Bottles directory feature
diff --git a/meson.build b/meson.build
index 4697e16..9c6da5f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('cartridges',
- version: '1.5.4',
+ version: '1.5.5',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)
diff --git a/src/__builtins__.pyi b/src/__builtins__.pyi
index c051ccd..f90e7b7 100644
--- a/src/__builtins__.pyi
+++ b/src/__builtins__.pyi
@@ -1 +1 @@
-def _(msg: str, /) -> str: ...
+def _(_msg: str, /) -> str: ...
diff --git a/src/importers/bottles_importer.py b/src/importers/bottles_importer.py
index faaa346..dc431af 100644
--- a/src/importers/bottles_importer.py
+++ b/src/importers/bottles_importer.py
@@ -82,15 +82,25 @@ def bottles_importer():
values["source"] = "bottles"
values["added"] = current_time
+ # This will not work if both Cartridges and Bottles are installed via Flatpak
+ # as Cartridges can't access directories picked via Bottles' file picker portal
+ try:
+ bottles_location = Path(
+ yaml.safe_load((bottles_dir / "data.yml").read_text("utf-8"))[
+ "custom_bottles_path"
+ ]
+ )
+ except (FileNotFoundError, KeyError):
+ bottles_location = bottles_dir / "bottles"
+
+ grid_path = (
+ bottles_location
+ / game["bottle"]["path"]
+ / "grids"
+ / game["thumbnail"].split(":")[1]
+ )
+
importer.save_game(
values,
- (
- bottles_dir
- / "bottles"
- / game["bottle"]["path"]
- / "grids"
- / game["thumbnail"].split(":")[1]
- )
- if game["thumbnail"]
- else None,
+ grid_path if game["thumbnail"] and grid_path.is_file() else None,
)
diff --git a/windows/Cartridges.iss b/windows/Cartridges.iss
index 89ee8fd..9fb35f5 100644
--- a/windows/Cartridges.iss
+++ b/windows/Cartridges.iss
@@ -1,5 +1,5 @@
#define MyAppName "Cartridges"
-#define MyAppVersion "1.5.4"
+#define MyAppVersion "1.5.5"
#define MyAppPublisher "kramo"
#define MyAppURL "https://github.com/kra-mo/cartridges"
#define MyAppExeName "pythonw.exe"