Skip to content

Commit

Permalink
Title cleaner optimization. for cleaning text with brackets, usually …
Browse files Browse the repository at this point in the history
…found in game names.
  • Loading branch information
DineshSolanki committed Aug 8, 2021
1 parent b3a94db commit d633ae1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions FoliCon/FoliCon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyName>FoliCon</AssemblyName>
<Version>3.6.0</Version>
<Version>3.6.1</Version>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<!--<PublishTrimmed>true</PublishTrimmed>-->
<ApplicationIcon>Resources\folicon Icon.ico</ApplicationIcon>
<LangVersion>preview</LangVersion>
<PackageVersion>3.6.0</PackageVersion>
<AssemblyVersion>3.6.0.0</AssemblyVersion>
<PackageVersion>3.6.1</PackageVersion>
<AssemblyVersion>3.6.1.0</AssemblyVersion>
<Company>Dinesh Solanki</Company>
<Description>Creates Folder icons for Movies, Serials, Music, and Games Folders
dineshsolanki.github.io/folicon/</Description>
Expand Down
3 changes: 2 additions & 1 deletion FoliCon/Modules/TitleCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public static string Clean(string title)
// p?i? \)? --Not needed. To emphasize removal of 1080i, closing bracket etc, but not needed due to the last part
// .* --Remove all trailing information after having found year or resolution as junk usually follows
var cleanTitle = Regex.Replace(normalizedTitle, "\\s*\\(?((\\d{4})|(420)|(720)|(1080))p?i?\\)?.*", "", RegexOptions.IgnoreCase | RegexOptions.Compiled);
cleanTitle = Regex.Replace(cleanTitle, " {2,}", " ");
cleanTitle = Regex.Replace(cleanTitle, @"\[.*\]", "", RegexOptions.IgnoreCase | RegexOptions.Compiled);
cleanTitle = Regex.Replace(cleanTitle, " {2,}", " ", RegexOptions.IgnoreCase | RegexOptions.Compiled);
return string.IsNullOrWhiteSpace(cleanTitle) ? normalizedTitle : cleanTitle;
}
}
Expand Down
2 changes: 1 addition & 1 deletion FoliCon/ViewModels/AboutBoxViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace FoliCon.ViewModels
{
public class AboutBoxViewModel : BindableBase, IDialogAware
{
private string _title = "Folicon v3.6";
private string _title = "Folicon v3.6.1";
private string _logo = "/Resources/folicon Icon.png";

private string _description = LangProvider.GetLang("FoliConDescription");
Expand Down

0 comments on commit d633ae1

Please sign in to comment.