add platform test to directory picker

This commit is contained in:
Luke Pulverenti 2016-07-23 16:04:04 -04:00
parent 2ab60ee250
commit 7d980fee45

View File

@ -134,17 +134,20 @@ namespace MediaBrowser.Api
{ {
var result = new DefaultDirectoryBrowserInfo(); var result = new DefaultDirectoryBrowserInfo();
try if (Environment.OSVersion.Platform == PlatformID.Unix)
{ {
var qnap = "/share/CACHEDEV1_DATA"; try
if (Directory.Exists(qnap))
{ {
result.Path = qnap; var qnap = "/share/CACHEDEV1_DATA";
if (Directory.Exists(qnap))
{
result.Path = qnap;
}
} }
} catch
catch {
{
}
} }
return ToOptimizedResult(result); return ToOptimizedResult(result);