mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-06-14 08:24:31 +12:00
增加国内中转源,同步原作者更新修复一键安装问题级新手指南链接
This commit is contained in:
parent
dc18091459
commit
7919b31e90
|
@ -70,11 +70,11 @@ namespace ModAssistant
|
|||
}
|
||||
else
|
||||
{
|
||||
ArgumentHandler(e.Args);
|
||||
await ArgumentHandler(e.Args);
|
||||
}
|
||||
}
|
||||
|
||||
private void ArgumentHandler(string[] args)
|
||||
private async Task ArgumentHandler(string[] args)
|
||||
{
|
||||
switch (args[0])
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ namespace ModAssistant
|
|||
}
|
||||
else
|
||||
{
|
||||
OneClickInstaller.InstallAsset(args[1]);
|
||||
await OneClickInstaller.InstallAsset(args[1]);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace ModAssistant
|
|||
private static readonly string[] Protocols = new[] { "modelsaber", "beatsaver" };
|
||||
|
||||
private const bool BypassDownloadCounter = false;
|
||||
public static async void InstallAsset(string link)
|
||||
public static async Task InstallAsset(string link)
|
||||
{
|
||||
Uri uri = new Uri(link);
|
||||
if (!Protocols.Contains(uri.Scheme)) return;
|
||||
|
|
|
@ -23,12 +23,23 @@ namespace ModAssistant
|
|||
public class Constants
|
||||
{
|
||||
public const string BeatSaberAPPID = "620980";
|
||||
|
||||
public const string DownloadSite = "源站获取";
|
||||
public const string BeatModsAPIUrl = "https://beatmods.com/api/v1/";
|
||||
public const string TeknikAPIUrl = "https://api.teknik.io/v1/";
|
||||
public const string BeatModsURL = "https://beatmods.com";
|
||||
public const string BeatModsAlias = "https://alias.beatmods.com/aliases.json";
|
||||
public const string WeebCDNAPIURL = "https://pat.assistant.moe/api/v1.0/";
|
||||
public const string ModTranslationURL = "https://wgzeyu.github.io/BeatSaberModListTranslationRepo/zh-Hans.json";
|
||||
/*
|
||||
public const string DownloadSite = "国内中转";
|
||||
public const string BeatModsAPIUrl = "https://beatmods.gtxcn.com/api/v1/";
|
||||
public const string TeknikAPIUrl = "https://beatmods.gtxcn.com/teknik/v1/";
|
||||
public const string BeatModsURL = "https://beatmods.gtxcn.com";
|
||||
public const string BeatModsAlias = "https://beatmods.gtxcn.com/alias/aliases.json";
|
||||
public const string WeebCDNAPIURL = "https://beatmods.gtxcn.com/assistant/api/v1.0/";
|
||||
public const string ModTranslationURL = "https://beatmods.gtxcn.com/github/BeatSaberModListTranslationRepo/zh-Hans.json";
|
||||
*/
|
||||
public const string BeatModsModsOptions = "mod?status=approved";
|
||||
public const string MD5Spacer = " ";
|
||||
public static readonly char[] IllegalCharacters = new char[]
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
</Span>
|
||||
<Span x:Key="Intro:WikiGuide">
|
||||
Please read the Beginners Guide on the
|
||||
<Hyperlink local:HyperlinkExtensions.IsExternal="True" NavigateUri="https://bsmg.wiki/beginners-guide">
|
||||
<Hyperlink local:HyperlinkExtensions.IsExternal="True" NavigateUri="https://bsmg.wiki/pc-modding.html">
|
||||
Wiki
|
||||
</Hyperlink>.
|
||||
</Span>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
BS常见问题解答(中文)
|
||||
</Hyperlink>
|
||||
</Bold>,以及
|
||||
<Hyperlink local:HyperlinkExtensions.IsExternal="True" NavigateUri="https://bsmg.wiki/beginners-guide">
|
||||
<Hyperlink local:HyperlinkExtensions.IsExternal="True" NavigateUri="https://bsmg.wiki/pc-modding.html">
|
||||
新手指南(英文)
|
||||
</Hyperlink>。
|
||||
</Span>
|
||||
|
|
|
@ -93,6 +93,11 @@ namespace ModAssistant
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(Utils.Constants.DownloadSite == "国内中转")
|
||||
{
|
||||
MessageBox.Show("你当前正在使用国内中转源的ModAssistant。不是从BeatMods源站下载,\n而是连接WGzeyu提供的国际线路较好的国内服务器,中转访问源站下载。\n\n通常,我们建议使用源站版,直接连接BeatMods下载。\n但国内部分运营商连接BeatMods时,下载速度甚至低于20KB/s,\n完全下不动导致报错无法安装,这个版本就是为了这些用户准备的。\n\n国内中转服务器由中文版作者WGzeyu提供。\n由于中转服务器带宽较低,且每次中转安装都会占用作者的网速与流量,\n所以我们对中转下载设置了限速2Mbps,安装常用Mod总计需一分钟左右。\n\n【注意】如果软件发布了更新,那么国内中转版会默认更新到源站版,\n但文件名不会变!如有需要可重新到群文件下载新的国内中转版。\n\n点击确定将打开源站中文列表版ModAssistant下载地址。");
|
||||
System.Diagnostics.Process.Start("https://github.com/wgzeyu/ModAssistant-CN/releases/latest");
|
||||
}
|
||||
}
|
||||
|
||||
private async void LoadVersionsAsync()
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace ModAssistant.Pages
|
|||
DescriptionColumn.Width = 800;
|
||||
}
|
||||
|
||||
MainWindow.Instance.MainText = $"{FindResource("Mods:LoadingMods")}...";
|
||||
MainWindow.Instance.MainText = $"{FindResource("Mods:LoadingMods")}..." + " (从" + Utils.Constants.DownloadSite + ")";
|
||||
await Task.Run(async () => await PopulateModsList());
|
||||
|
||||
ModsListView.ItemsSource = ModList;
|
||||
|
@ -258,7 +258,7 @@ namespace ModAssistant.Pages
|
|||
return;
|
||||
}
|
||||
|
||||
MainWindow.Instance.MainText = $"{FindResource("Mods:LoadingTrans")}...";
|
||||
MainWindow.Instance.MainText = $"{FindResource("Mods:LoadingTrans")}..." + " (从" + Utils.Constants.DownloadSite + ")";
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -414,7 +414,7 @@ namespace ModAssistant.Pages
|
|||
return;
|
||||
}
|
||||
|
||||
MainWindow.Instance.MainText = $"{string.Format((string)FindResource("Mods:DownloadingMod"), mod.name)}...";
|
||||
MainWindow.Instance.MainText = $"{string.Format((string)FindResource("Mods:DownloadingMod"), mod.name)}..." + " (从" + Utils.Constants.DownloadSite + ")";
|
||||
|
||||
using (Stream stream = await DownloadMod(Utils.Constants.BeatModsURL + downloadLink))
|
||||
using (ZipArchive archive = new ZipArchive(stream))
|
||||
|
|
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1.002.0")]
|
||||
[assembly: AssemblyFileVersion("1.1.002.0")]
|
||||
[assembly: AssemblyVersion("1.1.003.0")]
|
||||
[assembly: AssemblyFileVersion("1.1.003.0")]
|
||||
|
|
Loading…
Reference in a new issue