aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2020-09-17 10:58:21 +0100
committerGitHub <noreply@github.com>2020-09-17 10:58:21 +0100
commit4c6b60d69db57abf0c669a3ec918443d017fd0e5 (patch)
treecd428916406362e56881130b29023f74e347218e /Emby.Naming/AudioBook/AudioBookFilePathParser.cs
parent6bf0acb854683377bebad3ca27de17706519c420 (diff)
parentbc5404cd6f6cf1fcc90d014881cd52e2b4f80ebc (diff)
Merge pull request #73 from jellyfin/master
Updating from upstream
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;
}