From fd22da7684353ac35558fbfef38ca96ac8a9adcb Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 22 Jun 2022 13:46:08 +0800 Subject: [PATCH] tweak --- TVRename/Settings/TVSettings.cs | 13 ++++++------- TVRename/TVRename.csproj | 3 +-- TVRename/TVRename/PossibleNewMovie.cs | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/TVRename/Settings/TVSettings.cs b/TVRename/Settings/TVSettings.cs index 8fdb09dc..4f927bfe 100644 --- a/TVRename/Settings/TVSettings.cs +++ b/TVRename/Settings/TVSettings.cs @@ -1209,14 +1209,13 @@ public bool KeepTogetherFilesWithType(string fileExtension) return false; } - switch (keepTogetherMode) + return keepTogetherMode switch { - case KeepTogetherModes.All: return true; - case KeepTogetherModes.Just: return keepTogetherExtensionsArray.Contains(fileExtension); - case KeepTogetherModes.AllBut: return !keepTogetherExtensionsArray.Contains(fileExtension); - default: - throw new ArgumentOutOfRangeException(); - } + KeepTogetherModes.All => true, + KeepTogetherModes.Just => keepTogetherExtensionsArray.Contains(fileExtension), + KeepTogetherModes.AllBut => !keepTogetherExtensionsArray.Contains(fileExtension), + _ => throw new ArgumentOutOfRangeException() + }; } public class TidySettings diff --git a/TVRename/TVRename.csproj b/TVRename/TVRename.csproj index c45ffdbe..77dea1fa 100644 --- a/TVRename/TVRename.csproj +++ b/TVRename/TVRename.csproj @@ -28,6 +28,7 @@ 9.0 + enable true publish\ true @@ -55,7 +56,6 @@ true AnyCPU false - latest pdbonly @@ -67,7 +67,6 @@ true AnyCPU false - latest TVRename.App.Program diff --git a/TVRename/TVRename/PossibleNewMovie.cs b/TVRename/TVRename/PossibleNewMovie.cs index 684ef758..6300502f 100644 --- a/TVRename/TVRename/PossibleNewMovie.cs +++ b/TVRename/TVRename/PossibleNewMovie.cs @@ -285,9 +285,9 @@ private static (string hint, int? year) GuessShowName(string refinedHint) { refinedHint = FinderHelper.RemoveSceneTerms(refinedHint.CompareName()); - (refinedHint, int? possibleYear) = FinderHelper.SplitIntoTitleYear(refinedHint); + (string newRefinedHint, int? possibleYear) = FinderHelper.SplitIntoTitleYear(refinedHint); - return (refinedHint.CompareName(), possibleYear); + return (newRefinedHint.CompareName(), possibleYear); } public TVDoc.ProviderType Provider => SourceProvider;