mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Basic Application Syncing
This commit is contained in:
37
src/NzbDrone.Core/Applications/AppIndexerMapService.cs
Normal file
37
src/NzbDrone.Core/Applications/AppIndexerMapService.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace NzbDrone.Core.Applications
|
||||
{
|
||||
public interface IAppIndexerMapService
|
||||
{
|
||||
List<AppIndexerMap> GetMappingsForApp(int appId);
|
||||
AppIndexerMap Insert(AppIndexerMap appIndexerMap);
|
||||
void DeleteAllForApp(int appId);
|
||||
}
|
||||
|
||||
public class AppIndexerMapService : IAppIndexerMapService
|
||||
{
|
||||
private readonly IAppIndexerMapRepository _appIndexerMapRepository;
|
||||
|
||||
public AppIndexerMapService(IAppIndexerMapRepository appIndexerMapRepository)
|
||||
{
|
||||
_appIndexerMapRepository = appIndexerMapRepository;
|
||||
}
|
||||
|
||||
public void DeleteAllForApp(int appId)
|
||||
{
|
||||
_appIndexerMapRepository.DeleteAllForApp(appId);
|
||||
}
|
||||
|
||||
public List<AppIndexerMap> GetMappingsForApp(int appId)
|
||||
{
|
||||
return _appIndexerMapRepository.GetMappingsForApp(appId);
|
||||
}
|
||||
|
||||
public AppIndexerMap Insert(AppIndexerMap appIndexerMap)
|
||||
{
|
||||
return _appIndexerMapRepository.Insert(appIndexerMap);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user