diff options
Diffstat (limited to 'Emby.Naming/Video/VideoFileInfo.cs')
| -rw-r--r-- | Emby.Naming/Video/VideoFileInfo.cs | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/Emby.Naming/Video/VideoFileInfo.cs b/Emby.Naming/Video/VideoFileInfo.cs index 11e789b66..1457db737 100644 --- a/Emby.Naming/Video/VideoFileInfo.cs +++ b/Emby.Naming/Video/VideoFileInfo.cs @@ -8,6 +8,35 @@ namespace Emby.Naming.Video public class VideoFileInfo { /// <summary> + /// Initializes a new instance of the <see cref="VideoFileInfo"/> class. + /// </summary> + /// <param name="name">Name of file.</param> + /// <param name="path">Path to the file.</param> + /// <param name="container">Container type.</param> + /// <param name="year">Year of release.</param> + /// <param name="extraType">Extra type.</param> + /// <param name="extraRule">Extra rule.</param> + /// <param name="format3D">Format 3D.</param> + /// <param name="is3D">Is 3D.</param> + /// <param name="isStub">Is Stub.</param> + /// <param name="stubType">Stub type.</param> + /// <param name="isDirectory">Is directory.</param> + 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; + } + + /// <summary> /// Gets or sets the path. /// </summary> /// <value>The path.</value> @@ -17,7 +46,7 @@ namespace Emby.Naming.Video /// Gets or sets the container. /// </summary> /// <value>The container.</value> - public string Container { get; set; } + public string? Container { get; set; } /// <summary> /// Gets or sets the name. @@ -41,13 +70,13 @@ namespace Emby.Naming.Video /// Gets or sets the extra rule. /// </summary> /// <value>The extra rule.</value> - public ExtraRule ExtraRule { get; set; } + public ExtraRule? ExtraRule { get; set; } /// <summary> /// Gets or sets the format3 d. /// </summary> /// <value>The format3 d.</value> - public string Format3D { get; set; } + public string? Format3D { get; set; } /// <summary> /// Gets or sets a value indicating whether [is3 d]. @@ -65,7 +94,7 @@ namespace Emby.Naming.Video /// Gets or sets the type of the stub. /// </summary> /// <value>The type of the stub.</value> - public string StubType { get; set; } + public string? StubType { get; set; } /// <summary> /// Gets or sets a value indicating whether this instance is a directory. @@ -84,8 +113,7 @@ namespace Emby.Naming.Video /// <inheritdoc /> public override string ToString() { - // Makes debugging easier - return Name ?? base.ToString(); + return "VideoFileInfo(Name: '" + Name + "')"; } } } |
