StartupOptions.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using CommandLine;
  2. using Emby.Server.Implementations;
  3. namespace Jellyfin.Server
  4. {
  5. /// <summary>
  6. /// Class used by CommandLine package when parsing the command line arguments.
  7. /// </summary>
  8. public class StartupOptions : IStartupOptions
  9. {
  10. /// <summary>
  11. /// Gets or sets the path to the data directory.
  12. /// </summary>
  13. /// <value>The path to the data directory.</value>
  14. [Option('d', "datadir", Required = false, HelpText = "Path to use for the data folder (database files, etc.).")]
  15. public string? DataDir { get; set; }
  16. /// <summary>
  17. /// Gets or sets the path to the web directory.
  18. /// </summary>
  19. /// <value>The path to the web directory.</value>
  20. [Option('w', "webdir", Required = false, HelpText = "Path to the Jellyfin web UI resources.")]
  21. public string? WebDir { get; set; }
  22. /// <summary>
  23. /// Gets or sets the path to the cache directory.
  24. /// </summary>
  25. /// <value>The path to the cache directory.</value>
  26. [Option('C', "cachedir", Required = false, HelpText = "Path to use for caching.")]
  27. public string? CacheDir { get; set; }
  28. /// <summary>
  29. /// Gets or sets the path to the config directory.
  30. /// </summary>
  31. /// <value>The path to the config directory.</value>
  32. [Option('c', "configdir", Required = false, HelpText = "Path to use for configuration data (user settings and pictures).")]
  33. public string? ConfigDir { get; set; }
  34. /// <summary>
  35. /// Gets or sets the path to the log directory.
  36. /// </summary>
  37. /// <value>The path to the log directory.</value>
  38. [Option('l', "logdir", Required = false, HelpText = "Path to use for writing log files.")]
  39. public string? LogDir { get; set; }
  40. /// <inheritdoc />
  41. [Option("ffmpeg", Required = false, HelpText = "Path to external FFmpeg executable to use in place of default found in PATH.")]
  42. public string? FFmpegPath { get; set; }
  43. /// <inheritdoc />
  44. [Option("service", Required = false, HelpText = "Run as headless service.")]
  45. public bool IsService { get; set; }
  46. /// <inheritdoc />
  47. [Option("noautorunwebapp", Required = false, HelpText = "Run headless if startup wizard is complete.")]
  48. public bool NoAutoRunWebApp { get; set; }
  49. /// <inheritdoc />
  50. [Option("package-name", Required = false, HelpText = "Used when packaging Jellyfin (example, synology).")]
  51. public string? PackageName { get; set; }
  52. /// <inheritdoc />
  53. [Option("restartpath", Required = false, HelpText = "Path to restart script.")]
  54. public string? RestartPath { get; set; }
  55. /// <inheritdoc />
  56. [Option("restartargs", Required = false, HelpText = "Arguments for restart script.")]
  57. public string? RestartArgs { get; set; }
  58. }
  59. }