- Get rid of `IServiceLocatorProxy` - Get rid of `ICompositionRoot` In addition, all unit tests avoid using `BaseCommand` directly, as it does its own composition root setup and overrides the IntegrationFixture test setup.pull/139/head
parent
88bdc5a92e
commit
835aae860b
@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "Optionals",
|
||||
"trash_id": "76e060895c5b8a765c310933da0a5357",
|
||||
"ignored": [{
|
||||
"name": "Golden rule",
|
||||
"trash_id": "cec8880b847dd5d31d29167ee0112b57",
|
||||
"term": "/^(?=.*(1080|720))(?=.*((x|h)[ ._-]?265|hevc)).*/i"
|
||||
}, {
|
||||
"name": "Ignore Dolby Vision without HDR10 fallback.",
|
||||
"trash_id": "436f5a7d08fbf02ba25cb5e5dfe98e55",
|
||||
"term": "/^(?!.*(HDR|HULU|REMUX))(?=.*\\b(DV|Dovi|Dolby[- .]?Vision)\\b).*/i"
|
||||
}, {
|
||||
"name": "Ignore The Group -SCENE",
|
||||
"trash_id": "f3f0f3691c6a1988d4a02963e69d11f2",
|
||||
"term": "/\\b(-scene)\\b/i"
|
||||
}, {
|
||||
"name": "Ignore so called scene releases",
|
||||
"trash_id": "5bc23c3a055a1a5d8bbe4fb49d80e0cb",
|
||||
"term": "/^(?!.*(web[ ]dl|-deflate|-inflate))(?=.*([_. ]WEB[_. ]|-CAKES\\b|-GGEZ\\b|-GGWP\\b|-GLHF\\b|-GOSSIP\\b|-KOGI\\b|-PECULATE\\b)).*/i"
|
||||
}, {
|
||||
"name": "Dislike Bad Dual Audio Groups",
|
||||
"trash_id": "538bad00ee6f8aced8e0db5218b8484c",
|
||||
"term": "/\\b(-alfaHD|-BAT|-BNd|-C\\.A\\.A|-Cory|-FF|-FOXX|-G4RiS|-GUEIRA|-N3G4N|-PD|-RiPER|-RK|-SiGLA|-Tars|-WTV|-Yatogam1|-YusukeFLA)\\b/i"
|
||||
}],
|
||||
"required": [],
|
||||
"preferred": [{
|
||||
"score": 15,
|
||||
"terms": [{
|
||||
"name": "Prefer Season Packs",
|
||||
"trash_id": "ea83f4740cec4df8112f3d6dd7c82751",
|
||||
"term": "/\\bS\\d+\\b(?!E\\d+\\b)/i"
|
||||
}]
|
||||
}, {
|
||||
"score": 10,
|
||||
"terms": [{
|
||||
"name": "Prefer HDR",
|
||||
"trash_id": "bc7a6383cbe88c3ee2d6396e1aacc0b3",
|
||||
"term": "/\\bHDR(\\b|\\d)/i"
|
||||
}]
|
||||
}, {
|
||||
"score": 100,
|
||||
"terms": [{
|
||||
"name": "Prefer Dolby Vision",
|
||||
"trash_id": "fa47da3377076d82d07c4e95b3f13d07",
|
||||
"term": "/\\b(dv|dovi|dolby[ .]?vision)\\b/i"
|
||||
}]
|
||||
}, {
|
||||
"score": -25,
|
||||
"terms": [{
|
||||
"name": "Dislike retags: rartv, rarbg, eztv, TGx",
|
||||
"trash_id": "6f2aefa61342a63387f2a90489e90790",
|
||||
"term": "/(\\[rartv\\]|\\[rarbg\\]|\\[eztv\\]|\\[TGx\\])/i"
|
||||
}, {
|
||||
"name": "Dislike retagged groups",
|
||||
"trash_id": "19cd5ecc0a24bf493a75e80a51974cdd",
|
||||
"term": "/(-4P|-4Planet|-AsRequested|-BUYMORE|-CAPTCHA|-Chamele0n|-GEROV|-iNC0GNiTO|-NZBGeek|-Obfuscated|-postbot|-Rakuv|-Scrambled|-WhiteRev|-WRTEAM|-xpost)\\b/i"
|
||||
}, {
|
||||
"name": "Dislike release ending: en",
|
||||
"trash_id": "6a7b462c6caee4a991a9d8aa38ce2405",
|
||||
"term": "/\\s?\\ben\\b$/i"
|
||||
}, {
|
||||
"name": "Dislike release containing: 1-",
|
||||
"trash_id": "236a3626a07cacf5692c73cc947bc280",
|
||||
"term": "/(?<!\\d\\.)(1-.+)$/i"
|
||||
}]
|
||||
}]
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
using Autofac;
|
||||
|
||||
namespace Recyclarr;
|
||||
|
||||
public interface ICompositionRoot
|
||||
{
|
||||
IServiceLocatorProxy Setup(Action<ContainerBuilder>? extraRegistrations = null);
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
using Autofac;
|
||||
|
||||
namespace Recyclarr;
|
||||
|
||||
/// <remarks>
|
||||
/// This class exists to make unit testing easier. Many methods for ILifetimeScope are extension
|
||||
/// methods and make unit testing more difficult.
|
||||
/// This class wraps Autofac to make it more
|
||||
/// "mockable".
|
||||
/// </remarks>
|
||||
public interface IServiceLocatorProxy : IDisposable
|
||||
{
|
||||
ILifetimeScope Container { get; }
|
||||
T Resolve<T>() where T : notnull;
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
using Autofac;
|
||||
|
||||
namespace Recyclarr;
|
||||
|
||||
public sealed class ServiceLocatorProxy : IServiceLocatorProxy
|
||||
{
|
||||
public ServiceLocatorProxy(ILifetimeScope container)
|
||||
{
|
||||
Container = container;
|
||||
}
|
||||
|
||||
public ILifetimeScope Container { get; }
|
||||
|
||||
public T Resolve<T>() where T : notnull
|
||||
{
|
||||
return Container.Resolve<T>();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Container.Dispose();
|
||||
}
|
||||
}
|
Loading…
Reference in new issue