mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Remove provider status on provider deletion
(cherry picked from commit f45713bff815b2a49a5cdad4afe62a53bbdf6a6e)
This commit is contained in:
@@ -8,6 +8,7 @@ namespace NzbDrone.Core.ThingiProvider.Status
|
||||
where TModel : ProviderStatusBase, new()
|
||||
{
|
||||
TModel FindByProviderId(int providerId);
|
||||
void DeleteByProviderId(int providerId);
|
||||
}
|
||||
|
||||
public class ProviderStatusRepository<TModel> : BasicRepository<TModel>, IProviderStatusRepository<TModel>
|
||||
@@ -22,5 +23,10 @@ namespace NzbDrone.Core.ThingiProvider.Status
|
||||
{
|
||||
return Query(c => c.ProviderId == providerId).SingleOrDefault();
|
||||
}
|
||||
|
||||
public void DeleteByProviderId(int providerId)
|
||||
{
|
||||
Delete(c => c.ProviderId == providerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user