From 93edbac5b005bf2aaf44243246a2635e7ae37230 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 30 Jul 2026 20:35:23 +0900 Subject: [PATCH 1/6] fix: handle invalid mods on server --- dzgui/api/steam.py | 5 ++++- dzgui/managers/connection.py | 10 ++++++++++ dzgui/views/pages/preconnect.py | 11 ++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dzgui/api/steam.py b/dzgui/api/steam.py index e007084..9e128f6 100644 --- a/dzgui/api/steam.py +++ b/dzgui/api/steam.py @@ -139,6 +139,8 @@ def get_remote_signatures(mods: list[str]) -> list[tuple[str, str, int, int]]: j = r.json() rows = j["response"]["publishedfiledetails"] for row in rows: + if row["result"] == 9: + continue title = str(row["title"]) _id = str(row["publishedfileid"]) time = int(row["time_updated"]) @@ -205,9 +207,11 @@ def launch_offline( proc = subprocess.run([*client_args, *params]) return proc.returncode + def find_loginusers(path: Path) -> Path: return path / "config" / "loginusers.vdf" + def find_user_id(path: Path) -> str | None: resolved_path = find_loginusers(path) try: @@ -226,7 +230,6 @@ def find_user_id(path: Path) -> str | None: return None - def find_user_id_32(path: Path) -> int: uid = find_user_id(path) if uid is None: diff --git a/dzgui/managers/connection.py b/dzgui/managers/connection.py index 1ec5a66..c96abc2 100644 --- a/dzgui/managers/connection.py +++ b/dzgui/managers/connection.py @@ -86,6 +86,7 @@ class Prerequisites: mods: list[list[str]] game_mode: bool is_last_server: bool + invalid_mods: list[tuple[str, str]] allows_downloads: tuple[bool, str] @@ -191,6 +192,9 @@ class ConnectionManager: is_last = self.is_last_server() + # TODO: strings + invalid_mods = [(mod[0], mod[1]) for mod in remote_mods if mod[2] == "Invalid mod"] + prereqs = Prerequisites( name=info.server_name, appid=info.game_id, @@ -206,6 +210,7 @@ class ConnectionManager: mods=remote_mods, game_mode=game_mode, is_last_server=is_last, + invalid_mods=invalid_mods, allows_downloads=allows_downloads, ) @@ -261,6 +266,11 @@ class ConnectionManager: for mod in alpha_mods: if any(mod[1] in tuple for tuple in missing_mods): mod[2] = resync + for mod in alpha_mods: + # NOTE: if the mod is neither synched or out of date, it is a malformed mod + if mod[2] == "": + # TODO: strings + mod[2] = "Invalid mod" return alpha_mods, missing_mods diff --git a/dzgui/views/pages/preconnect.py b/dzgui/views/pages/preconnect.py index 817063b..345f7a7 100644 --- a/dzgui/views/pages/preconnect.py +++ b/dzgui/views/pages/preconnect.py @@ -239,6 +239,15 @@ class PreConnectionAssistant(Gtk.Box): ) """Errors""" + if len(prereqs.invalid_mods) > 0: + pairs = [": ".join(sub) for sub in prereqs.invalid_mods] + lines = "\n".join(pairs) + msg = ( + "Server has invalid mods that are not recognized by Steam.\n" + "Contact the server owner and include these mod IDs in your report:\n" + f"{lines}" + ) + errors.append(msg) if prereqs.binary_missing: errors.append( f"Remote server is running the build '{prereqs.build}', but it is not installed.\n{resync_msg}" @@ -278,7 +287,7 @@ class PreConnectionAssistant(Gtk.Box): f"The game '{running_app}' is currently running in Steam, but background downloads are not enabled.\n" "Either stop the game first, or update your global Steam settings or the game's local settings.\n" "Otherwise, mods may be queued for download but never update." - ) + ) warnings.append(msg) self.add_warnings(warnings) From 3e4ed9590835fc843541dba6a6e8c92714a4bf69 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 30 Jul 2026 20:37:14 +0900 Subject: [PATCH 2/6] chore: trigger checks From 30e309442b7e618add5bef14fe4d886c44debf9c Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 30 Jul 2026 20:45:58 +0900 Subject: [PATCH 3/6] chore: trigger checks From fb47564618b8e03bc194056c44316592b4c0166e Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 31 Jul 2026 23:13:03 +0900 Subject: [PATCH 4/6] chore: trigger checks From 5e5a6b4eaf22afa419b4ae35fcd25f06be367c8b Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 4 Aug 2026 23:04:47 +0900 Subject: [PATCH 5/6] chore: more generic warning message --- dzgui/views/pages/preconnect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui/views/pages/preconnect.py b/dzgui/views/pages/preconnect.py index 345f7a7..47adfb6 100644 --- a/dzgui/views/pages/preconnect.py +++ b/dzgui/views/pages/preconnect.py @@ -284,7 +284,7 @@ class PreConnectionAssistant(Gtk.Box): allows_dl, running_app = prereqs.allows_downloads if len(prereqs.mods) > 0 and allows_dl is False: msg = ( - f"The game '{running_app}' is currently running in Steam, but background downloads are not enabled.\n" + f"The app '{running_app}' is currently running in Steam, but background downloads are not enabled.\n" "Either stop the game first, or update your global Steam settings or the game's local settings.\n" "Otherwise, mods may be queued for download but never update." ) From 4f6c58329464331788fd7da00c106cc6c3be5390 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 4 Aug 2026 23:05:12 +0900 Subject: [PATCH 6/6] chore: add comment --- dzgui/api/steam.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dzgui/api/steam.py b/dzgui/api/steam.py index 9e128f6..c5b0074 100644 --- a/dzgui/api/steam.py +++ b/dzgui/api/steam.py @@ -139,6 +139,7 @@ def get_remote_signatures(mods: list[str]) -> list[tuple[str, str, int, int]]: j = r.json() rows = j["response"]["publishedfiledetails"] for row in rows: + # NOTE: not a valid published file if row["result"] == 9: continue title = str(row["title"])