aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2018-12-11 15:42:22 -0500
committerGitHub <noreply@github.com>2018-12-11 15:42:22 -0500
commit65d0d1d7b194d45a3b105990123d8b7ec29b48e2 (patch)
tree636474c5cccba4eb527edab483f55a4655c6d3c5
parentf85ddf1ceff0a4c2f22bc7fa2263b17993bb9321 (diff)
parent08024c81de4c16fc4fd6639241b69d31e0c564b0 (diff)
Merge pull request #55 from LogicalPhallacy/WindowsLibPathFix
Changed the App.Config to longer break both nix (in debug mode) and w…
-rw-r--r--MediaBrowser.Server.Mono/ApplicationPathHelper.cs11
-rw-r--r--MediaBrowser.Server.Mono/app.config4
2 files changed, 12 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Mono/ApplicationPathHelper.cs b/MediaBrowser.Server.Mono/ApplicationPathHelper.cs
index c8cca40ff..ac55693fa 100644
--- a/MediaBrowser.Server.Mono/ApplicationPathHelper.cs
+++ b/MediaBrowser.Server.Mono/ApplicationPathHelper.cs
@@ -1,6 +1,7 @@
using System;
using System.Configuration;
using System.IO;
+using System.Runtime.InteropServices;
namespace MediaBrowser.Server.Mono
{
@@ -22,7 +23,15 @@ namespace MediaBrowser.Server.Mono
ConfigurationManager.AppSettings["DebugProgramDataPath"] :
ConfigurationManager.AppSettings["ReleaseProgramDataPath"];
- programDataPath = programDataPath.Replace("%ApplicationData%", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
+ if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ programDataPath = programDataPath.Replace("%ApplicationData%", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
+ }
+ else
+ {
+ programDataPath = programDataPath.Replace("%ApplicationData%", "/var/lib");
+ }
+
programDataPath = programDataPath
.Replace('/', Path.DirectorySeparatorChar)
diff --git a/MediaBrowser.Server.Mono/app.config b/MediaBrowser.Server.Mono/app.config
index 42a9d04e7..a93871625 100644
--- a/MediaBrowser.Server.Mono/app.config
+++ b/MediaBrowser.Server.Mono/app.config
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
- <add key="DebugProgramDataPath" value="E:\Temp" />
- <add key="ReleaseProgramDataPath" value="/var/lib/emby/" />
+ <add key="DebugProgramDataPath" value="%ApplicationData%/jellyfin-debug/" />
+ <add key="ReleaseProgramDataPath" value="%ApplicationData%/jellyfin/" />
</appSettings>
</configuration> \ No newline at end of file