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:
parent
a5a02ce90e
commit
b29efa5823
@ -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)
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user