Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed Jun 22, 2022
1 parent 7f3491e commit fd22da7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
13 changes: 6 additions & 7 deletions TVRename/Settings/TVSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions TVRename/TVRename.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<LangVersion>9.0</LangVersion>
<NullableContextOptions>enable</NullableContextOptions>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
Expand Down Expand Up @@ -55,7 +56,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -67,7 +67,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<StartupObject>TVRename.App.Program</StartupObject>
Expand Down
4 changes: 2 additions & 2 deletions TVRename/TVRename/PossibleNewMovie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fd22da7

Please sign in to comment.