aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
diff options
context:
space:
mode:
authorJim Cartlidge <jimcartlidge@yahoo.co.uk>2020-09-14 16:01:23 +0100
committerJim Cartlidge <jimcartlidge@yahoo.co.uk>2020-09-14 16:01:23 +0100
commitb04aed2f5842f6dbdc07c5d8d44f04bb69e0896d (patch)
treec63f65a407736d436207f7ac2a12178a4aa10544 /Emby.Naming/AudioBook/AudioBookFilePathParser.cs
parentc1bfba90813b6780d43f82d4056496f5c776a186 (diff)
parent9183688cabc9b221abc0c2b7a64afd09203aaff2 (diff)
Merge remote-tracking branch 'upstream/master' into NetworkPR2
Diffstat (limited to 'Emby.Naming/AudioBook/AudioBookFilePathParser.cs')
-rw-r--r--Emby.Naming/AudioBook/AudioBookFilePathParser.cs17
1 files changed, 2 insertions, 15 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
index 3c874c62c..eb9393b0b 100644
--- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
+++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
@@ -50,27 +50,14 @@ namespace Emby.Naming.AudioBook
{
if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue))
{
- result.ChapterNumber = intValue;
+ result.PartNumber = intValue;
}
}
}
}
}
- /*var matches = _iRegexProvider.GetRegex("\\d+", RegexOptions.IgnoreCase).Matches(fileName);
- if (matches.Count > 0)
- {
- if (!result.ChapterNumber.HasValue)
- {
- result.ChapterNumber = int.Parse(matches[0].Groups[0].Value);
- }
-
- if (matches.Count > 1)
- {
- result.PartNumber = int.Parse(matches[matches.Count - 1].Groups[0].Value);
- }
- }*/
- result.Success = result.PartNumber.HasValue || result.ChapterNumber.HasValue;
+ result.Success = result.ChapterNumber.HasValue || result.PartNumber.HasValue;
return result;
}