mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
* Alter IMDb lists to what was requested: #697 * Update Pending Release * Tests (these need to be updated further) * Alter table migration, movieId already exists * Update HouseKeeping for pending release * Fix migratiom and pendingrelease housekeeping
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using NzbDrone.Core.Datastore;
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
namespace NzbDrone.Core.Download.Pending
|
|
{
|
|
public interface IPendingReleaseRepository : IBasicRepository<PendingRelease>
|
|
{
|
|
void DeleteBySeriesId(int seriesId);
|
|
List<PendingRelease> AllBySeriesId(int seriesId);
|
|
void DeleteByMovieId(int movieId);
|
|
List<PendingRelease> AllByMovieId(int movieId);
|
|
}
|
|
|
|
public class PendingReleaseRepository : BasicRepository<PendingRelease>, IPendingReleaseRepository
|
|
{
|
|
public PendingReleaseRepository(IMainDatabase database, IEventAggregator eventAggregator)
|
|
: base(database, eventAggregator)
|
|
{
|
|
}
|
|
|
|
public void DeleteBySeriesId(int seriesId)
|
|
{
|
|
Delete(r => r.SeriesId == seriesId);
|
|
}
|
|
|
|
public List<PendingRelease> AllBySeriesId(int seriesId)
|
|
{
|
|
return Query.Where(p => p.SeriesId == seriesId);
|
|
}
|
|
|
|
public void DeleteByMovieId(int movieId)
|
|
{
|
|
Delete(r => r.MovieId == movieId);
|
|
}
|
|
|
|
public List<PendingRelease> AllByMovieId(int movieId)
|
|
{
|
|
return Query.Where(p => p.MovieId == movieId);
|
|
}
|
|
}
|
|
} |