aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/EnvironmentService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-07-23 16:04:04 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-07-23 16:04:04 -0400
commit7d980fee4595a7b5eb2adab582694e7b00afb14b (patch)
tree2cb9e23df9441bb33e99a358d7f93ee3e4a26c6a /MediaBrowser.Api/EnvironmentService.cs
parent2ab60ee2504d85072d5628c6a67c149ad2554c1d (diff)
add platform test to directory picker
Diffstat (limited to 'MediaBrowser.Api/EnvironmentService.cs')
-rw-r--r--MediaBrowser.Api/EnvironmentService.cs19
1 files changed, 11 insertions, 8 deletions
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs
index e137a4baf..b354cb26c 100644
--- a/MediaBrowser.Api/EnvironmentService.cs
+++ b/MediaBrowser.Api/EnvironmentService.cs
@@ -134,17 +134,20 @@ namespace MediaBrowser.Api
{
var result = new DefaultDirectoryBrowserInfo();
- try
+ if (Environment.OSVersion.Platform == PlatformID.Unix)
{
- var qnap = "/share/CACHEDEV1_DATA";
- if (Directory.Exists(qnap))
+ try
{
- result.Path = qnap;
+ var qnap = "/share/CACHEDEV1_DATA";
+ if (Directory.Exists(qnap))
+ {
+ result.Path = qnap;
+ }
+ }
+ catch
+ {
+
}
- }
- catch
- {
-
}
return ToOptimizedResult(result);