Skip to content

Commit

Permalink
Version bump, hashing change
Browse files Browse the repository at this point in the history
  • Loading branch information
Umbranoxio committed Dec 21, 2022
1 parent e2ddaa0 commit 9651ae4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
17 changes: 2 additions & 15 deletions ScoreSaber/Core/Daemons/UploadDaemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,23 +306,10 @@ internal class UploadDaemon : IDisposable, IUploadDaemon {
return T;
}

internal string GetVersionHash() {
string localPath = Path.Combine(IPA.Utilities.UnityGame.InstallPath, "Plugins", "ScoreSaber.dll");

internal static string GetVersionHash() {
using (var md5 = MD5.Create()) {

string localHash = string.Empty;
string mainHash = string.Empty;

using (var stream = File.OpenRead(localPath)) {
var hasher = md5.ComputeHash(stream);
localHash = BitConverter.ToString(hasher).Replace("-", "").ToLowerInvariant();
}

string versionString = string.Format("{0}{1}{2}", localHash, Plugin.Instance.LibVersion, Application.version);
string versionString = string.Format("{0}{1}", Plugin.Instance.LibVersion, Application.version);
string hash = BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(versionString))).Replace("-", "").ToLowerInvariant();
Plugin.Log.Info(versionString);
Plugin.Log.Info(hash);
return hash;
}
}
Expand Down
4 changes: 2 additions & 2 deletions ScoreSaber/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"$schema": "https://raw.githubusercontent.com/nike4613/ModSaber-MetadataFileSchema/master/Schema.json",
"author": "Umbranox",
"description": "Allows you to upload scores to an online leaderboard, earn PP from ranked maps and compare scores with others.",
"gameVersion": "1.26.0",
"gameVersion": "1.27.0_3631158313",
"icon": "ScoreSaber.logo.png",
"id": "ScoreSaber",
"name": "ScoreSaber",
"version": "3.2.12",
"version": "3.2.13",
"dependsOn": {
"BSIPA": "^4.1.6",
"BeatSaberMarkupLanguage": "^1.5.3",
Expand Down

0 comments on commit 9651ae4

Please sign in to comment.