VideoFileInfo.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. namespace Emby.Naming.Video
  2. {
  3. /// <summary>
  4. /// Represents a single video file.
  5. /// </summary>
  6. public class VideoFileInfo
  7. {
  8. /// <summary>
  9. /// Gets or sets the path.
  10. /// </summary>
  11. /// <value>The path.</value>
  12. public string Path { get; set; }
  13. /// <summary>
  14. /// Gets or sets the container.
  15. /// </summary>
  16. /// <value>The container.</value>
  17. public string Container { get; set; }
  18. /// <summary>
  19. /// Gets or sets the name.
  20. /// </summary>
  21. /// <value>The name.</value>
  22. public string Name { get; set; }
  23. /// <summary>
  24. /// Gets or sets the year.
  25. /// </summary>
  26. /// <value>The year.</value>
  27. public int? Year { get; set; }
  28. /// <summary>
  29. /// Gets or sets the type of the extra, e.g. trailer, theme song, behing the scenes, etc.
  30. /// </summary>
  31. /// <value>The type of the extra.</value>
  32. public string ExtraType { get; set; }
  33. /// <summary>
  34. /// Gets or sets the extra rule.
  35. /// </summary>
  36. /// <value>The extra rule.</value>
  37. public ExtraRule ExtraRule { get; set; }
  38. /// <summary>
  39. /// Gets or sets the format3 d.
  40. /// </summary>
  41. /// <value>The format3 d.</value>
  42. public string Format3D { get; set; }
  43. /// <summary>
  44. /// Gets or sets a value indicating whether [is3 d].
  45. /// </summary>
  46. /// <value><c>true</c> if [is3 d]; otherwise, <c>false</c>.</value>
  47. public bool Is3D { get; set; }
  48. /// <summary>
  49. /// Gets or sets a value indicating whether this instance is stub.
  50. /// </summary>
  51. /// <value><c>true</c> if this instance is stub; otherwise, <c>false</c>.</value>
  52. public bool IsStub { get; set; }
  53. /// <summary>
  54. /// Gets or sets the type of the stub.
  55. /// </summary>
  56. /// <value>The type of the stub.</value>
  57. public string StubType { get; set; }
  58. /// <summary>
  59. /// Gets or sets the type.
  60. /// </summary>
  61. /// <value>The type.</value>
  62. public bool IsDirectory { get; set; }
  63. /// <summary>
  64. /// Gets the file name without extension.
  65. /// </summary>
  66. /// <value>The file name without extension.</value>
  67. public string FileNameWithoutExtension => !IsDirectory ? System.IO.Path.GetFileNameWithoutExtension(Path) : System.IO.Path.GetFileName(Path);
  68. public override string ToString()
  69. {
  70. // Makes debugging easier
  71. return Name ?? base.ToString();
  72. }
  73. }
  74. }