Skip to content

Commit

Permalink
v.0.4.5.0 adapt to March 2020 FA template changes
Browse files Browse the repository at this point in the history
  • Loading branch information
crouvpony47 committed Mar 7, 2020
1 parent b0a9063 commit 9328357
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 28 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ Yet another mass downloader for FurAffinity.net.

[Download stable win32 builds.](https://github.com/crouvpony47/furdown/releases)

### Changelog (v.0.4.4.0)
- bypassing CF's "I'm Under Attack" mode thing. **Note that if you are already logged in but are shown the login form anyway, simply navigate to the FA main page**
### Changelog (v.0.4.5.0)
- Adapt to the site template changes
- Improved updates checker

### A note about CF's "I'm Under Attack" mode
- If you are already logged in but are shown the login form anyway, simply navigate to the FA main page.

### System requirements
- Windows Vista SP2 or newer, might not work on server editions
Expand Down
2 changes: 1 addition & 1 deletion src/AppCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public async Task<bool> Init()
http.DefaultRequestHeaders.Add("Cookie", cookies);
string cpage = await http.GetStringAsync("https://www.furaffinity.net/");
// authorized
if (cpage.Contains("\"logout-link\""))
if (Regex.Match(cpage, "class=\"[^\"]*logout-link[^\"]*\"", RegexOptions.CultureInvariant).Success)
{
// and not using classic style
if (!cpage.Contains("/themes/classic/"))
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

[assembly: Guid("8b45577e-b5d1-4056-96e6-b2647e18b867")]

[assembly: AssemblyVersion("0.4.4.0")]
[assembly: AssemblyFileVersion("0.4.4.0")]
[assembly: AssemblyVersion("0.4.5.0")]
[assembly: AssemblyFileVersion("0.4.5.0")]
[assembly: NeutralResourcesLanguage("en")]

1 change: 1 addition & 0 deletions src/UpdatesChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ internal static async Task<bool> CheckRemoteVersion()
if (c < 0)
{
Console.WriteLine("Updater :: Note :: an update is available");
Console.WriteLine("Updater :: Note :: see https://github.com/crouvpony47/furdown/releases");
return true;
}
else if (c > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/app.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="0.4.4.0" name="Furdown.app"/>
<assemblyIdentity version="0.4.5.0" name="Furdown.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
Expand Down
21 changes: 21 additions & 0 deletions src/authForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ private async void authForm_Shown(object sender, EventArgs e)
{
OnAuthSuccessful();
}

// check for updates
bool hasUpdates = await UpdatesChecker.CheckRemoteVersion();
const string urlToOpen = "https://github.com/crouvpony47/furdown/releases";
if (hasUpdates && Form.ActiveForm != null && Form.ActiveForm.Visible)
{
var dlgResult = MessageBox.Show("A newer version of furdown is available, would you like to download it?",
"Update Available",
MessageBoxButtons.YesNo);
if (dlgResult == DialogResult.Yes)
{
try
{
System.Diagnostics.Process.Start(urlToOpen);
}
catch (Exception)
{
Console.WriteLine("Could not open URL in the default browser:\n" + urlToOpen);
}
}
}
}

private async void authWebBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e)
Expand Down
23 changes: 1 addition & 22 deletions src/taskForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,34 +52,13 @@ private void applyNSaveBtn_Click(object sender, EventArgs e)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void taskForm_Shown(object sender, EventArgs e)
private void taskForm_Shown(object sender, EventArgs e)
{
downloadPathBox.Text = GlobalSettings.Settings.downloadPath;
systemPathBox.Text = GlobalSettings.Settings.systemPath;
filenameTemplateBox.Text = GlobalSettings.Settings.filenameTemplate;
descrFilenameBox.Text = GlobalSettings.Settings.descrFilenameTemplate;
neverDownloadTwiceCheckBox.Checked = GlobalSettings.Settings.downloadOnlyOnce;

// ceck for updates
bool hasUpdates = await UpdatesChecker.CheckRemoteVersion();
const string urlToOpen = "https://github.com/crouvpony47/furdown/releases";
if (hasUpdates && Visible)
{
var dlgResult = MessageBox.Show("A newer version of furdown is available, would you like to download it?",
"Update Available",
MessageBoxButtons.YesNo);
if (dlgResult == DialogResult.Yes)
{
try
{
System.Diagnostics.Process.Start(urlToOpen);
}
catch (Exception)
{
Console.WriteLine("Could not open URL in the default browser:\n" + urlToOpen);
}
}
}
}

private async void galleryDownloadBtn_Click(object sender, EventArgs e)
Expand Down

0 comments on commit 9328357

Please sign in to comment.