mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Cleaning up
This commit is contained in:
parent
8c8db5e9b6
commit
253b8561bc
@ -96,18 +96,13 @@ namespace Kyoo.Models
|
||||
EpisodeNumber = other.EpisodeNumber;
|
||||
if (AbsoluteNumber == -1)
|
||||
AbsoluteNumber = other.AbsoluteNumber;
|
||||
if (Path == null)
|
||||
Path = other.Path;
|
||||
if (Title == null)
|
||||
Title = other.Title;
|
||||
if (Overview == null)
|
||||
Overview = other.Overview;
|
||||
if (ReleaseDate == null)
|
||||
ReleaseDate = other.ReleaseDate;
|
||||
Path ??= other.Path;
|
||||
Title ??= other.Title;
|
||||
Overview ??= other.Overview;
|
||||
ReleaseDate ??= other.ReleaseDate;
|
||||
if (Runtime == -1)
|
||||
Runtime = other.Runtime;
|
||||
if (ImgPrimary == null)
|
||||
ImgPrimary = other.ImgPrimary;
|
||||
ImgPrimary ??= other.ImgPrimary;
|
||||
ExternalIDs += '|' + other.ExternalIDs;
|
||||
return this;
|
||||
}
|
||||
|
@ -26,12 +26,9 @@ namespace Kyoo.Models
|
||||
{
|
||||
if (other == null)
|
||||
return this;
|
||||
if (Slug == null)
|
||||
Slug = other.Slug;
|
||||
if (Name == null)
|
||||
Name = other.Name;
|
||||
if (ImgPrimary == null)
|
||||
ImgPrimary = other.ImgPrimary;
|
||||
Slug ??= other.Slug;
|
||||
Name ??= other.Name;
|
||||
ImgPrimary ??= other.ImgPrimary;
|
||||
ExternalIDs += '|' + other.ExternalIDs;
|
||||
return this;
|
||||
}
|
||||
|
@ -40,14 +40,10 @@ namespace Kyoo.Models
|
||||
ShowID = other.ShowID;
|
||||
if (SeasonNumber == -1)
|
||||
SeasonNumber = other.SeasonNumber;
|
||||
if (Title == null)
|
||||
Title = other.Title;
|
||||
if (Overview == null)
|
||||
Overview = other.Overview;
|
||||
if (Year == null)
|
||||
Year = other.Year;
|
||||
if (ImgPrimary == null)
|
||||
ImgPrimary = other.ImgPrimary;
|
||||
Title ??= other.Title;
|
||||
Overview ??= other.Overview;
|
||||
Year ??= other.Year;
|
||||
ImgPrimary ??= other.ImgPrimary;
|
||||
ExternalIDs += '|' + other.ExternalIDs;
|
||||
return this;
|
||||
}
|
||||
|
@ -107,38 +107,20 @@ namespace Kyoo.Models
|
||||
return this;
|
||||
if (ID == -1)
|
||||
ID = other.ID;
|
||||
if (Slug == null)
|
||||
Slug = other.Slug;
|
||||
if (Title == null)
|
||||
Title = other.Title;
|
||||
if (Aliases == null)
|
||||
Aliases = other.Aliases;
|
||||
else
|
||||
Aliases = Aliases.Concat(other.Aliases).ToArray();
|
||||
if (Genres == null)
|
||||
Genres = other.Genres;
|
||||
else
|
||||
Genres = Genres.Concat(other.Genres);
|
||||
if (Path == null)
|
||||
Path = other.Path;
|
||||
if (Overview == null)
|
||||
Overview = other.Overview;
|
||||
if (TrailerUrl == null)
|
||||
TrailerUrl = other.TrailerUrl;
|
||||
if (Status == null)
|
||||
Status = other.Status;
|
||||
if (StartYear == null)
|
||||
StartYear = other.StartYear;
|
||||
if (EndYear == null)
|
||||
EndYear = other.EndYear;
|
||||
if (ImgPrimary == null)
|
||||
ImgPrimary = other.ImgPrimary;
|
||||
if (ImgThumb == null)
|
||||
ImgThumb = other.ImgThumb;
|
||||
if (ImgLogo == null)
|
||||
ImgLogo = other.ImgLogo;
|
||||
if (ImgBackdrop == null)
|
||||
ImgBackdrop = other.ImgBackdrop;
|
||||
Slug ??= other.Slug;
|
||||
Title ??= other.Title;
|
||||
Aliases = Aliases == null ? other.Aliases : Aliases.Concat(other.Aliases).ToArray();
|
||||
Genres = Genres == null ? other.Genres : Genres.Concat(other.Genres);
|
||||
Path ??= other.Path;
|
||||
Overview ??= other.Overview;
|
||||
TrailerUrl ??= other.TrailerUrl;
|
||||
Status ??= other.Status;
|
||||
StartYear ??= other.StartYear;
|
||||
EndYear ??= other.EndYear;
|
||||
ImgPrimary ??= other.ImgPrimary;
|
||||
ImgThumb ??= other.ImgThumb;
|
||||
ImgLogo ??= other.ImgLogo;
|
||||
ImgBackdrop ??= other.ImgBackdrop;
|
||||
ExternalIDs += '|' + other.ExternalIDs;
|
||||
return this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user