f8b7c62f9e
Added Jellyfin.Database.Providers.Postgres project and integrated Npgsql packages for PostgreSQL support. Updated solution and test project references. Refactored code for clarity and performance, including improved string handling, log formatting, and plugin management. Enhanced .editorconfig rules and fixed minor test issues. Added publishing profiles and updated web server setup references. Cleaned up assembly info and cache files. Now able to successfully build solution
31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
// <copyright file="AbsoluteEpisodeNumberTests.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Naming.Tests.TV
|
|
{
|
|
using Emby.Naming.Common;
|
|
using Emby.Naming.TV;
|
|
using Xunit;
|
|
|
|
public class AbsoluteEpisodeNumberTests
|
|
{
|
|
private readonly EpisodeResolver _resolver = new EpisodeResolver(new NamingOptions());
|
|
|
|
[Theory]
|
|
[InlineData("The Simpsons/12.avi", 12)]
|
|
[InlineData("The Simpsons/The Simpsons 12.avi", 12)]
|
|
[InlineData("The Simpsons/The Simpsons 82.avi", 82)]
|
|
[InlineData("The Simpsons/The Simpsons 112.avi", 112)]
|
|
[InlineData("The Simpsons/Foo_ep_02.avi", 2)]
|
|
[InlineData("The Simpsons/The Simpsons 889.avi", 889)]
|
|
[InlineData("The Simpsons/The Simpsons 101.avi", 101)]
|
|
public void GetEpisodeNumberFromFileTest(string path, int episodeNumber)
|
|
{
|
|
var result = _resolver.Resolve(path, false, null, null, true);
|
|
|
|
Assert.Equal(episodeNumber, result?.EpisodeNumber);
|
|
}
|
|
}
|
|
}
|