Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
FirstTime is set to false when creating the settings if portable is being used
Introduced pre-release versioning which will identify the branch
a thing in the settings form now anchors properly
  • Loading branch information
murrty authored Jan 2, 2021
1 parent d7eda37 commit 1cb47cc
Show file tree
Hide file tree
Showing 12 changed files with 217 additions and 189 deletions.
23 changes: 16 additions & 7 deletions App.config
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@
<setting name="SettingsFormSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="FileNameSchemaHistory" serializeAs="String">
<value>%(title)s-%(id)s.%(ext)s|%(uploader)s\(%(playlist_index)s) %(title)s-%(id)s.%(ext)s</value>
</setting>
</youtube_dl_gui.Saved>
<youtube_dl_gui.Converter>
<setting name="detectFiletype" serializeAs="String">
Expand Down Expand Up @@ -309,6 +312,9 @@
<setting name="AutomaticallyDownloadFromProtocol" serializeAs="String">
<value>True</value>
</setting>
<setting name="PreferFFmpeg" serializeAs="String">
<value>True</value>
</setting>
</youtube_dl_gui.Downloads>
<youtube_dl_gui.General>
<setting name="UseStaticYtdl" serializeAs="String">
Expand Down Expand Up @@ -343,28 +349,31 @@
<setting name="firstTime" serializeAs="String">
<value>True</value>
</setting>
<setting name="jsonSupport" serializeAs="String">
<value>True</value>
</setting>
<setting name="debugDate" serializeAs="String">
<value>2020-11-05</value>
</setting>
<setting name="SkippedVersion" serializeAs="String">
<value>-1</value>
</setting>
<setting name="YoutubeDlVersion" serializeAs="String">
<value />
</setting>
<setting name="BetaVersion" serializeAs="String">
<value>2.26-pre2</value>
</setting>
</youtube_dl_gui.Properties.Settings>
</userSettings>
<applicationSettings>
<youtube_dl_gui.Properties.Settings>
<setting name="appVersion" serializeAs="String">
<value>2.26</value>
<value>2.252</value>
</setting>
<setting name="stubVersion" serializeAs="String">
<value>1</value>
</setting>
<setting name="debugDate" serializeAs="String">
<value>2020-12-31</value>
</setting>
<setting name="IsBetaVersion" serializeAs="String">
<value>True</value>
</setting>
</youtube_dl_gui.Properties.Settings>
</applicationSettings>
</configuration>
2 changes: 1 addition & 1 deletion Classes/CheckSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public static void SavePortableSettings() {
#endregion
}
public static void CreatePortableSettings() {
Ini.WriteBool("FirstTime", true, "youtube-dl-gui");
Ini.WriteBool("FirstTime", false, "youtube-dl-gui");
Ini.WriteString("downloadPath", Downloads.Default.downloadPath, "Downloads");
}
}
Expand Down
7 changes: 6 additions & 1 deletion Forms/frmAbout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ private void LoadLanguage() {
this.Text = string.Format("{0} youtube-dl-gui", lang.frmAbout);
}
private void frmAbout_Shown(object sender, EventArgs e) {
lbVersion.Text = "v" + Properties.Settings.Default.appVersion.ToString();
if (Properties.Settings.Default.IsBetaVersion) {
lbVersion.Text = "v" + Properties.Settings.Default.BetaVersion;
}
else {
lbVersion.Text = "v" + Properties.Settings.Default.appVersion.ToString();
}
}

private void llbCheckForUpdates_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
Expand Down
11 changes: 9 additions & 2 deletions Forms/frmException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ private void frmError_Load(object sender, EventArgs e) {
Exception = "An exception occured, but it didn't parse properly.\nCreate a new issue and tell me how you got here.";
}

string outputBuffer = "Feel free to copy + paste this entire text wall into a new issue on Github\n\nVersion: " + Properties.Settings.Default.appVersion + "\n" + Exception;
string outputBuffer = "Feel free to copy + paste this entire text wall into a new issue on Github\n\nVersion: {0}\n" + Exception;
if (Properties.Settings.Default.IsBetaVersion) {
outputBuffer = string.Format(outputBuffer, Properties.Settings.Default.BetaVersion);
lbVersion.Text = "v" + Properties.Settings.Default.BetaVersion;
}
else {
outputBuffer = string.Format(outputBuffer, Properties.Settings.Default.appVersion.ToString());
lbVersion.Text = "v" + Properties.Settings.Default.appVersion.ToString();
}
rtbExceptionDetails.Text = outputBuffer;
lbVersion.Text = "v" + Properties.Settings.Default.appVersion.ToString();
System.Media.SystemSounds.Hand.Play();
}

Expand Down
Loading

0 comments on commit 1cb47cc

Please sign in to comment.