Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions data/runners.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,18 @@
"type": "github"
},
{
"title": "Proton-EM",
"description": "Steam compatibility tool for running Windows games with improvements over Valve's default Proton. By Etaash Mathamsetty adding FSR4 support and wine wayland tweaks.",
"endpoint": "https://api.github.com/repos/Etaash-mathamsetty/Proton/releases",
"title": "DW-Proton",
"description": "Dawn Winery's custom Proton fork with fixes for various games :xdd:",
"endpoint": "https://dawn.wine/api/v1/repos/dawn-winery/dwproton/releases",
"asset_position": 1,
"directory_name_formats": [
{
"launcher": "default",
"directory_name_format": "$release_name"
}
],
"type": "github"
"support_latest": true,
"type": "forgejo"
},
{
"title": "Proton-Sarek",
Expand Down Expand Up @@ -91,6 +92,19 @@
],
"type": "github"
},
{
"title": "Proton-EM",
"description": "Steam compatibility tool for running Windows games with improvements over Valve's default Proton. By Etaash Mathamsetty adding FSR4 support and wine wayland tweaks.",
"endpoint": "https://api.github.com/repos/Etaash-mathamsetty/Proton/releases",
"asset_position": 1,
"directory_name_formats": [
{
"launcher": "default",
"directory_name_format": "$release_name"
}
],
"type": "github"
},
{
"title": "Proton-Tkg",
"description": "Custom Proton build for running Windows games, based on Wine-tkg.",
Expand Down Expand Up @@ -120,19 +134,6 @@
],
"type": "github"
},
{
"title": "DW-Proton",
"description": "Dawn Winery's custom Proton fork with fixes for various games :xdd:",
"endpoint": "https://dawn.wine/api/v1/repos/dawn-winery/dwproton/releases",
"asset_position": 1,
"directory_name_formats": [
{
"launcher": "default",
"directory_name_format": "$release_name"
}
],
"type": "forgejo"
},
{
"title": "Luxtorpeda",
"description": "Luxtorpeda provides Linux-native game engines for certain Windows-only games.",
Expand Down
16 changes: 14 additions & 2 deletions src/models/runner.vala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace ProtonPlus.Models {
var code = yield update_specific_runner (runner);
if (code == ReturnCode.RUNNER_UPDATED)
updated_count++;
else
else if (code != ReturnCode.NOTHING_TO_UPDATE)
return code;
}

Expand All @@ -58,7 +58,19 @@ namespace ProtonPlus.Models {
public static async ReturnCode update_specific_runner (Models.Runners.Basic runner) {
string? response;

var code = yield Utils.Web.get_request ("%s?per_page=1".printf (runner.endpoint), runner.get_type, out response);
string query_param;
switch (runner.get_type) {
case Utils.Web.GetType.FORGEJO:
query_param = "limit=1";
break;
case Utils.Web.GetType.GITHUB:
case Utils.Web.GetType.GITLAB:
default:
query_param = "per_page=1";
break;
}

var code = yield Utils.Web.get_request ("%s?%s".printf (runner.endpoint, query_param), runner.get_type, out response);

if (code != ReturnCode.VALID_REQUEST)
return code;
Expand Down
1 change: 1 addition & 0 deletions src/widgets/window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ namespace ProtonPlus.Widgets {
_("No update found for %s").printf ("%s Latest".printf (runner.title)));
break;
case ReturnCode.RUNNERS_UPDATED:
case ReturnCode.RUNNER_UPDATED:
toast = new Adw.Toast (
runner == null ?
_("Everything is now up-to-date") :
Expand Down