redirected curseforge share urls to api urls to allow downloading using curseforge share link

Signed-off-by: Samstercraft <samstercraft77@gmail.com>
This commit is contained in:
Samstercraft 2026-06-28 13:46:48 -07:00
parent d2fa7cf7f7
commit 0458f22325

View file

@ -180,6 +180,11 @@ void ImportPage::updateState()
input.append("/file");
url = QUrl::fromUserInput(input);
}
if (input.startsWith("https://www.curseforge.com/minecraft/share/")) {
input.remove(0, 43);
input.prepend("http://api.curseforge.com/v1/shared-profile/");
url = QUrl::fromUserInput(input);
}
// hook, line and sinker.
QFileInfo fi(url.fileName());
auto extra_info = QMap(m_extra_info);