Skip to content

Commit

Permalink
Royalflare/TLS update. (1.01)
Browse files Browse the repository at this point in the history
Changed: Removed Royalflare's link in the replays tab in light of its approaching shutdown.
Changed: Maribel Hearn's replay link now points to the site's top page.
Changed: Switched to TLS 1.2 to fix thcrap/replay links that don't support older TLS versions.
Changed: Added a check for repo crawling to prevent repeated requests.
  • Loading branch information
David-JonesDVN committed Jan 24, 2022
1 parent db7097c commit a046ece
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 47 deletions.
61 changes: 22 additions & 39 deletions Touhou Launcher/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Touhou Launcher/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ private void RefreshList(ref ListView list, Dictionary<string, string> files)

public MainForm()
{
System.Net.ServicePointManager.Expect100Continue = true;
System.Net.ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType)3072;
InitializeComponent();
if (totalGameCount > curCfg.gameCFG.Length)
{
Expand Down Expand Up @@ -886,8 +888,7 @@ private void linkReplays_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
gensokyoReplays.Checked = false;
royalflareReplays.Checked = false;
maribelReplays.Checked = false;
appspotReplays.Checked = false;
Replays_CheckedChanged(sender, new EventArgs());
}
Expand Down
4 changes: 2 additions & 2 deletions Touhou Launcher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 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.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
13 changes: 9 additions & 4 deletions Touhou Launcher/thcrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ internal class profileData
ConfigForm cfgForm;
string gamejs;
Dictionary<string, repoData> repos = new Dictionary<string, repoData>();
List<string> checkedRepos = new List<string>();
List<string> patchStates = new List<string>();
Dictionary<string, string> games = new Dictionary<string, string>();

Expand Down Expand Up @@ -112,10 +113,14 @@ private void thcrap_Load(object sender, EventArgs e)

private void searchRepo(string address, bool child = false)
{
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
wc.DownloadStringCompleted += onJsonGet;
wc.DownloadStringAsync(new Uri(address + "/repo.js"), new string[] { address, child.ToString() });
if (!checkedRepos.Contains(address))
{
checkedRepos.Add(address);
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
wc.DownloadStringCompleted += onJsonGet;
wc.DownloadStringAsync(new Uri(address + "/repo.js"), new string[] { address, child.ToString() });
}
}

private void onJsonGet(object sender, DownloadStringCompletedEventArgs e)
Expand Down

0 comments on commit a046ece

Please sign in to comment.