Skip to content

Commit

Permalink
CurseForge真令人头疼
Browse files Browse the repository at this point in the history
  • Loading branch information
d3ara1n committed Sep 12, 2023
1 parent 7c8cf6d commit fb3f324
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelogs/v0.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

## ---

## v0.5.1

- **修复**元数据包含中文同样能被识别(但不建议)
- **优化**错误和警告消息将不会自动消失
- **新增**实例能强制导入整合包并整合覆盖原先数据
- **修复**配合CurseForge添加的6652号无文档的Api

## v0.5.0

Expand Down
2 changes: 1 addition & 1 deletion src/Polymerium.App (Package)/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity
Name="2413Dearain.Polymerium"
Publisher="CN=11C5722E-21B2-4CEC-984F-6BC6DC620005"
Version="0.5.0.0"/>
Version="0.5.1.0"/>

<Properties>
<DisplayName>Polymerium</DisplayName>
Expand Down
4 changes: 2 additions & 2 deletions src/Polymerium.App/Services/ImportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public async Task<Result<ImportResult, GameImportError>> ExtractMetadataFromFile

return new Result<ImportResult, GameImportError>(GameImportError.Unsupported);
}
catch
catch(Exception ex)
{
return new Result<ImportResult, GameImportError>(GameImportError.FileSystemError);
}
Expand Down Expand Up @@ -139,7 +139,7 @@ public async Task<Result<ImportResult, GameImportError>> ExtractMetadataFromFile
allocateds.Add(new Uri(new Uri("poly-res://local@file/"), file.Path));
}
}
catch
catch(Exception ex)
{
return GameImportError.FileSystemError;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Polymerium.Core/Helpers/CurseForgeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static ResourceType GetResourceTypeFromClassId(uint classId)
17 => ResourceType.World,
4546 => ResourceType.ShaderPack,
4471 => ResourceType.Modpack,
6552 => ResourceType.ShaderPack,
_ => throw new NotImplementedException()
};
}
Expand Down Expand Up @@ -182,7 +183,7 @@ public static async Task<IEnumerable<EternalProject>> SearchProjectsAsync(
ResourceType.ResourcePack => CLASSID_RESOURCEPACK,
ResourceType.World => CLASSID_WORLD,
_ => throw new NotSupportedException()
}}&index={offset}&pageSize={limit}&searchFilter={HttpUtility.UrlEncode(query)}&sortField=2&sortOrder=desc"
}}&index={offset}&pageSize={limit}&searchFilter={HttpUtility.UrlPathEncode(query)}&sortField=2&sortOrder=desc"
+ (gameVersion != null ? $"&gameVersion={gameVersion}" : "")
+ (
(type == ResourceType.Mod || type == ResourceType.Modpack) && modLoaderId != null
Expand Down

0 comments on commit fb3f324

Please sign in to comment.