mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 10:32:35 +01:00
something!
This commit is contained in:
parent
6a10382e7b
commit
d1a4c7c942
@ -181,6 +181,7 @@
|
||||
<Compile Include="ProviderTests\RecycleBinProviderTests\DeleteDirectoryFixture.cs" />
|
||||
<Compile Include="NotificationTests\PlexProviderTest.cs" />
|
||||
<Compile Include="Housekeeping\Housekeepers\CleanupOrphanedEpisodesFixture.cs" />
|
||||
<Compile Include="ThingiProvider\ProviderBaseFixture.cs" />
|
||||
<Compile Include="TvTests\RefreshEpisodeServiceFixture.cs" />
|
||||
<Compile Include="TvTests\EpisodeProviderTests\HandleEpisodeFileDeletedFixture.cs" />
|
||||
<Compile Include="TvTests\EpisodeRepositoryTests\FindEpisodeFixture.cs" />
|
||||
|
23
NzbDrone.Core.Test/ThingiProvider/ProviderBaseFixture.cs
Normal file
23
NzbDrone.Core.Test/ThingiProvider/ProviderBaseFixture.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Test.Datastore;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
|
||||
namespace NzbDrone.Core.Test.ThingiProvider
|
||||
{
|
||||
|
||||
public class ProviderRepositoryFixture : DbTest<DownloadProviderRepository, DownloadProviderModel>
|
||||
{
|
||||
[Test]
|
||||
public void should_read_write_download_provider()
|
||||
{
|
||||
var model = new DownloadProviderModel();
|
||||
|
||||
model.Config = new DownloadProviderConfig();
|
||||
|
||||
//Subject.Insert(new )
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -416,6 +416,7 @@
|
||||
<Compile Include="Parser\Parser.cs" />
|
||||
<Compile Include="Parser\ParsingService.cs" />
|
||||
<Compile Include="Parser\QualityParser.cs" />
|
||||
<Compile Include="ThingiProvider\ProviderBase.cs" />
|
||||
<Compile Include="Qualities\QualityProfileInUseException.cs" />
|
||||
<Compile Include="Qualities\QualitySizeRepository.cs" />
|
||||
<Compile Include="Qualities\QualityProfileRepository.cs" />
|
||||
|
49
NzbDrone.Core/ThingiProvider/ProviderBase.cs
Normal file
49
NzbDrone.Core/ThingiProvider/ProviderBase.cs
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
namespace NzbDrone.Core.ThingiProvider
|
||||
{
|
||||
|
||||
|
||||
public class DownloadProviderRepository : BasicRepository<DownloadProviderModel>
|
||||
{
|
||||
public DownloadProviderRepository(IDatabase database, IEventAggregator eventAggregator)
|
||||
: base(database, eventAggregator)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class DownloadProviderModel : Provider<DownloadProviderConfig>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class DownloadProviderConfig : ProviderSetting
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public abstract class Provider<TSettings> : ModelBase
|
||||
where TSettings : ProviderSetting
|
||||
{
|
||||
public string Implementation { get; set; }
|
||||
public TSettings Config { get; set; }
|
||||
}
|
||||
|
||||
public abstract class ProviderSetting : IEmbeddedDocument
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public abstract class ProviderBase<TSettings> where TSettings : ProviderSetting
|
||||
{
|
||||
public TSettings Settings { get; private set; }
|
||||
|
||||
public void LoadSettings(TSettings setting)
|
||||
{
|
||||
Settings = setting;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user