aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/TV/EpisodePathParser.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Naming/TV/EpisodePathParser.cs')
-rw-r--r--Emby.Naming/TV/EpisodePathParser.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs
index 6b557d2e1..b97b3137b 100644
--- a/Emby.Naming/TV/EpisodePathParser.cs
+++ b/Emby.Naming/TV/EpisodePathParser.cs
@@ -1,5 +1,6 @@
#pragma warning disable CS1591
#pragma warning disable SA1600
+#nullable enable
using System;
using System.Collections.Generic;
@@ -28,7 +29,7 @@ namespace Emby.Naming.TV
path += ".mp4";
}
- EpisodePathParserResult result = null;
+ EpisodePathParserResult? result = null;
foreach (var expression in _options.EpisodeExpressions)
{
@@ -136,7 +137,7 @@ namespace Emby.Naming.TV
// It avoids erroneous parsing of something like "series-s09e14-1080p.mkv" as a multi-episode from E14 to E108
int nextIndex = endingNumberGroup.Index + endingNumberGroup.Length;
if (nextIndex >= name.Length
- || "0123456789iIpP".IndexOf(name[nextIndex]) == -1)
+ || !"0123456789iIpP".Contains(name[nextIndex], StringComparison.Ordinal))
{
if (int.TryParse(endingNumberGroup.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out num))
{