add ability to customize ffmpeg path

This commit is contained in:
Luke Pulverenti
2014-09-14 11:26:33 -04:00
parent 5c615fa024
commit 10cb5a8bf6
6 changed files with 75 additions and 36 deletions

View File

@@ -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;
}
}
}