From bc8478161982e8ee8a94d75d208e651766f9d600 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Fri, 3 Apr 2026 12:05:40 -0500 Subject: Add modl:// protocol support for mod.pub downloads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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= - 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) --- libs/uibase/src/nxmurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs') 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()) { -- cgit v1.3.1