Skip to content

Commit

Permalink
1.0.2 Fixed Mega.nz links!
Browse files Browse the repository at this point in the history
  • Loading branch information
harryeffinpotter committed Jul 24, 2022
1 parent 850dbe7 commit 3fe6ee5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions ALL-LEGIT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@
<DependentUpon>WebFormForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="version" />
<None Include="_bin\CHANGELOG.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
2 changes: 1 addition & 1 deletion Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down
10 changes: 7 additions & 3 deletions mainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.0.2

0 comments on commit 3fe6ee5

Please sign in to comment.