mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fix missing name errors 500
This commit is contained in:
parent
e12a1d369d
commit
b2f4933a5f
@ -75,9 +75,12 @@ namespace Kyoo.Abstractions.Models
|
|||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Collection(string name)
|
public Collection(string name)
|
||||||
|
{
|
||||||
|
if (name != null)
|
||||||
{
|
{
|
||||||
Slug = Utility.ToSlug(name);
|
Slug = Utility.ToSlug(name);
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -82,7 +82,7 @@ namespace Kyoo.Abstractions.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID of the Show containing this episode.
|
/// The ID of the Show containing this episode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SerializeIgnore] public int ShowId { get; set; }
|
public int ShowId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The show that contains this episode.
|
/// The show that contains this episode.
|
||||||
@ -92,7 +92,7 @@ namespace Kyoo.Abstractions.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID of the Season containing this episode.
|
/// The ID of the Season containing this episode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SerializeIgnore] public int? SeasonId { get; set; }
|
public int? SeasonId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The season that contains this episode.
|
/// The season that contains this episode.
|
||||||
|
@ -155,9 +155,12 @@ namespace Kyoo.Abstractions.Models
|
|||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Movie(string name)
|
public Movie(string name)
|
||||||
|
{
|
||||||
|
if (name != null)
|
||||||
{
|
{
|
||||||
Slug = Utility.ToSlug(name);
|
Slug = Utility.ToSlug(name);
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -62,9 +62,12 @@ namespace Kyoo.Abstractions.Models
|
|||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public People(string name)
|
public People(string name)
|
||||||
|
{
|
||||||
|
if (name != null)
|
||||||
{
|
{
|
||||||
Slug = Utility.ToSlug(name);
|
Slug = Utility.ToSlug(name);
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -23,7 +23,6 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using EntityFrameworkCore.Projectables;
|
using EntityFrameworkCore.Projectables;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Kyoo.Abstractions.Controllers;
|
|
||||||
using Kyoo.Abstractions.Models.Attributes;
|
using Kyoo.Abstractions.Models.Attributes;
|
||||||
|
|
||||||
namespace Kyoo.Abstractions.Models
|
namespace Kyoo.Abstractions.Models
|
||||||
@ -69,7 +68,7 @@ namespace Kyoo.Abstractions.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID of the Show containing this season.
|
/// The ID of the Show containing this season.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SerializeIgnore] public int ShowId { get; set; }
|
public int ShowId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The show that contains this season.
|
/// The show that contains this season.
|
||||||
|
@ -182,11 +182,14 @@ namespace Kyoo.Abstractions.Models
|
|||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Show(string name)
|
public Show(string name)
|
||||||
|
{
|
||||||
|
if (name != null)
|
||||||
{
|
{
|
||||||
Slug = Utility.ToSlug(name);
|
Slug = Utility.ToSlug(name);
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The enum containing show's status.
|
/// The enum containing show's status.
|
||||||
|
@ -65,9 +65,12 @@ namespace Kyoo.Abstractions.Models
|
|||||||
/// <param name="name">The name of the studio.</param>
|
/// <param name="name">The name of the studio.</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Studio(string name)
|
public Studio(string name)
|
||||||
|
{
|
||||||
|
if (name != null)
|
||||||
{
|
{
|
||||||
Slug = Utility.ToSlug(name);
|
Slug = Utility.ToSlug(name);
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -82,9 +82,12 @@ namespace Kyoo.Abstractions.Models
|
|||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public User(string username)
|
public User(string username)
|
||||||
|
{
|
||||||
|
if (username != null)
|
||||||
{
|
{
|
||||||
Slug = Utility.ToSlug(username);
|
Slug = Utility.ToSlug(username);
|
||||||
Username = username;
|
Username = username;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user