mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-29 20:08:27 +01:00
Remove constructor side effects and remove unneeded parameterless constructors
This commit is contained in:
@@ -17,8 +17,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||
/// </summary>
|
||||
/// <param name="language">ISO-639-3 3-character language codes.</param>
|
||||
/// <param name="startTime">The start time for this chapter.</param>
|
||||
/// <param name="release">The release.</param>
|
||||
public Chapter(string language, long startTime, Release release)
|
||||
public Chapter(string language, long startTime)
|
||||
{
|
||||
if (string.IsNullOrEmpty(language))
|
||||
{
|
||||
@@ -27,23 +26,6 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||
|
||||
Language = language;
|
||||
StartTime = startTime;
|
||||
|
||||
if (release == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(release));
|
||||
}
|
||||
|
||||
release.Chapters.Add(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Chapter"/> class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </remarks>
|
||||
protected Chapter()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user