mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
updated the apppath logic and db location
This commit is contained in:
parent
6140ab0e0f
commit
036b2e7f4f
11 changed files with 178 additions and 42 deletions
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using log4net;
|
||||
using Ninject;
|
||||
using NzbDrone.Core.Controllers;
|
||||
|
@ -12,8 +14,8 @@ namespace NzbDrone.Core
|
|||
|
||||
public static void BindKernel(IKernel kernel)
|
||||
{
|
||||
var provider = ProviderFactory.GetProvider("Data Source=filename;Version=3;", "System.Data.SQLite");
|
||||
|
||||
string connectionString = String.Format("Data Source={0};Version=3;",Path.Combine(AppPath, "nzbdrone.db")) ;
|
||||
var provider = ProviderFactory.GetProvider(connectionString, "System.Data.SQLite");
|
||||
|
||||
kernel.Bind<ISeriesController>().To<SeriesController>();
|
||||
kernel.Bind<IDiskController>().To<DiskController>();
|
||||
|
@ -24,11 +26,11 @@ namespace NzbDrone.Core
|
|||
}
|
||||
|
||||
|
||||
private static string _appPath;
|
||||
|
||||
public static String AppPath
|
||||
{
|
||||
get { throw new ApplicationException(); }
|
||||
|
||||
get { return new DirectoryInfo(HttpContext.Current.Server.MapPath("\\")).Parent.FullName; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue