Skip to content

Commit

Permalink
Some fixes + bump to 2.261
Browse files Browse the repository at this point in the history
  • Loading branch information
murrty authored Aug 5, 2021
1 parent 7d5e499 commit 5f2f9b2
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 10 deletions.
4 changes: 2 additions & 2 deletions App.config
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
<applicationSettings>
<youtube_dl_gui.Properties.Settings>
<setting name="CurrentVersion" serializeAs="String">
<value>2.26</value>
<value>2.261</value>
</setting>
<setting name="LastDebugDate" serializeAs="String">
<value>2021-08-02</value>
Expand All @@ -630,7 +630,7 @@
<value>False</value>
</setting>
<setting name="BetaVersion" serializeAs="String">
<value>2.26-pre4</value>
<value>2.261-pre4</value>
</setting>
</youtube_dl_gui.Properties.Settings>
</applicationSettings>
Expand Down
1 change: 1 addition & 0 deletions Classes/ErrorLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static void ReportWebException(WebException WebException, string WebsiteA
using (frmException ExceptionDisplay = new frmException()) {
ExceptionDisplay.ReportedWebException = WebException;
ExceptionDisplay.FromLanguage = false;
ExceptionDisplay.WebAddress = WebsiteAddress;

switch (WebException.Status) {
#region NameResolutionFailure
Expand Down
37 changes: 37 additions & 0 deletions Classes/UpdateChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ public static void CheckForUpdate(bool ForceCheck = false) {
}
}
}
else if (string.IsNullOrWhiteSpace(LatestReleaseVersion)) {
switch (MessageBox.Show("The git version returned null/whitespace, which means it didn't properly check. Would you like to manually check?", "youtube-dl-gui", MessageBoxButtons.YesNo)) {
case DialogResult.Yes:
Process.Start(string.Format(GitData.GitLinks.GithubRepoUrl + "/releases/latest", "murrty", "youtube-dl-gui"));
break;
}
}
else if (ForceCheck) {
MessageBox.Show("No updates available.");
}
Expand Down Expand Up @@ -316,6 +323,16 @@ private static decimal GetGitVersion() {
}

}
catch (WebException WebEx) {
ErrorLog.ReportWebException(WebEx,
string.Format(
GitData.GitLinks.GithubLatestJson,
"murrty",
"youtube-dl-gui"
)
);
return -1;
}
catch (Exception ex) {
ErrorLog.ReportException(ex);
return -1;
Expand Down Expand Up @@ -345,6 +362,16 @@ private static string GetGitLatestReleaseString() {
return GitData.UpdateVersion;

}
catch (WebException WebEx) {
ErrorLog.ReportWebException(WebEx,
string.Format(
GitData.GitLinks.GithubLatestJson,
"murrty",
"youtube-dl-gui"
)
);
return null;
}
catch (Exception ex) {
ErrorLog.ReportException(ex);
return null;
Expand Down Expand Up @@ -380,6 +407,16 @@ private static string GetYoutubeDlVersion(int GitID) {
return GitData.YoutubeDlVersion;
}
}
catch (WebException WebEx) {
ErrorLog.ReportWebException(WebEx,
string.Format(
GitData.GitLinks.GithubLatestJson,
GitData.GitLinks.Users[((int)GitID)],
GitData.GitLinks.Repos[((int)GitID)]
)
);
return null;
}
catch (Exception ex) {
ErrorLog.ReportException(ex);
return null;
Expand Down
4 changes: 3 additions & 1 deletion Forms/frmDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ private void BeginDownload() {
}
case DownloadType.Custom: {
rtbConsoleOutput.AppendText("Custom was requested, skipping quality + format");
ArgumentsBuffer += " " + CurrentDownload.DownloadArguments;
if (!string.IsNullOrWhiteSpace(CurrentDownload.DownloadArguments)) {
ArgumentsBuffer += " " + CurrentDownload.DownloadArguments;
}
break;
}
default: {
Expand Down
2 changes: 1 addition & 1 deletion Forms/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ private void btnYtdlVersion_Click(object sender, EventArgs e) {
}
private void btnDebugCheckVerification_Click(object sender, EventArgs e) {
MessageBox.Show(
"Youtube-DL Path: " + verif.YoutubeDlPath + "\r\nYotuube-DL Version: " + verif.YoutubeDlVersion + "\r\n\r\n" +
"Youtube-DL Path: " + verif.YoutubeDlPath + "\r\nYoutube-DL Version: " + verif.YoutubeDlVersion + "\r\n\r\n" +
"FFmpeg Path: " + verif.FFmpegPath + "\r\n\r\n" +
"AtomicParlsey Path: " + verif.AtomicParsleyPath
);
Expand Down
4 changes: 2 additions & 2 deletions Forms/frmSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ private void llbSettingsDownloadsYtdlTypeViewRepo_LinkClicked(object sender, Lin
Process.Start(
string.Format(
GitData.GitLinks.GithubRepoUrl,
GitData.GitLinks.Users[cbSettingsDownloadsUpdatingYtdlType.SelectedIndex + 1],
GitData.GitLinks.Repos[cbSettingsDownloadsUpdatingYtdlType.SelectedIndex + 1]
GitData.GitLinks.Users[cbSettingsDownloadsUpdatingYtdlType.SelectedIndex],
GitData.GitLinks.Repos[cbSettingsDownloadsUpdatingYtdlType.SelectedIndex]
)
);
}
Expand Down
4 changes: 2 additions & 2 deletions Properties/Settings.Designer.cs

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

4 changes: 2 additions & 2 deletions Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Profiles />
<Settings>
<Setting Name="CurrentVersion" Type="System.Decimal" Scope="Application">
<Value Profile="(Default)">2.26</Value>
<Value Profile="(Default)">2.261</Value>
</Setting>
<Setting Name="firstTime" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
Expand All @@ -18,7 +18,7 @@
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="BetaVersion" Type="System.String" Scope="Application">
<Value Profile="(Default)">2.26-pre4</Value>
<Value Profile="(Default)">2.261-pre4</Value>
</Setting>
<Setting Name="SkippedBetaVersion" Type="System.String" Scope="User">
<Value Profile="(Default)" />
Expand Down

0 comments on commit 5f2f9b2

Please sign in to comment.