mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 09:34:44 +01:00
Remove constructor side effects and remove unneeded parameterless constructors
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Jellyfin.Data.Interfaces;
|
||||
@@ -14,27 +13,9 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||
/// Initializes a new instance of the <see cref="MediaFileStream"/> class.
|
||||
/// </summary>
|
||||
/// <param name="streamNumber">The number of this stream.</param>
|
||||
/// <param name="mediaFile">The media file.</param>
|
||||
public MediaFileStream(int streamNumber, MediaFile mediaFile)
|
||||
public MediaFileStream(int streamNumber)
|
||||
{
|
||||
StreamNumber = streamNumber;
|
||||
|
||||
if (mediaFile == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(mediaFile));
|
||||
}
|
||||
|
||||
mediaFile.MediaFileStreams.Add(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MediaFileStream"/> class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </remarks>
|
||||
protected MediaFileStream()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user