diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-11-17 10:28:39 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-17 10:28:39 -0500 |
| commit | f6ebdbc45e6dc455b7535dfe341ccba94b2c2a90 (patch) | |
| tree | 3b42753afda908633880519308fddc25bc249d71 /Emby.Naming/AudioBook/AudioBookFileInfo.cs | |
| parent | fc3d6278be89b695aa79dc61d7f1226d4d6e441b (diff) | |
| parent | 04a712ab1d56a29a31e2c4991c16d338348762f4 (diff) | |
Merge pull request #4456 from martinek-stepan/emby-namig-nullable
Emby.Naming - nullable & code coverage
Diffstat (limited to 'Emby.Naming/AudioBook/AudioBookFileInfo.cs')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookFileInfo.cs | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookFileInfo.cs b/Emby.Naming/AudioBook/AudioBookFileInfo.cs index c4863b50a..862e39667 100644 --- a/Emby.Naming/AudioBook/AudioBookFileInfo.cs +++ b/Emby.Naming/AudioBook/AudioBookFileInfo.cs @@ -8,6 +8,21 @@ 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> + public AudioBookFileInfo(string path, string container, int? partNumber = default, int? chapterNumber = default) + { + Path = path; + Container = container; + PartNumber = partNumber; + ChapterNumber = chapterNumber; + } + + /// <summary> /// Gets or sets the path. /// </summary> /// <value>The path.</value> @@ -31,14 +46,8 @@ namespace Emby.Naming.AudioBook /// <value>The chapter number.</value> public int? ChapterNumber { get; set; } - /// <summary> - /// Gets or sets a value indicating whether this instance is a directory. - /// </summary> - /// <value>The type.</value> - public bool IsDirectory { get; set; } - /// <inheritdoc /> - public int CompareTo(AudioBookFileInfo other) + public int CompareTo(AudioBookFileInfo? other) { if (ReferenceEquals(this, other)) { |
