diff options
Diffstat (limited to 'Emby.Naming/Video/VideoInfo.cs')
| -rw-r--r-- | Emby.Naming/Video/VideoInfo.cs | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/Emby.Naming/Video/VideoInfo.cs b/Emby.Naming/Video/VideoInfo.cs index d96d0e757..930fdb33f 100644 --- a/Emby.Naming/Video/VideoInfo.cs +++ b/Emby.Naming/Video/VideoInfo.cs @@ -1,43 +1,54 @@ +using System; using System.Collections.Generic; namespace Emby.Naming.Video { /// <summary> - /// Represents a complete video, including all parts and subtitles + /// Represents a complete video, including all parts and subtitles. /// </summary> public class VideoInfo { /// <summary> + /// Initializes a new instance of the <see cref="VideoInfo" /> class. + /// </summary> + /// <param name="name">The name.</param> + public VideoInfo(string? name) + { + Name = name; + + Files = Array.Empty<VideoFileInfo>(); + Extras = Array.Empty<VideoFileInfo>(); + AlternateVersions = Array.Empty<VideoFileInfo>(); + } + + /// <summary> /// Gets or sets the name. /// </summary> /// <value>The name.</value> - public string Name { get; set; } + public string? Name { get; set; } + /// <summary> /// Gets or sets the year. /// </summary> /// <value>The year.</value> public int? Year { get; set; } + /// <summary> /// Gets or sets the files. /// </summary> /// <value>The files.</value> - public List<VideoFileInfo> Files { get; set; } + public IReadOnlyList<VideoFileInfo> Files { get; set; } + /// <summary> /// Gets or sets the extras. /// </summary> /// <value>The extras.</value> - public List<VideoFileInfo> Extras { get; set; } + public IReadOnlyList<VideoFileInfo> Extras { get; set; } + /// <summary> /// Gets or sets the alternate versions. /// </summary> /// <value>The alternate versions.</value> - public List<VideoFileInfo> AlternateVersions { get; set; } - - public VideoInfo() - { - Files = new List<VideoFileInfo>(); - Extras = new List<VideoFileInfo>(); - AlternateVersions = new List<VideoFileInfo>(); - } + public IReadOnlyList<VideoFileInfo> AlternateVersions { get; set; } } } |
