diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-03-06 16:17:19 -0500 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-03-06 17:37:47 -0500 |
| commit | 287dab4655176b09b0cd5b7607bfaff74e48d20d (patch) | |
| tree | 9d3b9821e6858b7772e836e3a1e7d65d2c072e45 /Jellyfin.Data/Entities/Libraries/Track.cs | |
| parent | b5e3c02865b4fc4953c317f647b7319db34922c8 (diff) | |
Remove constructor side effects and remove unneeded parameterless constructors
Diffstat (limited to 'Jellyfin.Data/Entities/Libraries/Track.cs')
| -rw-r--r-- | Jellyfin.Data/Entities/Libraries/Track.cs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/Jellyfin.Data/Entities/Libraries/Track.cs b/Jellyfin.Data/Entities/Libraries/Track.cs index 782bfb5ce7..86a3edff83 100644 --- a/Jellyfin.Data/Entities/Libraries/Track.cs +++ b/Jellyfin.Data/Entities/Libraries/Track.cs @@ -1,6 +1,5 @@ #pragma warning disable CA2227 -using System; using System.Collections.Generic; using Jellyfin.Data.Interfaces; @@ -14,31 +13,14 @@ namespace Jellyfin.Data.Entities.Libraries /// <summary> /// Initializes a new instance of the <see cref="Track"/> class. /// </summary> - /// <param name="album">The album.</param> - public Track(MusicAlbum album) + /// <param name="library">The library.</param> + public Track(Library library) : base(library) { - if (album == null) - { - throw new ArgumentNullException(nameof(album)); - } - - album.Tracks.Add(this); - Releases = new HashSet<Release>(); TrackMetadata = new HashSet<TrackMetadata>(); } /// <summary> - /// Initializes a new instance of the <see cref="Track"/> class. - /// </summary> - /// <remarks> - /// Default constructor. Protected due to required properties, but present because EF needs it. - /// </remarks> - protected Track() - { - } - - /// <summary> /// Gets or sets the track number. /// </summary> public int? TrackNumber { get; set; } |
