Basic Application Syncing

This commit is contained in:
Qstick
2020-10-22 14:00:04 -04:00
parent 47fbab02c5
commit feba96e8e0
16 changed files with 363 additions and 31 deletions
@@ -0,0 +1,30 @@
using System.Collections.Generic;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Messaging.Events;
namespace NzbDrone.Core.Applications
{
public interface IAppIndexerMapRepository : IBasicRepository<AppIndexerMap>
{
List<AppIndexerMap> GetMappingsForApp(int appId);
void DeleteAllForApp(int appId);
}
public class TagRepository : BasicRepository<AppIndexerMap>, IAppIndexerMapRepository
{
public TagRepository(IMainDatabase database, IEventAggregator eventAggregator)
: base(database, eventAggregator)
{
}
public void DeleteAllForApp(int appId)
{
Delete(x => x.AppId == appId);
}
public List<AppIndexerMap> GetMappingsForApp(int appId)
{
return Query(x => x.AppId == appId);
}
}
}