fix emby tag sync for movies and shows (#975)
This commit is contained in:
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Fix scaling logic for `Nvidia` acceleration and software mode
|
- Fix scaling logic for `Nvidia` acceleration and software mode
|
||||||
- Attempt to position watermarks within content (not over added black padding)
|
- Attempt to position watermarks within content (not over added black padding)
|
||||||
- Fix search results for `Other Videos` when NFO metadata is used
|
- Fix search results for `Other Videos` when NFO metadata is used
|
||||||
|
- Properly synchronize tags from Emby movies and shows
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Add `QSV Device` option to ffmpeg profile on linux
|
- Add `QSV Device` option to ffmpeg profile on linux
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ public class EmbyApiClient : IEmbyApiClient
|
|||||||
DateAdded = dateAdded,
|
DateAdded = dateAdded,
|
||||||
ContentRating = item.OfficialRating,
|
ContentRating = item.OfficialRating,
|
||||||
Genres = Optional(item.Genres).Flatten().Map(g => new Genre { Name = g }).ToList(),
|
Genres = Optional(item.Genres).Flatten().Map(g => new Genre { Name = g }).ToList(),
|
||||||
Tags = Optional(item.Tags).Flatten().Map(t => new Tag { Name = t }).ToList(),
|
Tags = Optional(item.TagItems).Flatten().Map(t => new Tag { Name = t.Name }).ToList(),
|
||||||
Studios = Optional(item.Studios).Flatten().Map(s => new Studio { Name = s.Name }).ToList(),
|
Studios = Optional(item.Studios).Flatten().Map(s => new Studio { Name = s.Name }).ToList(),
|
||||||
Actors = Optional(item.People).Flatten().Collect(r => ProjectToActor(r, dateAdded)).ToList(),
|
Actors = Optional(item.People).Flatten().Collect(r => ProjectToActor(r, dateAdded)).ToList(),
|
||||||
Directors = Optional(item.People).Flatten().Collect(r => ProjectToDirector(r)).ToList(),
|
Directors = Optional(item.People).Flatten().Collect(r => ProjectToDirector(r)).ToList(),
|
||||||
@@ -507,7 +507,7 @@ public class EmbyApiClient : IEmbyApiClient
|
|||||||
DateAdded = dateAdded,
|
DateAdded = dateAdded,
|
||||||
ContentRating = item.OfficialRating,
|
ContentRating = item.OfficialRating,
|
||||||
Genres = Optional(item.Genres).Flatten().Map(g => new Genre { Name = g }).ToList(),
|
Genres = Optional(item.Genres).Flatten().Map(g => new Genre { Name = g }).ToList(),
|
||||||
Tags = Optional(item.Tags).Flatten().Map(t => new Tag { Name = t }).ToList(),
|
Tags = Optional(item.TagItems).Flatten().Map(t => new Tag { Name = t.Name }).ToList(),
|
||||||
Studios = Optional(item.Studios).Flatten().Map(s => new Studio { Name = s.Name }).ToList(),
|
Studios = Optional(item.Studios).Flatten().Map(s => new Studio { Name = s.Name }).ToList(),
|
||||||
Actors = Optional(item.People).Flatten().Collect(r => ProjectToActor(r, dateAdded)).ToList(),
|
Actors = Optional(item.People).Flatten().Collect(r => ProjectToActor(r, dateAdded)).ToList(),
|
||||||
Artwork = new List<Artwork>(),
|
Artwork = new List<Artwork>(),
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class EmbyLibraryItemResponse
|
|||||||
public DateTimeOffset DateCreated { get; set; }
|
public DateTimeOffset DateCreated { get; set; }
|
||||||
public long RunTimeTicks { get; set; }
|
public long RunTimeTicks { get; set; }
|
||||||
public List<string> Genres { get; set; }
|
public List<string> Genres { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<EmbyTagItemResponse> TagItems { get; set; }
|
||||||
public int ProductionYear { get; set; }
|
public int ProductionYear { get; set; }
|
||||||
public EmbyProviderIdsResponse ProviderIds { get; set; }
|
public EmbyProviderIdsResponse ProviderIds { get; set; }
|
||||||
public string PremiereDate { get; set; }
|
public string PremiereDate { get; set; }
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ErsatzTV.Infrastructure.Emby.Models;
|
||||||
|
|
||||||
|
public class EmbyTagItemResponse
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
Generated
+4306
File diff suppressed because it is too large
Load Diff
+40
@@ -0,0 +1,40 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
public partial class Reset_EmbyMovieShowEtagForTagItems : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
// clear etag on all emby movies
|
||||||
|
migrationBuilder.Sql(@"UPDATE EmbyMovie SET Etag = NULL");
|
||||||
|
|
||||||
|
// clear etag on all emby shows
|
||||||
|
migrationBuilder.Sql(@"UPDATE EmbyShow SET Etag = NULL");
|
||||||
|
|
||||||
|
// force scanning libraries with NULL etag movies
|
||||||
|
migrationBuilder.Sql(
|
||||||
|
@"UPDATE Library SET LastScan = '0001-01-01 00:00:00' WHERE Library.Id IN
|
||||||
|
(SELECT DISTINCT Library.Id FROM Library
|
||||||
|
INNER JOIN LibraryPath LP on Library.Id = LP.LibraryId
|
||||||
|
INNER JOIN MediaItem MI on LP.Id = MI.LibraryPathId
|
||||||
|
INNER JOIN EmbyMovie EM ON MI.Id = EM.Id
|
||||||
|
WHERE EM.Etag IS NULL)");
|
||||||
|
|
||||||
|
// force scanning libraries with NULL etag shows
|
||||||
|
migrationBuilder.Sql(
|
||||||
|
@"UPDATE Library SET LastScan = '0001-01-01 00:00:00' WHERE Library.Id IN
|
||||||
|
(SELECT DISTINCT Library.Id FROM Library
|
||||||
|
INNER JOIN LibraryPath LP on Library.Id = LP.LibraryId
|
||||||
|
INNER JOIN MediaItem MI on LP.Id = MI.LibraryPathId
|
||||||
|
INNER JOIN EmbyShow ES ON MI.Id = ES.Id
|
||||||
|
WHERE ES.Etag IS NULL)");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace ErsatzTV.Infrastructure.Migrations
|
|||||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.8");
|
modelBuilder.HasAnnotation("ProductVersion", "6.0.9");
|
||||||
|
|
||||||
modelBuilder.Entity("ErsatzTV.Core.Domain.Actor", b =>
|
modelBuilder.Entity("ErsatzTV.Core.Domain.Actor", b =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user