aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/IO/StartupOptions.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-14 11:26:33 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-14 11:26:33 -0400
commit10cb5a8bf6a32a84819e841719e2dcc958aec513 (patch)
treec0c25bd51c57d208c60f66881eef4ebef3142511 /MediaBrowser.ServerApplication/IO/StartupOptions.cs
parent5c615fa02448813499ed87f2a1c2b937c7a7dcd5 (diff)
add ability to customize ffmpeg path
Diffstat (limited to 'MediaBrowser.ServerApplication/IO/StartupOptions.cs')
-rw-r--r--MediaBrowser.ServerApplication/IO/StartupOptions.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/MediaBrowser.ServerApplication/IO/StartupOptions.cs b/MediaBrowser.ServerApplication/IO/StartupOptions.cs
new file mode 100644
index 000000000..e74151e4c
--- /dev/null
+++ b/MediaBrowser.ServerApplication/IO/StartupOptions.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MediaBrowser.ServerApplication.IO
+{
+ public class StartupOptions
+ {
+ private readonly List<string> _options = Environment.GetCommandLineArgs().ToList();
+
+ public bool ContainsOption(string option)
+ {
+ return _options.Contains(option, StringComparer.OrdinalIgnoreCase);
+ }
+
+ public string GetOption(string name)
+ {
+ var index = _options.IndexOf(name);
+
+ if (index != -1)
+ {
+ return _options.ElementAtOrDefault(index + 1);
+ }
+
+ return null;
+ }
+ }
+}