diff options
| author | Stepan <ste.martinek+git@gmail.com> | 2020-11-01 10:47:31 +0100 |
|---|---|---|
| committer | Stepan <ste.martinek+git@gmail.com> | 2020-11-01 10:47:31 +0100 |
| commit | 59619b6ea74ab555977fd213f6ee5737897b0fbd (patch) | |
| tree | dbe590f079d354632bc9192ee7fb24e59c541756 /Emby.Naming/AudioBook/AudioBookFileInfo.cs | |
| parent | 4f320308f333507a324740248c7dd025085a7d67 (diff) | |
Enable nullable in Emby.Naming
Diffstat (limited to 'Emby.Naming/AudioBook/AudioBookFileInfo.cs')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookFileInfo.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookFileInfo.cs b/Emby.Naming/AudioBook/AudioBookFileInfo.cs index c4863b50a..e5200416e 100644 --- a/Emby.Naming/AudioBook/AudioBookFileInfo.cs +++ b/Emby.Naming/AudioBook/AudioBookFileInfo.cs @@ -8,6 +8,23 @@ namespace Emby.Naming.AudioBook public class AudioBookFileInfo : IComparable<AudioBookFileInfo> { /// <summary> + /// Initializes a new instance of the <see cref="AudioBookFileInfo"/> class. + /// </summary> + /// <param name="path">Path to audiobook file.</param> + /// <param name="container">File type.</param> + /// <param name="partNumber">Number of part this file represents.</param> + /// <param name="chapterNumber">Number of chapter this file represents.</param> + /// <param name="isDirectory">Indication if we are looking at file or directory.</param> + public AudioBookFileInfo(string path, string container, int? partNumber = default, int? chapterNumber = default, bool isDirectory = default) + { + Path = path; + Container = container; + PartNumber = partNumber; + ChapterNumber = chapterNumber; + IsDirectory = isDirectory; + } + + /// <summary> /// Gets or sets the path. /// </summary> /// <value>The path.</value> @@ -38,7 +55,7 @@ namespace Emby.Naming.AudioBook public bool IsDirectory { get; set; } /// <inheritdoc /> - public int CompareTo(AudioBookFileInfo other) + public int CompareTo(AudioBookFileInfo? other) { if (ReferenceEquals(this, other)) { |
