Skip to content

Commit

Permalink
Update OneClickInstaller.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Parapass authored Apr 27, 2024
1 parent 2eae530 commit e3600d2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ModAssistant/Classes/OneClickInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace ModAssistant
{
class OneClickInstaller
{
private static readonly string[] Protocols = new[] { "modelsaber", "beatsaver", "bsplaylist" };
private static readonly string[] Protocols = new[] { "modelsaber", "beatsaver", "bsplaylist", "web+bsmap" };
public static OneClickStatus Status = new OneClickStatus();

public static async Task InstallAsset(string link)
Expand All @@ -28,6 +28,9 @@ public static async Task InstallAsset(string link)
case "beatsaver":
await BeatSaver(uri);
break;
case "web+bsmap":
await ScoreSaber(uri);
break;
case "bsplaylist":
await Playlist(uri);
break;
Expand Down Expand Up @@ -56,6 +59,12 @@ private static async Task BeatSaver(Uri uri)
await API.BeatSaver.GetFromKey(Key);
}

private static async Task ScoreSaber(Uri uri)
{
string Hash = uri.Host;
await API.BeatSaver.GetFromHash(Hash);
}

private static async Task ModelSaber(Uri uri)
{
if (App.OCIWindow != "No" && App.OCIWindow != "Notify") Status.Show();
Expand Down

0 comments on commit e3600d2

Please sign in to comment.