From 3fe6ee53b1ad94f62acc2b973563a20593aedb64 Mon Sep 17 00:00:00 2001 From: HarryEffingPotter Date: Sun, 24 Jul 2022 05:44:32 -0400 Subject: [PATCH] 1.0.2 Fixed Mega.nz links! --- ALL-LEGIT.csproj | 1 + Updater.cs | 2 +- mainWindow.cs | 10 +++++++--- version | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ALL-LEGIT.csproj b/ALL-LEGIT.csproj index 1edc098..0938952 100644 --- a/ALL-LEGIT.csproj +++ b/ALL-LEGIT.csproj @@ -436,6 +436,7 @@ WebFormForm.cs + Always diff --git a/Updater.cs b/Updater.cs index c271799..40a1352 100644 --- a/Updater.cs +++ b/Updater.cs @@ -11,7 +11,7 @@ class Updater private static string RawGitHubUrl; private static string GitHubUrl; - static readonly public string LocalVersion = "1.0.1"; + static readonly public string LocalVersion = "1.0.2"; public static string currentVersion = ""; public static string currentHFVersion = ""; public static string changelog = ""; diff --git a/mainWindow.cs b/mainWindow.cs index f7aa882..acd07e9 100644 --- a/mainWindow.cs +++ b/mainWindow.cs @@ -164,7 +164,7 @@ private void menuItem2_Click(object Sender, EventArgs e) private async void MainWindow_Load(object sender, EventArgs e) { Updater.Update(); - SplashText.Text = $"All Legit v{Updater.currentVersion}\nby HarryEffinPottter/YSG\n\nGlobal hot key works everywhere,\neven when app is minimized.\n\nCTRL + V or Paste button while in app."; + SplashText.Text = $"All Legit v{Updater.currentVersion}\nby HarryEffinPottter/YSG\n- Mega.nz links now work properly!\n\nGlobal hot key works everywhere,\neven when app is minimized.\n\nCTRL + V or Paste button while in app."; var converter = new KeysConverter(); HotKeyBox.Text = converter.ConvertToString(Properties.Settings.Default.HotKeyKeyData); OpenDirBox.Checked = Properties.Settings.Default.OpenDir; @@ -220,7 +220,9 @@ public static dynamic getJson(string requestURL) { try { - var client = new RestClient($"https://api.alldebrid.com/v4/"); + string BaseURL = "https://api.alldebrid.com/v4/"; + var client = new RestClient(BaseURL); + Console.WriteLine($"Requesting: {BaseURL}{requestURL}"); var request = new RestRequest(requestURL, Method.Get); request.OnBeforeDeserialization = resp => { resp.ContentType = "application/json"; }; var queryResult = client.Execute(request); @@ -1151,7 +1153,9 @@ public async void DoAsyncConversion() cancel = false; return; } - var obj = getJson($"link/unlock?agent={apiNAME}&apikey={APIKEY}&link={s}"); + string s2 = Uri.EscapeDataString(s); + string unlockString = $"link/unlock?agent={apiNAME}&apikey={APIKEY}&link={s2}"; + var obj = getJson(unlockString); if (obj.status.ToString().Equals("error")) { isErrors = true; diff --git a/version b/version index cada1ac..ab56519 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.0.1 +1.0.2