aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming
diff options
context:
space:
mode:
authorVasily <JustAMan@users.noreply.github.com>2020-01-21 13:21:24 +0300
committerGitHub <noreply@github.com>2020-01-21 13:21:24 +0300
commitf23434f4f7bc398830ad737c9460455ba0cf7745 (patch)
tree19869c48fe861eb6e3d01eae24c494a10edb6a02 /Emby.Naming
parent4abcbc66be2fa3d44067d5e4f1679b3f13b1ab3e (diff)
parent11c758b6bea2e15ac14b6b6975a5d2e83f55ae55 (diff)
Merge pull request #2299 from dkanada/testing
Fix a few more tests for music and episodes
Diffstat (limited to 'Emby.Naming')
-rw-r--r--Emby.Naming/Subtitles/SubtitleParser.cs3
-rw-r--r--Emby.Naming/TV/EpisodePathParser.cs2
2 files changed, 2 insertions, 3 deletions
diff --git a/Emby.Naming/Subtitles/SubtitleParser.cs b/Emby.Naming/Subtitles/SubtitleParser.cs
index 99680c622..b055b1a6c 100644
--- a/Emby.Naming/Subtitles/SubtitleParser.cs
+++ b/Emby.Naming/Subtitles/SubtitleParser.cs
@@ -31,7 +31,6 @@ namespace Emby.Naming.Subtitles
}
var flags = GetFlags(path);
-
var info = new SubtitleInfo
{
Path = path,
@@ -45,7 +44,7 @@ namespace Emby.Naming.Subtitles
// Should have a name, language and file extension
if (parts.Count >= 3)
{
- info.Language = parts[parts.Count - 2];
+ info.Language = parts[^2];
}
return info;
diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs
index 4fac543f9..6b557d2e1 100644
--- a/Emby.Naming/TV/EpisodePathParser.cs
+++ b/Emby.Naming/TV/EpisodePathParser.cs
@@ -131,7 +131,7 @@ namespace Emby.Naming.TV
var endingNumberGroup = match.Groups["endingepnumber"];
if (endingNumberGroup.Success)
{
- // Will only set EndingEpsiodeNumber if the captured number is not followed by additional numbers
+ // Will only set EndingEpisodeNumber if the captured number is not followed by additional numbers
// or a 'p' or 'i' as what you would get with a pixel resolution specification.
// 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;