#nullable enable using MediaBrowser.Model.Entities; namespace Emby.Naming.Video { /// /// Represents a single video file. /// public class VideoFileInfo { /// /// Initializes a new instance of the class. /// /// Name of file. /// Path to the file. /// Container type. /// Year of release. /// Extra type. /// Extra rule. /// Format 3D. /// Is 3D. /// Is Stub. /// Stub type. /// Is directory. public VideoFileInfo(string name, string path, string? container, int? year = default, ExtraType? extraType = default, ExtraRule? extraRule = default, string? format3D = default, bool is3D = default, bool isStub = default, string? stubType = default, bool isDirectory = default) { Path = path; Container = container; Name = name; Year = year; ExtraType = extraType; ExtraRule = extraRule; Format3D = format3D; Is3D = is3D; IsStub = isStub; StubType = stubType; IsDirectory = isDirectory; } /// /// Gets or sets the path. /// /// The path. public string Path { get; set; } /// /// Gets or sets the container. /// /// The container. public string? Container { get; set; } /// /// Gets or sets the name. /// /// The name. public string Name { get; set; } /// /// Gets or sets the year. /// /// The year. public int? Year { get; set; } /// /// Gets or sets the type of the extra, e.g. trailer, theme song, behind the scenes, etc. /// /// The type of the extra. public ExtraType? ExtraType { get; set; } /// /// Gets or sets the extra rule. /// /// The extra rule. public ExtraRule? ExtraRule { get; set; } /// /// Gets or sets the format3 d. /// /// The format3 d. public string? Format3D { get; set; } /// /// Gets or sets a value indicating whether [is3 d]. /// /// true if [is3 d]; otherwise, false. public bool Is3D { get; set; } /// /// Gets or sets a value indicating whether this instance is stub. /// /// true if this instance is stub; otherwise, false. public bool IsStub { get; set; } /// /// Gets or sets the type of the stub. /// /// The type of the stub. public string? StubType { get; set; } /// /// Gets or sets a value indicating whether this instance is a directory. /// /// The type. public bool IsDirectory { get; set; } /// /// Gets the file name without extension. /// /// The file name without extension. public string FileNameWithoutExtension => !IsDirectory ? System.IO.Path.GetFileNameWithoutExtension(Path) : System.IO.Path.GetFileName(Path); /// public override string ToString() { return "VideoFileInfo(Name: '" + Name + "')"; } } }