Skip to content

Commit

Permalink
only add new fields during patching, if not already esist
Browse files Browse the repository at this point in the history
  • Loading branch information
t0815 committed Sep 14, 2024
1 parent dbf8036 commit 4469f2d
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 12 deletions.
2 changes: 1 addition & 1 deletion MyCBZ/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<applicationSettings>
<Win_CBZ.Win_CBZSettings>
<setting name="InstalledVersion" serializeAs="String">
<value>0.21.162b</value>
<value>0.21.163b</value>
</setting>
<setting name="RenamerPlaceholders" serializeAs="Xml">
<value>
Expand Down
36 changes: 34 additions & 2 deletions MyCBZ/Helper/FactoryDefaults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,44 @@ public static int PatchUserSettings(int lastVersion)
}
else
{
Win_CBZSettings.Default.CustomMetadataFields.Add(FactoryDefaults.DefaultMetaDataFieldTypes[index]);
bool doAdd = true;
for (userIndex = 0; userIndex < Win_CBZSettings.Default.CustomMetadataFields.Count; userIndex++)
{
string[] parts = Win_CBZSettings.Default.CustomMetadataFields[userIndex].Split('|');

if (parts[0].ToLower() == factParts[0].ToLower())
{
doAdd = false;
break;
}

}

if (doAdd)
{
Win_CBZSettings.Default.CustomMetadataFields.Add(FactoryDefaults.DefaultMetaDataFieldTypes[index]);
}
}
}
else
{
Win_CBZSettings.Default.CustomMetadataFields.Add(FactoryDefaults.DefaultMetaDataFieldTypes[index]);
bool doAdd = true;
for (userIndex = 0; userIndex < Win_CBZSettings.Default.CustomMetadataFields.Count; userIndex++)
{
string[] parts = Win_CBZSettings.Default.CustomMetadataFields[userIndex].Split('|');

if (parts[0].ToLower() == factParts[0].ToLower())
{
doAdd = false;
break;
}

}

if (doAdd)
{
Win_CBZSettings.Default.CustomMetadataFields.Add(FactoryDefaults.DefaultMetaDataFieldTypes[index]);
}
}

}
Expand Down
4 changes: 2 additions & 2 deletions MyCBZ/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.21.162")]
[assembly: AssemblyFileVersion("0.21.162")]
[assembly: AssemblyVersion("0.21.163")]
[assembly: AssemblyFileVersion("0.21.163")]
[assembly: NeutralResourcesLanguage("en")]
2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.Designer.cs

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

2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Value Profile="(Default)">%APPDATA%\WIN_CBZ\Temp\</Value>
</Setting>
<Setting Name="InstalledVersion" Type="System.String" Scope="Application">
<Value Profile="(Default)">0.21.162b</Value>
<Value Profile="(Default)">0.21.163b</Value>
</Setting>
<Setting Name="RenamerPlaceholders" Type="System.Collections.Specialized.StringCollection" Scope="Application">
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Microsoft Visual Studio [Community] 2022 (64-Bit)

## Latest Release

v0.21.162b released!
v0.21.163b released!


>[!IMPORTANT]
Expand Down
8 changes: 4 additions & 4 deletions Win_CBZ-Setup/Win_CBZ-Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Win_CBZ"
"ProductCode" = "8:{49C8199A-CE1C-4415-8023-7F9AF6F4A601}"
"PackageCode" = "8:{EB58C305-6518-4CC0-9673-9D4086A446AC}"
"ProductCode" = "8:{6C3F644F-35CB-4BB0-8FEB-AE7CDF504BF8}"
"PackageCode" = "8:{64C2FDE2-E0D2-4048-9F34-F7F80E0CBA65}"
"UpgradeCode" = "8:{66FAEF81-1CAE-4971-9E0F-796310EFEA5E}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.21.162"
"ProductVersion" = "8:0.21.163"
"Manufacturer" = "8:Trash_s0Ft"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down Expand Up @@ -808,7 +808,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1DAB07B3E40248E0B54293E16EE30178"
{
"SourcePath" = "8:..\\MyCBZ\\obj\\x64\\Debug\\net8.0-windows7.0\\apphost.exe"
"SourcePath" = "8:..\\MyCBZ\\obj\\x64\\Release\\net8.0-windows7.0\\apphost.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_381C2AC7AD384E1488C6014F95032920"
Expand Down

0 comments on commit 4469f2d

Please sign in to comment.