1
0
mirror of https://github.com/lutris/lutris synced 2024-07-01 06:34:26 +00:00

Compare commits

...

5 Commits

Author SHA1 Message Date
tobil4sk
df5647f818
Merge efc446d139 into d9ae24254c 2024-06-26 23:18:27 +02:00
Daniel Johnson
d9ae24254c Filter patches according to the runner of the existing game, and the OS of the patch.
Resolves #5522.
2024-06-26 17:15:52 -04:00
Daniel Johnson
c245f6af3e Correct spelling error in log message 2024-06-26 17:05:25 -04:00
Tobiasz Laskowski
efc446d139
Add fullscreen, force align, no gui ruffle options 2024-05-23 21:39:16 +01:00
Tobiasz Laskowski
703b4ffde0
Update ruffle version 2024-05-23 21:21:21 +01:00
3 changed files with 38 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import os
import time
from collections import defaultdict
from gettext import gettext as _
from typing import List
from typing import List, Optional
from urllib.parse import parse_qsl, urlencode, urlparse
from lxml import etree
@ -360,8 +360,13 @@ class GOGService(OnlineService):
if installer["language"] == self.determine_language_installer(gog_installers, language)
]
def get_update_versions(self, gog_id):
def get_update_versions(self, gog_id: str, runner_name: Optional[str]):
"""Return updates available for a game, keyed by patch version"""
runner_to_os_dict = {"wine": "windows", "linux": "linux"}
filter_os = runner_to_os_dict.get(runner_name) if runner_name else None
games_detail = self.get_game_details(gog_id)
patches = games_detail["downloads"]["patches"]
if not patches:
@ -369,6 +374,10 @@ class GOGService(OnlineService):
return {}
patch_versions = defaultdict(list)
for patch in patches:
if filter_os:
patch_os = patch.get("os")
if patch_os and filter_os != patch_os.casefold():
continue
patch_versions[patch["name"]].append(patch)
return patch_versions
@ -652,7 +661,8 @@ class GOGService(OnlineService):
def get_update_installers(self, db_game):
appid = db_game["service_id"]
patch_versions = self.get_update_versions(appid)
runner = db_game.get("runner")
patch_versions = self.get_update_versions(appid, runner)
patch_installers = []
for version in patch_versions:
patch = patch_versions[version]

View File

@ -42,7 +42,7 @@ def get_game_config(task, gog_game_path):
if os.path.exists(resolved):
return resolved
logger.warning("GOG configuratipath '%s' could not be resolved", path)
logger.warning("GOG configuration path '%s' could not be resolved", path)
return path
config = {}

View File

@ -3,7 +3,7 @@
"description": "Emulates Flash games",
"platforms": ["Flash"],
"runner_executable": "ruffle/ruffle",
"download_url": "https://github.com/ruffle-rs/ruffle/releases/download/nightly-2023-10-14/ruffle-nightly-2023_10_14-linux-x86_64.tar.gz",
"download_url": "https://github.com/ruffle-rs/ruffle/releases/download/nightly-2024-05-22/ruffle-nightly-2024_05_22-linux-x86_64.tar.gz",
"game_options": [
{
"option": "main_file",
@ -13,6 +13,20 @@
}
],
"runner_options": [
{
"option": "fullscreen",
"type": "bool",
"default": true,
"label": "Fullscreen",
"argument": "--fullscreen"
},
{
"option": "force_align",
"type": "bool",
"label": "Force align",
"argument": "--force-align",
"help": "Prevent movies from changing the stage alignment"
},
{
"option": "graphics",
"type": "choice",
@ -43,6 +57,15 @@
"type": "string",
"label": "Proxy",
"argument": "--proxy"
},
{
"option": "no_gui",
"type": "bool",
"default": true,
"label": "No GUI",
"advanced": true,
"argument": "--no-gui",
"help": "Hides the menu bar (the bar at the top of the window)"
}
]
}