Address comments
This commit is contained in:
parent
851dda097e
commit
a273ed9a57
|
@ -93,7 +93,7 @@ namespace Emby.Naming.Video
|
||||||
year = cleanDateTimeResult.Year;
|
year = cleanDateTimeResult.Year;
|
||||||
|
|
||||||
if (extraResult.ExtraType == null
|
if (extraResult.ExtraType == null
|
||||||
&& TryCleanString(cleanDateTimeResult.Name, out ReadOnlySpan<char> newName))
|
&& TryCleanString(name, out ReadOnlySpan<char> newName))
|
||||||
{
|
{
|
||||||
name = newName.ToString();
|
name = newName.ToString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Collections;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Emby.Naming.Common;
|
using Emby.Naming.Common;
|
||||||
using Emby.Naming.Video;
|
using Emby.Naming.Video;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
@ -11,9 +10,7 @@ namespace Jellyfin.Naming.Tests.Video
|
||||||
{
|
{
|
||||||
private readonly NamingOptions _namingOptions = new NamingOptions();
|
private readonly NamingOptions _namingOptions = new NamingOptions();
|
||||||
|
|
||||||
private class ResolveFileTestData : IEnumerable<object[]>
|
public static IEnumerable<object[]> GetResolveFileTestData()
|
||||||
{
|
|
||||||
public IEnumerator<object[]> GetEnumerator()
|
|
||||||
{
|
{
|
||||||
yield return new object[]
|
yield return new object[]
|
||||||
{
|
{
|
||||||
|
@ -179,11 +176,9 @@ namespace Jellyfin.Naming.Tests.Video
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[ClassData(typeof(ResolveFileTestData))]
|
[MemberData(nameof(GetResolveFileTestData))]
|
||||||
public void ResolveFile_ValidFileName_Success(VideoFileInfo expectedResult)
|
public void ResolveFile_ValidFileName_Success(VideoFileInfo expectedResult)
|
||||||
{
|
{
|
||||||
var result = new VideoResolver(_namingOptions).ResolveFile(expectedResult.Path);
|
var result = new VideoResolver(_namingOptions).ResolveFile(expectedResult.Path);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user