aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-03 12:05:40 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-03 12:05:40 -0500
commitbc8478161982e8ee8a94d75d208e651766f9d600 (patch)
treed703e56502c9813e3ffbb393c3fffebca03e6516 /libs
parentd2eec897b2ec1022744a993135e3595c8fea005b (diff)
Add modl:// protocol support for mod.pub downloads
Handle modl:// links alongside nxm:// for downloading mods from mod.pub. mod.pub uses a different URL format than Nexus — the download URL is embedded as a query parameter: modl://game/?url=<encoded-url> - Register x-scheme-handler/modl in desktop files and MIME lists - Accept both nxm and modl schemes in URL parsing (NxmLink, NXMUrl) - Parse modl:// direct download links and route to startDownloadURLs - Make key/expires optional in NxmLink::parse (not used by mod.pub) - Add debug logging for received URLs to aid troubleshooting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs')
-rw-r--r--libs/uibase/src/nxmurl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/uibase/src/nxmurl.cpp b/libs/uibase/src/nxmurl.cpp
index d09cdde..33bb22f 100644
--- a/libs/uibase/src/nxmurl.cpp
+++ b/libs/uibase/src/nxmurl.cpp
@@ -29,7 +29,7 @@ NXMUrl::NXMUrl(const QString& url)
{
QUrl nxm(url);
QUrlQuery query(nxm);
- QRegularExpression exp("nxm://[a-z0-9]+/mods/(\\d+)/files/(\\d+)",
+ QRegularExpression exp("(?:nxm|modl)://[a-z0-9]+/mods/(\\d+)/files/(\\d+)",
QRegularExpression::CaseInsensitiveOption);
auto match = exp.match(url);
if (!match.hasMatch()) {