Compare commits

...

4 Commits
v2.8 ... v2.8.1

Author SHA1 Message Date
kramo
afd1972a76 v2.8.1 2024-03-23 20:53:26 +01:00
kramo
8a7875b843 Update copyrights 2024-03-23 20:45:23 +01:00
kramo
aec8a4efa7 Fix #238 2024-03-23 20:28:36 +01:00
kramo
2b93a1feeb Fix #239 2024-03-23 20:10:37 +01:00
4 changed files with 20 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
# details_window.py
#
# Copyright 2022-2023 kramo
# Copyright 2022-2024 kramo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -321,7 +321,7 @@ class DetailsDialog(Adw.Dialog):
self.executable.set_text(shlex.quote(path))
def choose_executable(self, *_args: Any) -> None:
self.exec_file_dialog.open(self, None, self.set_executable)
self.exec_file_dialog.open(self.get_root(), None, self.set_executable)
def choose_cover(self, *_args: Any) -> None:
self.image_file_dialog.open(self, None, self.set_cover)
self.image_file_dialog.open(self.get_root(), None, self.set_cover)

View File

@@ -1,6 +1,6 @@
# lutris_source.py
#
# Copyright 2022-2023 kramo
# Copyright 2022-2024 kramo
# Copyright 2023 Geoffrey Coulaud
#
# This program is free software: you can redistribute it and/or modify
@@ -54,6 +54,9 @@ class LutrisSourceIterable(SourceIterable):
db_path = copy_db(self.source.locations.data["pga.db"])
connection = connect(db_path)
cursor = connection.execute(request, params)
coverart_is_dir = (
coverart_path := self.source.locations.data.root / "coverart"
).is_dir()
# Create games from the DB results
for row in cursor:
@@ -69,10 +72,12 @@ class LutrisSourceIterable(SourceIterable):
"executable": self.source.make_executable(game_id=row[0]),
}
game = Game(values)
additional_data = {}
# Get official image path
image_path = self.source.locations.data["coverart"] / f"{row[2]}.jpg"
additional_data = {"local_image_path": image_path}
if coverart_is_dir:
image_path = coverart_path / f"{row[2]}.jpg"
additional_data["local_image_path"] = image_path
yield (game, additional_data)
@@ -111,7 +116,6 @@ class LutrisSource(URLExecutableSource):
),
paths={
"pga.db": LocationSubPath("pga.db"),
"coverart": LocationSubPath("coverart", True),
},
invalid_subtitle=Location.DATA_INVALID_SUBTITLE,
)

View File

@@ -53,6 +53,14 @@
</screenshots>
<content_rating type="oars-1.1" />
<releases>
<release version="2.8.1" date="2024-03-23">
<description translatable="no">
<ul>
<li>Fixes an issue with Lutris games not importing</li>
<li>Fixes an issue with file chooser buttons being unresponsive</li>
</ul>
</description>
</release>
<release version="2.8" date="2024-03-20">
<description translatable="no">
<ul>

View File

@@ -1,5 +1,5 @@
project('cartridges',
version: '2.8',
version: '2.8.1',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)