mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 05:34:23 -04:00
Fix StudioId casing on the movie
This commit is contained in:
parent
e8f2a72516
commit
d01ef02389
@ -115,12 +115,12 @@ namespace Kyoo.Abstractions.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID of the Studio that made this show.
|
/// The ID of the Studio that made this show.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SerializeIgnore] public int? StudioID { get; set; }
|
[SerializeIgnore] public int? StudioId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Studio that made this show.
|
/// The Studio that made this show.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[LoadableRelation(nameof(StudioID))][EditableRelation] public Studio? Studio { get; set; }
|
[LoadableRelation(nameof(StudioId))][EditableRelation] public Studio? Studio { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The list of people that made this show.
|
/// The list of people that made this show.
|
||||||
|
@ -96,7 +96,7 @@ namespace Kyoo.Core.Controllers
|
|||||||
if (resource.Studio != null)
|
if (resource.Studio != null)
|
||||||
{
|
{
|
||||||
resource.Studio = await _studios.CreateIfNotExists(resource.Studio);
|
resource.Studio = await _studios.CreateIfNotExists(resource.Studio);
|
||||||
resource.StudioID = resource.Studio.Id;
|
resource.StudioId = resource.Studio.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resource.People != null)
|
if (resource.People != null)
|
||||||
@ -116,7 +116,7 @@ namespace Kyoo.Core.Controllers
|
|||||||
{
|
{
|
||||||
await Validate(changed);
|
await Validate(changed);
|
||||||
|
|
||||||
if (changed.Studio != null || changed.StudioID == null)
|
if (changed.Studio != null || changed.StudioId == null)
|
||||||
{
|
{
|
||||||
await Database.Entry(resource).Reference(x => x.Studio).LoadAsync();
|
await Database.Entry(resource).Reference(x => x.Studio).LoadAsync();
|
||||||
resource.Studio = changed.Studio;
|
resource.Studio = changed.Studio;
|
||||||
|
@ -53,7 +53,7 @@ namespace Kyoo.Meiliseach
|
|||||||
CamelCase.ConvertName(nameof(LibraryItem.Genres)),
|
CamelCase.ConvertName(nameof(LibraryItem.Genres)),
|
||||||
CamelCase.ConvertName(nameof(LibraryItem.Status)),
|
CamelCase.ConvertName(nameof(LibraryItem.Status)),
|
||||||
CamelCase.ConvertName(nameof(LibraryItem.AirDate)),
|
CamelCase.ConvertName(nameof(LibraryItem.AirDate)),
|
||||||
CamelCase.ConvertName(nameof(Movie.StudioID)),
|
CamelCase.ConvertName(nameof(Movie.StudioId)),
|
||||||
CamelCase.ConvertName(nameof(LibraryItem.Kind)),
|
CamelCase.ConvertName(nameof(LibraryItem.Kind)),
|
||||||
},
|
},
|
||||||
SortableAttributes = new[]
|
SortableAttributes = new[]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Kyoo.Abstractions.Models;
|
using Kyoo.Abstractions.Models;
|
||||||
@ -216,7 +216,7 @@ namespace Kyoo.Postgresql.Migrations
|
|||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("rating");
|
.HasColumnName("rating");
|
||||||
|
|
||||||
b.Property<int>("Runtime")
|
b.Property<int?>("Runtime")
|
||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("runtime");
|
.HasColumnName("runtime");
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ namespace Kyoo.Postgresql.Migrations
|
|||||||
.HasColumnType("status")
|
.HasColumnType("status")
|
||||||
.HasColumnName("status");
|
.HasColumnName("status");
|
||||||
|
|
||||||
b.Property<int?>("StudioID")
|
b.Property<int?>("StudioId")
|
||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("studio_id");
|
.HasColumnName("studio_id");
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ namespace Kyoo.Postgresql.Migrations
|
|||||||
.IsUnique()
|
.IsUnique()
|
||||||
.HasDatabaseName("ix_movies_slug");
|
.HasDatabaseName("ix_movies_slug");
|
||||||
|
|
||||||
b.HasIndex("StudioID")
|
b.HasIndex("StudioId")
|
||||||
.HasDatabaseName("ix_movies_studio_id");
|
.HasDatabaseName("ix_movies_studio_id");
|
||||||
|
|
||||||
b.ToTable("movies", (string)null);
|
b.ToTable("movies", (string)null);
|
||||||
@ -408,7 +408,7 @@ namespace Kyoo.Postgresql.Migrations
|
|||||||
.HasColumnType("text")
|
.HasColumnType("text")
|
||||||
.HasColumnName("path");
|
.HasColumnName("path");
|
||||||
|
|
||||||
b.Property<int>("Rating")
|
b.Property<int?>("Rating")
|
||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("rating");
|
.HasColumnName("rating");
|
||||||
|
|
||||||
@ -1133,7 +1133,7 @@ namespace Kyoo.Postgresql.Migrations
|
|||||||
{
|
{
|
||||||
b.HasOne("Kyoo.Abstractions.Models.Studio", "Studio")
|
b.HasOne("Kyoo.Abstractions.Models.Studio", "Studio")
|
||||||
.WithMany("Movies")
|
.WithMany("Movies")
|
||||||
.HasForeignKey("StudioID")
|
.HasForeignKey("StudioId")
|
||||||
.OnDelete(DeleteBehavior.SetNull)
|
.OnDelete(DeleteBehavior.SetNull)
|
||||||
.HasConstraintName("fk_movies_studios_studio_id");
|
.HasConstraintName("fk_movies_studios_studio_id");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user