Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/src/commit/f72d4dd394cc917c6d6012c03e8cb5b3e3cca019/NzbDrone.Core/Datastore/ConnectionStringFactory.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Sonarr/NzbDrone.Core/Datastore/ConnectionStringFactory.cs

37 lines
1.2 KiB

using System;
using System.Data.SQLite;
using NzbDrone.Common;
using NzbDrone.Common.EnvironmentInfo;
namespace NzbDrone.Core.Datastore
{
public interface IConnectionStringFactory
{
string MainDbConnectionString { get; }
string LogDbConnectionString { get; }
}
public class ConnectionStringFactory : IConnectionStringFactory
{
public ConnectionStringFactory(IAppFolderInfo appFolderInfo)
{
MainDbConnectionString = GetConnectionString(appFolderInfo.GetNzbDroneDatabase());
LogDbConnectionString = GetConnectionString(appFolderInfo.GetLogDatabase());
}
public string MainDbConnectionString { get; private set; }
public string LogDbConnectionString { get; private set; }
private static string GetConnectionString(string dbPath)
{
var connectionBuilder = new SQLiteConnectionStringBuilder();
connectionBuilder.DataSource = dbPath;
connectionBuilder.CacheSize = (int)-10.Megabytes();
connectionBuilder.DateTimeKind = DateTimeKind.Utc;
connectionBuilder.JournalMode = SQLiteJournalModeEnum.Wal;
return connectionBuilder.ConnectionString;
}
}
}