aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Entities
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2020-06-20 19:23:56 +0100
committerGitHub <noreply@github.com>2020-06-20 19:23:56 +0100
commitb5586e64f5d815f4449930dc53a61a676d0e2df4 (patch)
treec82204256da3850fe6bad1e545135caed04d9cf0 /Jellyfin.Data/Entities
parentb2e1d7019130f7bf7e74c8af29927226fb30d46c (diff)
parentbb947718eaee3a8381d9b9e6ed926676de39d7c9 (diff)
Merge pull request #25 from jellyfin/master
Update my master
Diffstat (limited to 'Jellyfin.Data/Entities')
-rw-r--r--Jellyfin.Data/Entities/Artwork.cs25
-rw-r--r--Jellyfin.Data/Entities/BookMetadata.cs28
-rw-r--r--Jellyfin.Data/Entities/Chapter.cs26
-rw-r--r--Jellyfin.Data/Entities/Collection.cs4
-rw-r--r--Jellyfin.Data/Entities/CollectionItem.cs21
-rw-r--r--Jellyfin.Data/Entities/Company.cs32
-rw-r--r--Jellyfin.Data/Entities/CompanyMetadata.cs35
-rw-r--r--Jellyfin.Data/Entities/CustomItemMetadata.cs27
-rw-r--r--Jellyfin.Data/Entities/Episode.cs8
-rw-r--r--Jellyfin.Data/Entities/EpisodeMetadata.cs33
-rw-r--r--Jellyfin.Data/Entities/Genre.cs17
-rw-r--r--Jellyfin.Data/Entities/Group.cs2
-rw-r--r--Jellyfin.Data/Entities/Library.cs11
-rw-r--r--Jellyfin.Data/Entities/LibraryItem.cs6
-rw-r--r--Jellyfin.Data/Entities/LibraryRoot.cs17
-rw-r--r--Jellyfin.Data/Entities/MediaFile.cs22
-rw-r--r--Jellyfin.Data/Entities/MediaFileStream.cs11
-rw-r--r--Jellyfin.Data/Entities/Metadata.cs32
-rw-r--r--Jellyfin.Data/Entities/MetadataProvider.cs11
-rw-r--r--Jellyfin.Data/Entities/MetadataProviderId.cs35
-rw-r--r--Jellyfin.Data/Entities/MovieMetadata.cs34
-rw-r--r--Jellyfin.Data/Entities/MusicAlbumMetadata.cs32
-rw-r--r--Jellyfin.Data/Entities/Person.cs18
-rw-r--r--Jellyfin.Data/Entities/PersonRole.cs12
-rw-r--r--Jellyfin.Data/Entities/PhotoMetadata.cs27
-rw-r--r--Jellyfin.Data/Entities/ProviderMapping.cs19
-rw-r--r--Jellyfin.Data/Entities/Rating.cs13
-rw-r--r--Jellyfin.Data/Entities/RatingSource.cs15
-rw-r--r--Jellyfin.Data/Entities/Release.cs46
-rw-r--r--Jellyfin.Data/Entities/Season.cs8
-rw-r--r--Jellyfin.Data/Entities/SeasonMetadata.cs29
-rw-r--r--Jellyfin.Data/Entities/Series.cs6
-rw-r--r--Jellyfin.Data/Entities/SeriesMetadata.cs34
-rw-r--r--Jellyfin.Data/Entities/Track.cs8
-rw-r--r--Jellyfin.Data/Entities/TrackMetadata.cs27
35 files changed, 507 insertions, 224 deletions
diff --git a/Jellyfin.Data/Entities/Artwork.cs b/Jellyfin.Data/Entities/Artwork.cs
index 852d742a58..6ed32eac33 100644
--- a/Jellyfin.Data/Entities/Artwork.cs
+++ b/Jellyfin.Data/Entities/Artwork.cs
@@ -32,17 +32,28 @@ namespace Jellyfin.Data.Entities
/// <param name="_personrole1"></param>
public Artwork(string path, Enums.ArtKind kind, Metadata _metadata0, PersonRole _personrole1)
{
- if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
+ if (string.IsNullOrEmpty(path))
+ {
+ throw new ArgumentNullException(nameof(path));
+ }
+
this.Path = path;
this.Kind = kind;
- if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
+ if (_metadata0 == null)
+ {
+ throw new ArgumentNullException(nameof(_metadata0));
+ }
+
_metadata0.Artwork.Add(this);
- if (_personrole1 == null) throw new ArgumentNullException(nameof(_personrole1));
- _personrole1.Artwork = this;
+ if (_personrole1 == null)
+ {
+ throw new ArgumentNullException(nameof(_personrole1));
+ }
+ _personrole1.Artwork = this;
Init();
}
@@ -87,7 +98,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -126,7 +137,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Path;
GetPath(ref value);
- return (_Path = value);
+ return _Path = value;
}
set
@@ -163,7 +174,7 @@ namespace Jellyfin.Data.Entities
{
Enums.ArtKind value = _Kind;
GetKind(ref value);
- return (_Kind = value);
+ return _Kind = value;
}
set
diff --git a/Jellyfin.Data/Entities/BookMetadata.cs b/Jellyfin.Data/Entities/BookMetadata.cs
index 47578dc46b..df43090d3d 100644
--- a/Jellyfin.Data/Entities/BookMetadata.cs
+++ b/Jellyfin.Data/Entities/BookMetadata.cs
@@ -29,18 +29,30 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_book0"></param>
public BookMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Book _book0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_book0 == null) throw new ArgumentNullException(nameof(_book0));
+ if (_book0 == null)
+ {
+ throw new ArgumentNullException(nameof(_book0));
+ }
+
_book0.BookMetadata.Add(this);
this.Publishers = new HashSet<Company>();
@@ -51,8 +63,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_book0"></param>
public static BookMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Book _book0)
{
@@ -82,7 +94,7 @@ namespace Jellyfin.Data.Entities
{
long? value = _ISBN;
GetISBN(ref value);
- return (_ISBN = value);
+ return _ISBN = value;
}
set
diff --git a/Jellyfin.Data/Entities/Chapter.cs b/Jellyfin.Data/Entities/Chapter.cs
index d5b2b39ce7..4575cdb4d7 100644
--- a/Jellyfin.Data/Entities/Chapter.cs
+++ b/Jellyfin.Data/Entities/Chapter.cs
@@ -27,17 +27,25 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="timestart"></param>
/// <param name="_release0"></param>
public Chapter(string language, long timestart, Release _release0)
{
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
this.TimeStart = timestart;
- if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
+ if (_release0 == null)
+ {
+ throw new ArgumentNullException(nameof(_release0));
+ }
+
_release0.Chapters.Add(this);
@@ -47,7 +55,7 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="timestart"></param>
/// <param name="_release0"></param>
public static Chapter Create(string language, long timestart, Release _release0)
@@ -84,7 +92,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -122,7 +130,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
@@ -163,7 +171,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Language;
GetLanguage(ref value);
- return (_Language = value);
+ return _Language = value;
}
set
@@ -200,7 +208,7 @@ namespace Jellyfin.Data.Entities
{
long value = _TimeStart;
GetTimeStart(ref value);
- return (_TimeStart = value);
+ return _TimeStart = value;
}
set
@@ -233,7 +241,7 @@ namespace Jellyfin.Data.Entities
{
long? value = _TimeEnd;
GetTimeEnd(ref value);
- return (_TimeEnd = value);
+ return _TimeEnd = value;
}
set
diff --git a/Jellyfin.Data/Entities/Collection.cs b/Jellyfin.Data/Entities/Collection.cs
index d2f441d030..01836d8937 100644
--- a/Jellyfin.Data/Entities/Collection.cs
+++ b/Jellyfin.Data/Entities/Collection.cs
@@ -47,7 +47,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -85,7 +85,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
diff --git a/Jellyfin.Data/Entities/CollectionItem.cs b/Jellyfin.Data/Entities/CollectionItem.cs
index 7cfdbbe167..d879806ee6 100644
--- a/Jellyfin.Data/Entities/CollectionItem.cs
+++ b/Jellyfin.Data/Entities/CollectionItem.cs
@@ -38,15 +38,26 @@ namespace Jellyfin.Data.Entities
// NOTE: This class has one-to-one associations with CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
- if (_collection0 == null) throw new ArgumentNullException(nameof(_collection0));
+ if (_collection0 == null)
+ {
+ throw new ArgumentNullException(nameof(_collection0));
+ }
+
_collection0.CollectionItem.Add(this);
- if (_collectionitem1 == null) throw new ArgumentNullException(nameof(_collectionitem1));
+ if (_collectionitem1 == null)
+ {
+ throw new ArgumentNullException(nameof(_collectionitem1));
+ }
+
_collectionitem1.Next = this;
- if (_collectionitem2 == null) throw new ArgumentNullException(nameof(_collectionitem2));
- _collectionitem2.Previous = this;
+ if (_collectionitem2 == null)
+ {
+ throw new ArgumentNullException(nameof(_collectionitem2));
+ }
+ _collectionitem2.Previous = this;
Init();
}
@@ -91,7 +102,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
diff --git a/Jellyfin.Data/Entities/Company.cs b/Jellyfin.Data/Entities/Company.cs
index 908e41f3de..e905a17daf 100644
--- a/Jellyfin.Data/Entities/Company.cs
+++ b/Jellyfin.Data/Entities/Company.cs
@@ -37,19 +37,39 @@ namespace Jellyfin.Data.Entities
/// <param name="_company4"></param>
public Company(MovieMetadata _moviemetadata0, SeriesMetadata _seriesmetadata1, MusicAlbumMetadata _musicalbummetadata2, BookMetadata _bookmetadata3, Company _company4)
{
- if (_moviemetadata0 == null) throw new ArgumentNullException(nameof(_moviemetadata0));
+ if (_moviemetadata0 == null)
+ {
+ throw new ArgumentNullException(nameof(_moviemetadata0));
+ }
+
_moviemetadata0.Studios.Add(this);
- if (_seriesmetadata1 == null) throw new ArgumentNullException(nameof(_seriesmetadata1));
+ if (_seriesmetadata1 == null)
+ {
+ throw new ArgumentNullException(nameof(_seriesmetadata1));
+ }
+
_seriesmetadata1.Networks.Add(this);
- if (_musicalbummetadata2 == null) throw new ArgumentNullException(nameof(_musicalbummetadata2));
+ if (_musicalbummetadata2 == null)
+ {
+ throw new ArgumentNullException(nameof(_musicalbummetadata2));
+ }
+
_musicalbummetadata2.Labels.Add(this);
- if (_bookmetadata3 == null) throw new ArgumentNullException(nameof(_bookmetadata3));
+ if (_bookmetadata3 == null)
+ {
+ throw new ArgumentNullException(nameof(_bookmetadata3));
+ }
+
_bookmetadata3.Publishers.Add(this);
- if (_company4 == null) throw new ArgumentNullException(nameof(_company4));
+ if (_company4 == null)
+ {
+ throw new ArgumentNullException(nameof(_company4));
+ }
+
_company4.Parent = this;
this.CompanyMetadata = new HashSet<CompanyMetadata>();
@@ -99,7 +119,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
diff --git a/Jellyfin.Data/Entities/CompanyMetadata.cs b/Jellyfin.Data/Entities/CompanyMetadata.cs
index 240cccbff5..e75349cf2a 100644
--- a/Jellyfin.Data/Entities/CompanyMetadata.cs
+++ b/Jellyfin.Data/Entities/CompanyMetadata.cs
@@ -26,20 +26,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_company0"></param>
public CompanyMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_company0 == null) throw new ArgumentNullException(nameof(_company0));
- _company0.CompanyMetadata.Add(this);
+ if (_company0 == null)
+ {
+ throw new ArgumentNullException(nameof(_company0));
+ }
+ _company0.CompanyMetadata.Add(this);
Init();
}
@@ -47,8 +58,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_company0"></param>
public static CompanyMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
{
@@ -83,7 +94,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Description;
GetDescription(ref value);
- return (_Description = value);
+ return _Description = value;
}
set
@@ -121,7 +132,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Headquarters;
GetHeadquarters(ref value);
- return (_Headquarters = value);
+ return _Headquarters = value;
}
set
@@ -159,7 +170,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Country;
GetCountry(ref value);
- return (_Country = value);
+ return _Country = value;
}
set
@@ -197,7 +208,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Homepage;
GetHomepage(ref value);
- return (_Homepage = value);
+ return _Homepage = value;
}
set
diff --git a/Jellyfin.Data/Entities/CustomItemMetadata.cs b/Jellyfin.Data/Entities/CustomItemMetadata.cs
index b81408aa68..965ed731f9 100644
--- a/Jellyfin.Data/Entities/CustomItemMetadata.cs
+++ b/Jellyfin.Data/Entities/CustomItemMetadata.cs
@@ -25,20 +25,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_customitem0"></param>
public CustomItemMetadata(string title, string language, DateTime dateadded, DateTime datemodified, CustomItem _customitem0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_customitem0 == null) throw new ArgumentNullException(nameof(_customitem0));
- _customitem0.CustomItemMetadata.Add(this);
+ if (_customitem0 == null)
+ {
+ throw new ArgumentNullException(nameof(_customitem0));
+ }
+ _customitem0.CustomItemMetadata.Add(this);
Init();
}
@@ -46,8 +57,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_customitem0"></param>
public static CustomItemMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, CustomItem _customitem0)
{
diff --git a/Jellyfin.Data/Entities/Episode.cs b/Jellyfin.Data/Entities/Episode.cs
index 405c815cd0..57fbf894bf 100644
--- a/Jellyfin.Data/Entities/Episode.cs
+++ b/Jellyfin.Data/Entities/Episode.cs
@@ -42,7 +42,11 @@ namespace Jellyfin.Data.Entities
this.UrlId = urlid;
- if (_season0 == null) throw new ArgumentNullException(nameof(_season0));
+ if (_season0 == null)
+ {
+ throw new ArgumentNullException(nameof(_season0));
+ }
+
_season0.Episodes.Add(this);
this.Releases = new HashSet<Release>();
@@ -84,7 +88,7 @@ namespace Jellyfin.Data.Entities
{
int? value = _EpisodeNumber;
GetEpisodeNumber(ref value);
- return (_EpisodeNumber = value);
+ return _EpisodeNumber = value;
}
set
diff --git a/Jellyfin.Data/Entities/EpisodeMetadata.cs b/Jellyfin.Data/Entities/EpisodeMetadata.cs
index 4999842aa2..9a21fd50f0 100644
--- a/Jellyfin.Data/Entities/EpisodeMetadata.cs
+++ b/Jellyfin.Data/Entities/EpisodeMetadata.cs
@@ -26,20 +26,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_episode0"></param>
public EpisodeMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Episode _episode0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_episode0 == null) throw new ArgumentNullException(nameof(_episode0));
- _episode0.EpisodeMetadata.Add(this);
+ if (_episode0 == null)
+ {
+ throw new ArgumentNullException(nameof(_episode0));
+ }
+ _episode0.EpisodeMetadata.Add(this);
Init();
}
@@ -47,8 +58,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_episode0"></param>
public static EpisodeMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Episode _episode0)
{
@@ -83,7 +94,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Outline;
GetOutline(ref value);
- return (_Outline = value);
+ return _Outline = value;
}
set
@@ -121,7 +132,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Plot;
GetPlot(ref value);
- return (_Plot = value);
+ return _Plot = value;
}
set
@@ -159,7 +170,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Tagline;
GetTagline(ref value);
- return (_Tagline = value);
+ return _Tagline = value;
}
set
diff --git a/Jellyfin.Data/Entities/Genre.cs b/Jellyfin.Data/Entities/Genre.cs
index 0f6f681a44..24e6815d80 100644
--- a/Jellyfin.Data/Entities/Genre.cs
+++ b/Jellyfin.Data/Entities/Genre.cs
@@ -31,12 +31,19 @@ namespace Jellyfin.Data.Entities
/// <param name="_metadata0"></param>
public Genre(string name, Metadata _metadata0)
{
- if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
+ if (string.IsNullOrEmpty(name))
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+
this.Name = name;
- if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
- _metadata0.Genres.Add(this);
+ if (_metadata0 == null)
+ {
+ throw new ArgumentNullException(nameof(_metadata0));
+ }
+ _metadata0.Genres.Add(this);
Init();
}
@@ -80,7 +87,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -119,7 +126,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
diff --git a/Jellyfin.Data/Entities/Group.cs b/Jellyfin.Data/Entities/Group.cs
index 5cbb126f9d..47833378e8 100644
--- a/Jellyfin.Data/Entities/Group.cs
+++ b/Jellyfin.Data/Entities/Group.cs
@@ -99,7 +99,7 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="name">The name of this group</param>
+ /// <param name="name">The name of this group.</param>
public static Group Create(string name)
{
return new Group(name);
diff --git a/Jellyfin.Data/Entities/Library.cs b/Jellyfin.Data/Entities/Library.cs
index a091ece03f..d935e43b14 100644
--- a/Jellyfin.Data/Entities/Library.cs
+++ b/Jellyfin.Data/Entities/Library.cs
@@ -30,9 +30,12 @@ namespace Jellyfin.Data.Entities
/// <param name="name"></param>
public Library(string name)
{
- if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
- this.Name = name;
+ if (string.IsNullOrEmpty(name))
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+ this.Name = name;
Init();
}
@@ -75,7 +78,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -114,7 +117,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
diff --git a/Jellyfin.Data/Entities/LibraryItem.cs b/Jellyfin.Data/Entities/LibraryItem.cs
index d29d6250e5..f41753560c 100644
--- a/Jellyfin.Data/Entities/LibraryItem.cs
+++ b/Jellyfin.Data/Entities/LibraryItem.cs
@@ -57,7 +57,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -95,7 +95,7 @@ namespace Jellyfin.Data.Entities
{
Guid value = _UrlId;
GetUrlId(ref value);
- return (_UrlId = value);
+ return _UrlId = value;
}
set
@@ -132,7 +132,7 @@ namespace Jellyfin.Data.Entities
{
DateTime value = _DateAdded;
GetDateAdded(ref value);
- return (_DateAdded = value);
+ return _DateAdded = value;
}
internal set
diff --git a/Jellyfin.Data/Entities/LibraryRoot.cs b/Jellyfin.Data/Entities/LibraryRoot.cs
index d9a4f62e50..9695ed638d 100644
--- a/Jellyfin.Data/Entities/LibraryRoot.cs
+++ b/Jellyfin.Data/Entities/LibraryRoot.cs
@@ -27,12 +27,15 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="path">Absolute Path</param>
+ /// <param name="path">Absolute Path.</param>
public LibraryRoot(string path)
{
- if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
- this.Path = path;
+ if (string.IsNullOrEmpty(path))
+ {
+ throw new ArgumentNullException(nameof(path));
+ }
+ this.Path = path;
Init();
}
@@ -40,7 +43,7 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="path">Absolute Path</param>
+ /// <param name="path">Absolute Path.</param>
public static LibraryRoot Create(string path)
{
return new LibraryRoot(path);
@@ -75,7 +78,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -115,7 +118,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Path;
GetPath(ref value);
- return (_Path = value);
+ return _Path = value;
}
set
@@ -154,7 +157,7 @@ namespace Jellyfin.Data.Entities
{
string value = _NetworkPath;
GetNetworkPath(ref value);
- return (_NetworkPath = value);
+ return _NetworkPath = value;
}
set
diff --git a/Jellyfin.Data/Entities/MediaFile.cs b/Jellyfin.Data/Entities/MediaFile.cs
index 6e6602bfae..7382cda95b 100644
--- a/Jellyfin.Data/Entities/MediaFile.cs
+++ b/Jellyfin.Data/Entities/MediaFile.cs
@@ -30,17 +30,25 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="path">Relative to the LibraryRoot</param>
+ /// <param name="path">Relative to the LibraryRoot.</param>
/// <param name="kind"></param>
/// <param name="_release0"></param>
public MediaFile(string path, Enums.MediaFileKind kind, Release _release0)
{
- if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
+ if (string.IsNullOrEmpty(path))
+ {
+ throw new ArgumentNullException(nameof(path));
+ }
+
this.Path = path;
this.Kind = kind;
- if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
+ if (_release0 == null)
+ {
+ throw new ArgumentNullException(nameof(_release0));
+ }
+
_release0.MediaFiles.Add(this);
this.MediaFileStreams = new HashSet<MediaFileStream>();
@@ -51,7 +59,7 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="path">Relative to the LibraryRoot</param>
+ /// <param name="path">Relative to the LibraryRoot.</param>
/// <param name="kind"></param>
/// <param name="_release0"></param>
public static MediaFile Create(string path, Enums.MediaFileKind kind, Release _release0)
@@ -88,7 +96,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -128,7 +136,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Path;
GetPath(ref value);
- return (_Path = value);
+ return _Path = value;
}
set
@@ -165,7 +173,7 @@ namespace Jellyfin.Data.Entities
{
Enums.MediaFileKind value = _Kind;
GetKind(ref value);
- return (_Kind = value);
+ return _Kind = value;
}
set
diff --git a/Jellyfin.Data/Entities/MediaFileStream.cs b/Jellyfin.Data/Entities/MediaFileStream.cs
index 823988d6c9..977fd54e19 100644
--- a/Jellyfin.Data/Entities/MediaFileStream.cs
+++ b/Jellyfin.Data/Entities/MediaFileStream.cs
@@ -33,9 +33,12 @@ namespace Jellyfin.Data.Entities
{
this.StreamNumber = streamnumber;
- if (_mediafile0 == null) throw new ArgumentNullException(nameof(_mediafile0));
- _mediafile0.MediaFileStreams.Add(this);
+ if (_mediafile0 == null)
+ {
+ throw new ArgumentNullException(nameof(_mediafile0));
+ }
+ _mediafile0.MediaFileStreams.Add(this);
Init();
}
@@ -79,7 +82,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -116,7 +119,7 @@ namespace Jellyfin.Data.Entities
{
int value = _StreamNumber;
GetStreamNumber(ref value);
- return (_StreamNumber = value);
+ return _StreamNumber = value;
}
set
diff --git a/Jellyfin.Data/Entities/Metadata.cs b/Jellyfin.Data/Entities/Metadata.cs
index a6ca61709a..a4ac6dc540 100644
--- a/Jellyfin.Data/Entities/Metadata.cs
+++ b/Jellyfin.Data/Entities/Metadata.cs
@@ -26,14 +26,22 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
protected Metadata(string title, string language, DateTime dateadded, DateTime datemodified)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
this.PersonRoles = new HashSet<PersonRole>();
@@ -74,7 +82,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -114,7 +122,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Title;
GetTitle(ref value);
- return (_Title = value);
+ return _Title = value;
}
set
@@ -152,7 +160,7 @@ namespace Jellyfin.Data.Entities
{
string value = _OriginalTitle;
GetOriginalTitle(ref value);
- return (_OriginalTitle = value);
+ return _OriginalTitle = value;
}
set
@@ -190,7 +198,7 @@ namespace Jellyfin.Data.Entities
{
string value = _SortTitle;
GetSortTitle(ref value);
- return (_SortTitle = value);
+ return _SortTitle = value;
}
set
@@ -231,7 +239,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Language;
GetLanguage(ref value);
- return (_Language = value);
+ return _Language = value;
}
set
@@ -264,7 +272,7 @@ namespace Jellyfin.Data.Entities
{
DateTimeOffset? value = _ReleaseDate;
GetReleaseDate(ref value);
- return (_ReleaseDate = value);
+ return _ReleaseDate = value;
}
set
@@ -301,7 +309,7 @@ namespace Jellyfin.Data.Entities
{
DateTime value = _DateAdded;
GetDateAdded(ref value);
- return (_DateAdded = value);
+ return _DateAdded = value;
}
internal set
@@ -338,7 +346,7 @@ namespace Jellyfin.Data.Entities
{
DateTime value = _DateModified;
GetDateModified(ref value);
- return (_DateModified = value);
+ return _DateModified = value;
}
internal set
diff --git a/Jellyfin.Data/Entities/MetadataProvider.cs b/Jellyfin.Data/Entities/MetadataProvider.cs
index 8c6c4000a0..e93ea97d62 100644
--- a/Jellyfin.Data/Entities/MetadataProvider.cs
+++ b/Jellyfin.Data/Entities/MetadataProvider.cs
@@ -30,9 +30,12 @@ namespace Jellyfin.Data.Entities
/// <param name="name"></param>
public MetadataProvider(string name)
{
- if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
- this.Name = name;
+ if (string.IsNullOrEmpty(name))
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+ this.Name = name;
Init();
}
@@ -75,7 +78,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -114,7 +117,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
diff --git a/Jellyfin.Data/Entities/MetadataProviderId.cs b/Jellyfin.Data/Entities/MetadataProviderId.cs
index 67ffc4f0cd..68f139436a 100644
--- a/Jellyfin.Data/Entities/MetadataProviderId.cs
+++ b/Jellyfin.Data/Entities/MetadataProviderId.cs
@@ -40,21 +40,40 @@ namespace Jellyfin.Data.Entities
// NOTE: This class has one-to-one associations with MetadataProviderId.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
- if (string.IsNullOrEmpty(providerid)) throw new ArgumentNullException(nameof(providerid));
+ if (string.IsNullOrEmpty(providerid))
+ {
+ throw new ArgumentNullException(nameof(providerid));
+ }
+
this.ProviderId = providerid;
- if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
+ if (_metadata0 == null)
+ {
+ throw new ArgumentNullException(nameof(_metadata0));
+ }
+
_metadata0.Sources.Add(this);
- if (_person1 == null) throw new ArgumentNullException(nameof(_person1));
+ if (_person1 == null)
+ {
+ throw new ArgumentNullException(nameof(_person1));
+ }
+
_person1.Sources.Add(this);
- if (_personrole2 == null) throw new ArgumentNullException(nameof(_personrole2));
+ if (_personrole2 == null)
+ {
+ throw new ArgumentNullException(nameof(_personrole2));
+ }
+
_personrole2.Sources.Add(this);
- if (_ratingsource3 == null) throw new ArgumentNullException(nameof(_ratingsource3));
- _ratingsource3.Source = this;
+ if (_ratingsource3 == null)
+ {
+ throw new ArgumentNullException(nameof(_ratingsource3));
+ }
+ _ratingsource3.Source = this;
Init();
}
@@ -101,7 +120,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -140,7 +159,7 @@ namespace Jellyfin.Data.Entities
{
string value = _ProviderId;
GetProviderId(ref value);
- return (_ProviderId = value);
+ return _ProviderId = value;
}
set
diff --git a/Jellyfin.Data/Entities/MovieMetadata.cs b/Jellyfin.Data/Entities/MovieMetadata.cs
index cb722c015f..cbcb78e374 100644
--- a/Jellyfin.Data/Entities/MovieMetadata.cs
+++ b/Jellyfin.Data/Entities/MovieMetadata.cs
@@ -30,18 +30,30 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_movie0"></param>
public MovieMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Movie _movie0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0));
+ if (_movie0 == null)
+ {
+ throw new ArgumentNullException(nameof(_movie0));
+ }
+
_movie0.MovieMetadata.Add(this);
this.Studios = new HashSet<Company>();
@@ -52,8 +64,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_movie0"></param>
public static MovieMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Movie _movie0)
{
@@ -88,7 +100,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Outline;
GetOutline(ref value);
- return (_Outline = value);
+ return _Outline = value;
}
set
@@ -126,7 +138,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Plot;
GetPlot(ref value);
- return (_Plot = value);
+ return _Plot = value;
}
set
@@ -164,7 +176,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Tagline;
GetTagline(ref value);
- return (_Tagline = value);
+ return _Tagline = value;
}
set
@@ -202,7 +214,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Country;
GetCountry(ref value);
- return (_Country = value);
+ return _Country = value;
}
set
diff --git a/Jellyfin.Data/Entities/MusicAlbumMetadata.cs b/Jellyfin.Data/Entities/MusicAlbumMetadata.cs
index 4b9f9cb626..bfcbebbe8a 100644
--- a/Jellyfin.Data/Entities/MusicAlbumMetadata.cs
+++ b/Jellyfin.Data/Entities/MusicAlbumMetadata.cs
@@ -30,18 +30,30 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_musicalbum0"></param>
public MusicAlbumMetadata(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
+ if (_musicalbum0 == null)
+ {
+ throw new ArgumentNullException(nameof(_musicalbum0));
+ }
+
_musicalbum0.MusicAlbumMetadata.Add(this);
this.Labels = new HashSet<Company>();
@@ -52,8 +64,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_musicalbum0"></param>
public static MusicAlbumMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
{
@@ -88,7 +100,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Barcode;
GetBarcode(ref value);
- return (_Barcode = value);
+ return _Barcode = value;
}
set
@@ -126,7 +138,7 @@ namespace Jellyfin.Data.Entities
{
string value = _LabelNumber;
GetLabelNumber(ref value);
- return (_LabelNumber = value);
+ return _LabelNumber = value;
}
set
@@ -164,7 +176,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Country;
GetCountry(ref value);
- return (_Country = value);
+ return _Country = value;
}
set
diff --git a/Jellyfin.Data/Entities/Person.cs b/Jellyfin.Data/Entities/Person.cs
index e9b91a19e8..b6d91ea869 100644
--- a/Jellyfin.Data/Entities/Person.cs
+++ b/Jellyfin.Data/Entities/Person.cs
@@ -36,7 +36,11 @@ namespace Jellyfin.Data.Entities
{
this.UrlId = urlid;
- if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
+ if (string.IsNullOrEmpty(name))
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+
this.Name = name;
this.Sources = new HashSet<MetadataProviderId>();
@@ -83,7 +87,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -120,7 +124,7 @@ namespace Jellyfin.Data.Entities
{
Guid value = _UrlId;
GetUrlId(ref value);
- return (_UrlId = value);
+ return _UrlId = value;
}
set
@@ -159,7 +163,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
@@ -197,7 +201,7 @@ namespace Jellyfin.Data.Entities
{
string value = _SourceId;
GetSourceId(ref value);
- return (_SourceId = value);
+ return _SourceId = value;
}
set
@@ -234,7 +238,7 @@ namespace Jellyfin.Data.Entities
{
DateTime value = _DateAdded;
GetDateAdded(ref value);
- return (_DateAdded = value);
+ return _DateAdded = value;
}
internal set
@@ -271,7 +275,7 @@ namespace Jellyfin.Data.Entities
{
DateTime value = _DateModified;
GetDateModified(ref value);
- return (_DateModified = value);
+ return _DateModified = value;
}
internal set
diff --git a/Jellyfin.Data/Entities/PersonRole.cs b/Jellyfin.Data/Entities/PersonRole.cs
index 2f14044ac2..2dd5f116fc 100644
--- a/Jellyfin.Data/Entities/PersonRole.cs
+++ b/Jellyfin.Data/Entities/PersonRole.cs
@@ -42,7 +42,11 @@ namespace Jellyfin.Data.Entities
this.Type = type;
- if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
+ if (_metadata0 == null)
+ {
+ throw new ArgumentNullException(nameof(_metadata0));
+ }
+
_metadata0.PersonRoles.Add(this);
this.Sources = new HashSet<MetadataProviderId>();
@@ -89,7 +93,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -127,7 +131,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Role;
GetRole(ref value);
- return (_Role = value);
+ return _Role = value;
}
set
@@ -164,7 +168,7 @@ namespace Jellyfin.Data.Entities
{
Enums.PersonRoleType value = _Type;
GetType(ref value);
- return (_Type = value);
+ return _Type = value;
}
set
diff --git a/Jellyfin.Data/Entities/PhotoMetadata.cs b/Jellyfin.Data/Entities/PhotoMetadata.cs
index 5a9cf5b66a..b5aec7229e 100644
--- a/Jellyfin.Data/Entities/PhotoMetadata.cs
+++ b/Jellyfin.Data/Entities/PhotoMetadata.cs
@@ -26,20 +26,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_photo0"></param>
public PhotoMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Photo _photo0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_photo0 == null) throw new ArgumentNullException(nameof(_photo0));
- _photo0.PhotoMetadata.Add(this);
+ if (_photo0 == null)
+ {
+ throw new ArgumentNullException(nameof(_photo0));
+ }
+ _photo0.PhotoMetadata.Add(this);
Init();
}
@@ -47,8 +58,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_photo0"></param>
public static PhotoMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Photo _photo0)
{
diff --git a/Jellyfin.Data/Entities/ProviderMapping.cs b/Jellyfin.Data/Entities/ProviderMapping.cs
index 4125eabcd6..c53e3bf408 100644
--- a/Jellyfin.Data/Entities/ProviderMapping.cs
+++ b/Jellyfin.Data/Entities/ProviderMapping.cs
@@ -34,15 +34,26 @@ namespace Jellyfin.Data.Entities
/// <param name="_group1"></param>
public ProviderMapping(string providername, string providersecrets, string providerdata, User _user0, Group _group1)
{
- if (string.IsNullOrEmpty(providername)) throw new ArgumentNullException(nameof(providername));
+ if (string.IsNullOrEmpty(providername))
+ {
+ throw new ArgumentNullException(nameof(providername));
+ }
+
this.ProviderName = providername;
- if (string.IsNullOrEmpty(providersecrets)) throw new ArgumentNullException(nameof(providersecrets));
+ if (string.IsNullOrEmpty(providersecrets))
+ {
+ throw new ArgumentNullException(nameof(providersecrets));
+ }
+
this.ProviderSecrets = providersecrets;
- if (string.IsNullOrEmpty(providerdata)) throw new ArgumentNullException(nameof(providerdata));
- this.ProviderData = providerdata;
+ if (string.IsNullOrEmpty(providerdata))
+ {
+ throw new ArgumentNullException(nameof(providerdata));
+ }
+ this.ProviderData = providerdata;
Init();
}
diff --git a/Jellyfin.Data/Entities/Rating.cs b/Jellyfin.Data/Entities/Rating.cs
index 2c27dbd496..49a0d502d2 100644
--- a/Jellyfin.Data/Entities/Rating.cs
+++ b/Jellyfin.Data/Entities/Rating.cs
@@ -33,9 +33,12 @@ namespace Jellyfin.Data.Entities
{
this.Value = value;
- if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
- _metadata0.Ratings.Add(this);
+ if (_metadata0 == null)
+ {
+ throw new ArgumentNullException(nameof(_metadata0));
+ }
+ _metadata0.Ratings.Add(this);
Init();
}
@@ -79,7 +82,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -116,7 +119,7 @@ namespace Jellyfin.Data.Entities
{
double value = _Value;
GetValue(ref value);
- return (_Value = value);
+ return _Value = value;
}
set
@@ -149,7 +152,7 @@ namespace Jellyfin.Data.Entities
{
int? value = _Votes;
GetVotes(ref value);
- return (_Votes = value);
+ return _Votes = value;
}
set
diff --git a/Jellyfin.Data/Entities/RatingSource.cs b/Jellyfin.Data/Entities/RatingSource.cs
index 2a4bed7ecc..b62d8b4443 100644
--- a/Jellyfin.Data/Entities/RatingSource.cs
+++ b/Jellyfin.Data/Entities/RatingSource.cs
@@ -39,9 +39,12 @@ namespace Jellyfin.Data.Entities
this.MinimumValue = minimumvalue;
- if (_rating0 == null) throw new ArgumentNullException(nameof(_rating0));
- _rating0.RatingType = this;
+ if (_rating0 == null)
+ {
+ throw new ArgumentNullException(nameof(_rating0));
+ }
+ _rating0.RatingType = this;
Init();
}
@@ -86,7 +89,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -124,7 +127,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
@@ -161,7 +164,7 @@ namespace Jellyfin.Data.Entities
{
double value = _MaximumValue;
GetMaximumValue(ref value);
- return (_MaximumValue = value);
+ return _MaximumValue = value;
}
set
@@ -198,7 +201,7 @@ namespace Jellyfin.Data.Entities
{
double value = _MinimumValue;
GetMinimumValue(ref value);
- return (_MinimumValue = value);
+ return _MinimumValue = value;
}
set
diff --git a/Jellyfin.Data/Entities/Release.cs b/Jellyfin.Data/Entities/Release.cs
index 098a78ca04..1e9faa5a1d 100644
--- a/Jellyfin.Data/Entities/Release.cs
+++ b/Jellyfin.Data/Entities/Release.cs
@@ -40,25 +40,53 @@ namespace Jellyfin.Data.Entities
/// <param name="_photo5"></param>
public Release(string name, Movie _movie0, Episode _episode1, Track _track2, CustomItem _customitem3, Book _book4, Photo _photo5)
{
- if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
+ if (string.IsNullOrEmpty(name))
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+
this.Name = name;
- if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0));
+ if (_movie0 == null)
+ {
+ throw new ArgumentNullException(nameof(_movie0));
+ }
+
_movie0.Releases.Add(this);
- if (_episode1 == null) throw new ArgumentNullException(nameof(_episode1));
+ if (_episode1 == null)
+ {
+ throw new ArgumentNullException(nameof(_episode1));
+ }
+
_episode1.Releases.Add(this);
- if (_track2 == null) throw new ArgumentNullException(nameof(_track2));
+ if (_track2 == null)
+ {
+ throw new ArgumentNullException(nameof(_track2));
+ }
+
_track2.Releases.Add(this);
- if (_customitem3 == null) throw new ArgumentNullException(nameof(_customitem3));
+ if (_customitem3 == null)
+ {
+ throw new ArgumentNullException(nameof(_customitem3));
+ }
+
_customitem3.Releases.Add(this);
- if (_book4 == null) throw new ArgumentNullException(nameof(_book4));
+ if (_book4 == null)
+ {
+ throw new ArgumentNullException(nameof(_book4));
+ }
+
_book4.Releases.Add(this);
- if (_photo5 == null) throw new ArgumentNullException(nameof(_photo5));
+ if (_photo5 == null)
+ {
+ throw new ArgumentNullException(nameof(_photo5));
+ }
+
_photo5.Releases.Add(this);
this.MediaFiles = new HashSet<MediaFile>();
@@ -111,7 +139,7 @@ namespace Jellyfin.Data.Entities
{
int value = _Id;
GetId(ref value);
- return (_Id = value);
+ return _Id = value;
}
protected set
@@ -150,7 +178,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Name;
GetName(ref value);
- return (_Name = value);
+ return _Name = value;
}
set
diff --git a/Jellyfin.Data/Entities/Season.cs b/Jellyfin.Data/Entities/Season.cs
index 03b3805cfb..4b1e785758 100644
--- a/Jellyfin.Data/Entities/Season.cs
+++ b/Jellyfin.Data/Entities/Season.cs
@@ -42,7 +42,11 @@ namespace Jellyfin.Data.Entities
this.UrlId = urlid;
- if (_series0 == null) throw new ArgumentNullException(nameof(_series0));
+ if (_series0 == null)
+ {
+ throw new ArgumentNullException(nameof(_series0));
+ }
+
_series0.Seasons.Add(this);
this.SeasonMetadata = new HashSet<SeasonMetadata>();
@@ -84,7 +88,7 @@ namespace Jellyfin.Data.Entities
{
int? value = _SeasonNumber;
GetSeasonNumber(ref value);
- return (_SeasonNumber = value);
+ return _SeasonNumber = value;
}
set
diff --git a/Jellyfin.Data/Entities/SeasonMetadata.cs b/Jellyfin.Data/Entities/SeasonMetadata.cs
index 35ff6e89ab..10d19875e6 100644
--- a/Jellyfin.Data/Entities/SeasonMetadata.cs
+++ b/Jellyfin.Data/Entities/SeasonMetadata.cs
@@ -27,20 +27,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_season0"></param>
public SeasonMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Season _season0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_season0 == null) throw new ArgumentNullException(nameof(_season0));
- _season0.SeasonMetadata.Add(this);
+ if (_season0 == null)
+ {
+ throw new ArgumentNullException(nameof(_season0));
+ }
+ _season0.SeasonMetadata.Add(this);
Init();
}
@@ -48,8 +59,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_season0"></param>
public static SeasonMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Season _season0)
{
@@ -84,7 +95,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Outline;
GetOutline(ref value);
- return (_Outline = value);
+ return _Outline = value;
}
set
diff --git a/Jellyfin.Data/Entities/Series.cs b/Jellyfin.Data/Entities/Series.cs
index 69b1854ab3..bede14acfb 100644
--- a/Jellyfin.Data/Entities/Series.cs
+++ b/Jellyfin.Data/Entities/Series.cs
@@ -65,7 +65,7 @@ namespace Jellyfin.Data.Entities
{
DayOfWeek? value = _AirsDayOfWeek;
GetAirsDayOfWeek(ref value);
- return (_AirsDayOfWeek = value);
+ return _AirsDayOfWeek = value;
}
set
@@ -101,7 +101,7 @@ namespace Jellyfin.Data.Entities
{
DateTimeOffset? value = _AirsTime;
GetAirsTime(ref value);
- return (_AirsTime = value);
+ return _AirsTime = value;
}
set
@@ -134,7 +134,7 @@ namespace Jellyfin.Data.Entities
{
DateTimeOffset? value = _FirstAired;
GetFirstAired(ref value);
- return (_FirstAired = value);
+ return _FirstAired = value;
}
set
diff --git a/Jellyfin.Data/Entities/SeriesMetadata.cs b/Jellyfin.Data/Entities/SeriesMetadata.cs
index e72de07fd4..16eb59315e 100644
--- a/Jellyfin.Data/Entities/SeriesMetadata.cs
+++ b/Jellyfin.Data/Entities/SeriesMetadata.cs
@@ -30,18 +30,30 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_series0"></param>
public SeriesMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Series _series0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_series0 == null) throw new ArgumentNullException(nameof(_series0));
+ if (_series0 == null)
+ {
+ throw new ArgumentNullException(nameof(_series0));
+ }
+
_series0.SeriesMetadata.Add(this);
this.Networks = new HashSet<Company>();
@@ -52,8 +64,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_series0"></param>
public static SeriesMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Series _series0)
{
@@ -88,7 +100,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Outline;
GetOutline(ref value);
- return (_Outline = value);
+ return _Outline = value;
}
set
@@ -126,7 +138,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Plot;
GetPlot(ref value);
- return (_Plot = value);
+ return _Plot = value;
}
set
@@ -164,7 +176,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Tagline;
GetTagline(ref value);
- return (_Tagline = value);
+ return _Tagline = value;
}
set
@@ -202,7 +214,7 @@ namespace Jellyfin.Data.Entities
{
string value = _Country;
GetCountry(ref value);
- return (_Country = value);
+ return _Country = value;
}
set
diff --git a/Jellyfin.Data/Entities/Track.cs b/Jellyfin.Data/Entities/Track.cs
index 59a9eb4af2..b7d7b5873b 100644
--- a/Jellyfin.Data/Entities/Track.cs
+++ b/Jellyfin.Data/Entities/Track.cs
@@ -42,7 +42,11 @@ namespace Jellyfin.Data.Entities
this.UrlId = urlid;
- if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
+ if (_musicalbum0 == null)
+ {
+ throw new ArgumentNullException(nameof(_musicalbum0));
+ }
+
_musicalbum0.Tracks.Add(this);
this.Releases = new HashSet<Release>();
@@ -84,7 +88,7 @@ namespace Jellyfin.Data.Entities
{
int? value = _TrackNumber;
GetTrackNumber(ref value);
- return (_TrackNumber = value);
+ return _TrackNumber = value;
}
set
diff --git a/Jellyfin.Data/Entities/TrackMetadata.cs b/Jellyfin.Data/Entities/TrackMetadata.cs
index 05bb953f8e..23e1219aaf 100644
--- a/Jellyfin.Data/Entities/TrackMetadata.cs
+++ b/Jellyfin.Data/Entities/TrackMetadata.cs
@@ -26,20 +26,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Public constructor with required data.
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_track0"></param>
public TrackMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Track _track0)
{
- if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
+ if (string.IsNullOrEmpty(title))
+ {
+ throw new ArgumentNullException(nameof(title));
+ }
+
this.Title = title;
- if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
+ if (string.IsNullOrEmpty(language))
+ {
+ throw new ArgumentNullException(nameof(language));
+ }
+
this.Language = language;
- if (_track0 == null) throw new ArgumentNullException(nameof(_track0));
- _track0.TrackMetadata.Add(this);
+ if (_track0 == null)
+ {
+ throw new ArgumentNullException(nameof(_track0));
+ }
+ _track0.TrackMetadata.Add(this);
Init();
}
@@ -47,8 +58,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Static create function (for use in LINQ queries, etc.)
/// </summary>
- /// <param name="title">The title or name of the object</param>
- /// <param name="language">ISO-639-3 3-character language codes</param>
+ /// <param name="title">The title or name of the object.</param>
+ /// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="_track0"></param>
public static TrackMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Track _track0)
{