aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-05-23 13:58:03 -0400
committerLuke <luke.pulverenti@gmail.com>2016-05-23 13:58:03 -0400
commita9a52eb0fb3b85499454bb58cca78f28578bc14d (patch)
treed8877efa33bca8e6cd1996864eebf88cbda0fc6b
parent80a9d3c7052edf7db96443d3387d080e4e3fdba4 (diff)
parent4fcdeaffee6d3a8775850c2babd719dec5f621ff (diff)
Merge pull request #1766 from MediaBrowser/dev
Dev
-rw-r--r--MediaBrowser.Api/StartupWizardService.cs1
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs2
-rw-r--r--MediaBrowser.ServerApplication/Native/SqliteExtensions.cs13
4 files changed, 15 insertions, 3 deletions
diff --git a/MediaBrowser.Api/StartupWizardService.cs b/MediaBrowser.Api/StartupWizardService.cs
index cdc00a9aa..8bb840697 100644
--- a/MediaBrowser.Api/StartupWizardService.cs
+++ b/MediaBrowser.Api/StartupWizardService.cs
@@ -109,6 +109,7 @@ namespace MediaBrowser.Api
private void SetWizardFinishValues(ServerConfiguration config)
{
+ config.EnableLocalizedGuids = true;
config.EnableCustomPathSubFolders = true;
config.EnableStandaloneMusicKeys = true;
config.EnableCaseSensitiveItemIds = true;
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 66bea95bb..1971b812e 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -199,6 +199,7 @@ namespace MediaBrowser.Model.Configuration
public bool EnableAnonymousUsageReporting { get; set; }
public bool EnableStandaloneMusicKeys { get; set; }
+ public bool EnableLocalizedGuids { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
@@ -208,6 +209,7 @@ namespace MediaBrowser.Model.Configuration
Migrations = new string[] { };
EnableCustomPathSubFolders = true;
+ EnableLocalizedGuids = true;
ImageSavingConvention = ImageSavingConvention.Compatible;
PublicPort = 8096;
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 961819f0d..56d3bd4de 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -502,7 +502,7 @@ namespace MediaBrowser.Server.Implementations.Library
throw new ArgumentNullException("type");
}
- if (key.StartsWith(ConfigurationManager.ApplicationPaths.ProgramDataPath))
+ if (ConfigurationManager.Configuration.EnableLocalizedGuids && key.StartsWith(ConfigurationManager.ApplicationPaths.ProgramDataPath))
{
// Try to normalize paths located underneath program-data in an attempt to make them more portable
key = key.Substring(ConfigurationManager.ApplicationPaths.ProgramDataPath.Length)
diff --git a/MediaBrowser.ServerApplication/Native/SqliteExtensions.cs b/MediaBrowser.ServerApplication/Native/SqliteExtensions.cs
index 1cde2ea13..4e6c82495 100644
--- a/MediaBrowser.ServerApplication/Native/SqliteExtensions.cs
+++ b/MediaBrowser.ServerApplication/Native/SqliteExtensions.cs
@@ -54,9 +54,18 @@ namespace MediaBrowser.ServerApplication.Native
_logger = logger;
}
- public Task<IDbConnection> Connect(string dbPath)
+ public async Task<IDbConnection> Connect(string dbPath)
{
- return SqliteExtensions.ConnectToDb(dbPath, _logger);
+ try
+ {
+ return await SqliteExtensions.ConnectToDb(dbPath, _logger).ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error opening database {0}", ex, dbPath);
+
+ throw;
+ }
}
}
} \ No newline at end of file