mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fix seasons refresh
This commit is contained in:
parent
629acf4855
commit
9a81da0154
1395
back/src/Kyoo.Postgresql/Migrations/20240506175054_FixSeasonMetadataId.Designer.cs
generated
Normal file
1395
back/src/Kyoo.Postgresql/Migrations/20240506175054_FixSeasonMetadataId.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kyoo.Postgresql.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixSeasonMetadataId : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// language=PostgreSQL
|
||||
migrationBuilder.Sql(
|
||||
"""
|
||||
update seasons as s set external_id = (
|
||||
SELECT jsonb_build_object(
|
||||
'themoviedatabase', jsonb_build_object(
|
||||
'DataId', sh.external_id->'themoviedatabase'->'DataId',
|
||||
'Link', s.external_id->'themoviedatabase'->'Link'
|
||||
)
|
||||
)
|
||||
FROM shows AS sh
|
||||
WHERE sh.id = s.show_id
|
||||
);
|
||||
"""
|
||||
);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
}
|
||||
}
|
@ -377,7 +377,7 @@ class TheMovieDatabase(Provider):
|
||||
end_air=None,
|
||||
external_id={
|
||||
self.name: MetadataID(
|
||||
season["id"],
|
||||
show_id,
|
||||
f"https://www.themoviedb.org/tv/{show_id}/season/{season['season_number']}",
|
||||
)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user