1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-17 10:45:49 +02:00

Fixed: Release group will not contain file extension

This commit is contained in:
Mark McDowall 2013-12-25 23:16:13 -08:00
parent a5a02ce90e
commit b29efa5823
3 changed files with 11 additions and 2 deletions

View File

@ -16,13 +16,11 @@ public class AuthenticationService : IAuthenticationService
private readonly IConfigFileProvider _configFileProvider;
private static readonly NzbDroneUser AnonymousUser = new NzbDroneUser { UserName = "Anonymous" };
public AuthenticationService(IConfigFileProvider configFileProvider)
{
_configFileProvider = configFileProvider;
}
public IUserIdentity Validate(string username, string password)
{
if (!Enabled)

View File

@ -474,5 +474,13 @@ public void parse_releaseGroup(string title, string expected)
{
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
}
[Test]
public void should_not_include_extension_in_releaseGroup()
{
const string path = @"C:\Test\Doctor.Who.2005.s01e01.internal.bdrip.x264-archivist.mkv";
Parser.Parser.ParsePath(path).ReleaseGroup.Should().Be("archivist");
}
}
}

View File

@ -129,8 +129,11 @@ public static ParsedEpisodeInfo ParsePath(string path)
if (result == null)
{
Logger.Warn("Unable to parse episode info from path {0}", path);
return null;
}
result.ReleaseGroup = ParseReleaseGroup(fileInfo.Name.Replace(fileInfo.Extension, ""));
return result;
}