2017-10-19 01:42:57 +00:00
|
|
|
using FluentAssertions;
|
2014-04-15 21:50:18 +00:00
|
|
|
using NUnit.Framework;
|
2014-12-15 18:04:55 +00:00
|
|
|
using NzbDrone.Core.Qualities;
|
2014-04-15 21:50:18 +00:00
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NzbDrone.Test.Common;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.ParserTests
|
|
|
|
{
|
|
|
|
[TestFixture]
|
|
|
|
public class HashedReleaseFixture : CoreTest
|
|
|
|
{
|
|
|
|
public static object[] HashedReleaseParserCases =
|
|
|
|
{
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Some.Hashed.Release.(256kbps)-Mercury\0e895c37245186812cb08aab1529cf8ee389dd05.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Some Hashed Release",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2014-04-15 21:50:18 +00:00
|
|
|
"Mercury"
|
|
|
|
},
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test-[256]\0e895c37245186812cb08aab1529cf8ee389dd05\Some.Hashed.Release.S01E01.720p.WEB-DL.AAC2.0.H.264-Mercury.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Some Hashed Release",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2014-04-15 21:50:18 +00:00
|
|
|
"Mercury"
|
2014-04-17 23:16:40 +00:00
|
|
|
},
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Fake.Dir.S01E01-Test\yrucreM-462.H.0.2CAA.LD-BEW.p027.10E10S.esaeleR.dehsaH.emoS.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Some Hashed Release",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2014-04-17 23:16:40 +00:00
|
|
|
"Mercury"
|
|
|
|
},
|
|
|
|
new object[]
|
2014-08-13 19:28:47 +00:00
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Fake.Dir.S01E01-Test\yrucreM-LN 1.5DD LD-BEW P0801 10E10S esaeleR dehsaH emoS.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Some Hashed Release",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2014-08-13 19:28:47 +00:00
|
|
|
"Mercury"
|
|
|
|
},
|
|
|
|
new object[]
|
2014-04-17 23:16:40 +00:00
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Weeds.S01E10.DVDRip.XviD-Lidarr\AHFMZXGHEWD660.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Weeds",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2017-03-30 03:49:38 +00:00
|
|
|
"Lidarr"
|
2014-12-02 02:27:53 +00:00
|
|
|
},
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Deadwood.S02E12.1080p.BluRay.x264-Lidarr\Backup_72023S02-12.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Deadwood",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2015-02-09 05:49:44 +00:00
|
|
|
null
|
2014-12-15 18:04:55 +00:00
|
|
|
},
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Grimm S04E08 Chupacabra 720p WEB-DL DD5 1 H 264-ECI\123.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Grimm",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2014-12-15 18:04:55 +00:00
|
|
|
"ECI"
|
2015-01-09 06:45:29 +00:00
|
|
|
},
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Grimm S04E08 Chupacabra 720p WEB-DL DD5 1 H 264-ECI\abc.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Grimm",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2015-01-09 06:45:29 +00:00
|
|
|
"ECI"
|
2015-01-10 05:59:06 +00:00
|
|
|
},
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\Grimm S04E08 Chupacabra 720p WEB-DL DD5 1 H 264-ECI\b00bs.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"Grimm",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2015-01-10 05:59:06 +00:00
|
|
|
"ECI"
|
2015-03-15 12:11:17 +00:00
|
|
|
},
|
|
|
|
new object[]
|
|
|
|
{
|
2017-05-08 02:07:19 +00:00
|
|
|
@"C:\Test\The.Good.Wife.S02E23.720p.HDTV.x264-NZBgeek/cgajsofuejsa501.mp3".AsOsAgnostic(),
|
2015-07-06 19:27:23 +00:00
|
|
|
"The Good Wife",
|
2017-07-03 18:39:06 +00:00
|
|
|
Quality.MP3_256,
|
2015-03-15 12:11:17 +00:00
|
|
|
"NZBgeek"
|
2014-04-15 21:50:18 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-01-03 12:49:24 +00:00
|
|
|
[Test]
|
|
|
|
[TestCaseSource(nameof(HashedReleaseParserCases))]
|
2017-12-24 05:34:21 +00:00
|
|
|
[Ignore("Hashed code is not currently called with track parsing")]
|
2014-12-15 18:04:55 +00:00
|
|
|
public void should_properly_parse_hashed_releases(string path, string title, Quality quality, string releaseGroup)
|
2014-04-15 21:50:18 +00:00
|
|
|
{
|
2017-10-19 01:42:57 +00:00
|
|
|
var result = Parser.Parser.ParseMusicPath(path);
|
2020-01-03 12:49:24 +00:00
|
|
|
|
2022-11-22 01:51:00 +00:00
|
|
|
// result.SeriesTitle.Should().Be(title);
|
2014-12-15 18:04:55 +00:00
|
|
|
result.Quality.Quality.Should().Be(quality);
|
2014-04-15 21:50:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|