diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-03-22 17:05:44 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 17:05:44 +0000 |
| commit | 5d16d1f66de499022da3eeb484a2cdfe341bed2f (patch) | |
| tree | ac348fc960f2c849d989a6d2f27a34a73d4f3675 /Jellyfin.Data/Entities/Libraries/Library.cs | |
| parent | 7fa525c83b7573e61124fa1c64a3b27569e66b6d (diff) | |
| parent | 0853d1265c99a2e8614aa0c7a584dff541484e19 (diff) | |
Merge branch 'master' into RemoteAccessFix
Diffstat (limited to 'Jellyfin.Data/Entities/Libraries/Library.cs')
| -rw-r--r-- | Jellyfin.Data/Entities/Libraries/Library.cs | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/Jellyfin.Data/Entities/Libraries/Library.cs b/Jellyfin.Data/Entities/Libraries/Library.cs index 4f82a2e2a..e45384902 100644 --- a/Jellyfin.Data/Entities/Libraries/Library.cs +++ b/Jellyfin.Data/Entities/Libraries/Library.cs @@ -1,4 +1,3 @@ -using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Data.Interfaces; @@ -14,24 +13,11 @@ namespace Jellyfin.Data.Entities.Libraries /// Initializes a new instance of the <see cref="Library"/> class. /// </summary> /// <param name="name">The name of the library.</param> - public Library(string name) + /// <param name="path">The path of the library.</param> + public Library(string name, string path) { - if (string.IsNullOrWhiteSpace(name)) - { - throw new ArgumentNullException(nameof(name)); - } - Name = name; - } - - /// <summary> - /// Initializes a new instance of the <see cref="Library"/> class. - /// </summary> - /// <remarks> - /// Default constructor. Protected due to required properties, but present because EF needs it. - /// </remarks> - protected Library() - { + Path = path; } /// <summary> @@ -49,7 +35,6 @@ namespace Jellyfin.Data.Entities.Libraries /// <remarks> /// Required, Max length = 128. /// </remarks> - [Required] [MaxLength(128)] [StringLength(128)] public string Name { get; set; } @@ -60,7 +45,6 @@ namespace Jellyfin.Data.Entities.Libraries /// <remarks> /// Required. /// </remarks> - [Required] public string Path { get; set; } /// <inheritdoc /> |
