mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-03 21:02:52 +01:00
Remove constructor side effects and remove unneeded parameterless constructors
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#pragma warning disable CA2227
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Jellyfin.Data.Interfaces;
|
||||
|
||||
@@ -14,30 +13,13 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Episode"/> class.
|
||||
/// </summary>
|
||||
/// <param name="season">The season.</param>
|
||||
public Episode(Season season)
|
||||
/// <param name="library">The library.</param>
|
||||
public Episode(Library library) : base(library)
|
||||
{
|
||||
if (season == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(season));
|
||||
}
|
||||
|
||||
season.Episodes.Add(this);
|
||||
|
||||
Releases = new HashSet<Release>();
|
||||
EpisodeMetadata = new HashSet<EpisodeMetadata>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Episode"/> class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </remarks>
|
||||
protected Episode()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the episode number.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user