You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prowlarr/NzbDrone.Core/Datastore/EloqueraDbFactory.cs

32 lines
882 B

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Eloquera.Client;
using NzbDrone.Common;
namespace NzbDrone.Core.Datastore
{
public class EloqueraDbFactory
{
private readonly EnvironmentProvider _environmentProvider;
public EloqueraDbFactory()
{
_environmentProvider = new EnvironmentProvider();
}
public EloqueraDb Create(string dbName = "NzbDrone", string dbFilename = "nzbdrone.eloq")
{
DB db = new DB();
DB.Configuration.ServerSettings.DatabasePath = Path.Combine(_environmentProvider.GetAppDataPath(), dbName);
db.CreateDatabase(dbName);
db.OpenDatabase(dbName);
db.RefreshMode = ObjectRefreshMode.AlwaysReturnUpdatedValues;
return new EloqueraDb(db);
}
}
}