1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Importing "Backup_tvdbid" encrypted filenames

This commit is contained in:
Mark McDowall 2014-12-01 18:27:53 -08:00
parent 1e8c2a6a12
commit 867746a763
3 changed files with 12 additions and 1 deletions

View File

@ -44,6 +44,13 @@ public class HashedReleaseFixture : CoreTest
"weeds",
"DVD",
"NZBgeek"
},
new object[]
{
@"C:\Test\Deadwood.S02E12.1080p.BluRay.x264-SONARR\Backup_72023S02-12".AsOsAgnostic(),
"deadwood",
"Bluray-1080p",
"SONARR"
}
};

View File

@ -93,6 +93,7 @@ public class SingleEpisodeParserFixture : CoreTest
[TestCase("NCIS.S010E16.720p.HDTV.X264-DIMENSION", "NCIS", 10, 16)]
[TestCase("[ www.Torrenting.com ] - Revolution.2012.S02E17.720p.HDTV.X264-DIMENSION", "Revolution2012", 2, 17)]
[TestCase("Revolution.2012.S02E18.720p.HDTV.X264-DIMENSION.mkv", "Revolution2012", 2, 18)]
[TestCase("Backup_72023S02-12.mkv", "Backup_72023", 2, 12)]
//[TestCase("", "", 0, 0)]
public void should_parse_single_episode(string postTitle, string title, int seasonNumber, int episodeNumber)
{

View File

@ -129,7 +129,10 @@ public static class Parser
new Regex(@"^[a-z0-9]{24}$", RegexOptions.Compiled),
// Format seen on some NZBGeek releases
new Regex(@"^[A-Z]{11}\d{3}$", RegexOptions.Compiled)
new Regex(@"^[A-Z]{11}\d{3}$", RegexOptions.Compiled),
//Backup filename (Unknown origins)
new Regex(@"^Backup_\d{5,}S\d{2}-\d{2}$", RegexOptions.Compiled)
};
//Regex to detect whether the title was reversed.