mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-22 22:15:17 -04:00
Swap to dapper and system.text.json for database backend
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Marr.Data;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Profiles;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using System.IO;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
||||
namespace NzbDrone.Core.NetImport.ImportExclusions
|
||||
{
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Datastore.Extensions;
|
||||
using Marr.Data.QGen;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.Parser.RomanNumerals;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using CoreParser = NzbDrone.Core.Parser.Parser;
|
||||
|
||||
namespace NzbDrone.Core.NetImport.ImportExclusions
|
||||
{
|
||||
@@ -20,22 +12,19 @@ namespace NzbDrone.Core.NetImport.ImportExclusions
|
||||
|
||||
public class ImportExclusionsRepository : BasicRepository<ImportExclusion>, IImportExclusionsRepository
|
||||
{
|
||||
protected IMainDatabase _database;
|
||||
|
||||
public ImportExclusionsRepository(IMainDatabase database, IEventAggregator eventAggregator)
|
||||
: base(database, eventAggregator)
|
||||
{
|
||||
_database = database;
|
||||
}
|
||||
|
||||
public bool IsMovieExcluded(int tmdbid)
|
||||
{
|
||||
return Query.Where(ex => ex.TmdbId == tmdbid).Any();
|
||||
return Query(x => x.TmdbId == tmdbid).Any();
|
||||
}
|
||||
|
||||
public ImportExclusion GetByTmdbid(int tmdbid)
|
||||
{
|
||||
return Query.Where(ex => ex.TmdbId == tmdbid).First();
|
||||
return Query(x => x.TmdbId == tmdbid).First();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Marr.Data;
|
||||
using NzbDrone.Core.Profiles;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
||||
@@ -18,7 +16,6 @@ namespace NzbDrone.Core.NetImport
|
||||
public bool ShouldMonitor { get; set; }
|
||||
public MovieStatusType MinimumAvailability { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
public LazyLoaded<Profile> Profile { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
public override bool Enable => Enabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user