| 273 | } |
| 274 | |
| 275 | QString ResourceAPI::mapMCVersionToModrinth(Version v) const |
| 276 | { |
| 277 | static const QString preString = " Pre-Release "; |
| 278 | auto verStr = v.toString(); |
| 279 | |
| 280 | if (verStr.contains(preString)) { |
| 281 | verStr.replace(preString, "-pre"); |
| 282 | } |
| 283 | verStr.replace(" ", "-"); |
| 284 | return verStr; |
| 285 | } |
| 286 | |
| 287 | std::pair<Task::Ptr, QByteArray*> ResourceAPI::getProject(QString addonId) const |
| 288 | { |