mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
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:
parent
d2fa7cf7f7
commit
0458f22325
1 changed files with 5 additions and 0 deletions
|
|
@ -180,6 +180,11 @@ void ImportPage::updateState()
|
||||||
input.append("/file");
|
input.append("/file");
|
||||||
url = QUrl::fromUserInput(input);
|
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.
|
// hook, line and sinker.
|
||||||
QFileInfo fi(url.fileName());
|
QFileInfo fi(url.fileName());
|
||||||
auto extra_info = QMap(m_extra_info);
|
auto extra_info = QMap(m_extra_info);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue