Browse Source

fix disappearing collection tags (#1517)

pull/1519/head
Jason Dove 2 years ago committed by GitHub
parent
commit
24780cbe84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 4455
      ErsatzTV.Infrastructure.MySql/Migrations/20231201022751_Reset_ExternalCollectionEtag.Designer.cs
  3. 28
      ErsatzTV.Infrastructure.MySql/Migrations/20231201022751_Reset_ExternalCollectionEtag.cs
  4. 2
      ErsatzTV.Infrastructure.MySql/Migrations/TvContextModelSnapshot.cs
  5. 4453
      ErsatzTV.Infrastructure.Sqlite/Migrations/20231201003815_Reset_ExternalCollectionEtag.Designer.cs
  6. 28
      ErsatzTV.Infrastructure.Sqlite/Migrations/20231201003815_Reset_ExternalCollectionEtag.cs
  7. 2
      ErsatzTV.Infrastructure.Sqlite/Migrations/TvContextModelSnapshot.cs
  8. 1
      ErsatzTV.Infrastructure/Data/Repositories/EmbyTelevisionRepository.cs
  9. 1
      ErsatzTV.Infrastructure/Data/Repositories/JellyfinTelevisionRepository.cs
  10. 1
      ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs
  11. 3
      ErsatzTV.Scanner/Core/Plex/PlexTelevisionLibraryScanner.cs

2
CHANGELOG.md

@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Fix playout builder crash with improperly configured pad filler preset
- Properly validate filler preset mode pad to require `filler pad to nearest minute` value
- Fix bug where previously-synchronized collection tags would disappear
- This bug affected Jellyfin, Emby and Plex collections
## [0.8.3-beta] - 2023-11-22
### Added

4455
ErsatzTV.Infrastructure.MySql/Migrations/20231201022751_Reset_ExternalCollectionEtag.Designer.cs generated

File diff suppressed because it is too large Load Diff

28
ErsatzTV.Infrastructure.MySql/Migrations/20231201022751_Reset_ExternalCollectionEtag.cs

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
/// <inheritdoc />
public partial class Reset_ExternalCollectionEtag : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("UPDATE PlexCollection SET Etag = NULL");
migrationBuilder.Sql("UPDATE PlexMediaSource SET LastCollectionsScan = NULL");
migrationBuilder.Sql("UPDATE EmbyCollection SET Etag = NULL");
migrationBuilder.Sql("UPDATE EmbyMediaSource SET LastCollectionsScan = NULL");
migrationBuilder.Sql("UPDATE JellyfinCollection SET Etag = NULL");
migrationBuilder.Sql("UPDATE JellyfinMediaSource SET LastCollectionsScan = NULL");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

2
ErsatzTV.Infrastructure.MySql/Migrations/TvContextModelSnapshot.cs

@ -16,7 +16,7 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations @@ -16,7 +16,7 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.13")
.HasAnnotation("ProductVersion", "7.0.14")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ErsatzTV.Core.Domain.Actor", b =>

4453
ErsatzTV.Infrastructure.Sqlite/Migrations/20231201003815_Reset_ExternalCollectionEtag.Designer.cs generated

File diff suppressed because it is too large Load Diff

28
ErsatzTV.Infrastructure.Sqlite/Migrations/20231201003815_Reset_ExternalCollectionEtag.cs

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
/// <inheritdoc />
public partial class Reset_ExternalCollectionEtag : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("UPDATE PlexCollection SET Etag = NULL");
migrationBuilder.Sql("UPDATE PlexMediaSource SET LastCollectionsScan = NULL");
migrationBuilder.Sql("UPDATE EmbyCollection SET Etag = NULL");
migrationBuilder.Sql("UPDATE EmbyMediaSource SET LastCollectionsScan = NULL");
migrationBuilder.Sql("UPDATE JellyfinCollection SET Etag = NULL");
migrationBuilder.Sql("UPDATE JellyfinMediaSource SET LastCollectionsScan = NULL");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

2
ErsatzTV.Infrastructure.Sqlite/Migrations/TvContextModelSnapshot.cs

@ -15,7 +15,7 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations @@ -15,7 +15,7 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.13");
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
modelBuilder.Entity("ErsatzTV.Core.Domain.Actor", b =>
{

1
ErsatzTV.Infrastructure/Data/Repositories/EmbyTelevisionRepository.cs

@ -733,6 +733,7 @@ public class EmbyTelevisionRepository : IEmbyTelevisionRepository @@ -733,6 +733,7 @@ public class EmbyTelevisionRepository : IEmbyTelevisionRepository
// tags
foreach (Tag tag in metadata.Tags
.Filter(g => incomingMetadata.Tags.All(g2 => g2.Name != g.Name))
.Filter(g => g.ExternalCollectionId is null)
.ToList())
{
metadata.Tags.Remove(tag);

1
ErsatzTV.Infrastructure/Data/Repositories/JellyfinTelevisionRepository.cs

@ -737,6 +737,7 @@ public class JellyfinTelevisionRepository : IJellyfinTelevisionRepository @@ -737,6 +737,7 @@ public class JellyfinTelevisionRepository : IJellyfinTelevisionRepository
// tags
foreach (Tag tag in metadata.Tags
.Filter(g => incomingMetadata.Tags.All(g2 => g2.Name != g.Name))
.Filter(g => g.ExternalCollectionId is null)
.ToList())
{
metadata.Tags.Remove(tag);

1
ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs

@ -318,6 +318,7 @@ public class PlexMovieLibraryScanner : @@ -318,6 +318,7 @@ public class PlexMovieLibraryScanner :
foreach (Tag tag in existingMetadata.Tags
.Filter(g => fullMetadata.Tags.All(g2 => g2.Name != g.Name))
.Filter(g => g.ExternalCollectionId is null)
.ToList())
{
existingMetadata.Tags.Remove(tag);

3
ErsatzTV.Scanner/Core/Plex/PlexTelevisionLibraryScanner.cs

@ -413,6 +413,7 @@ public class PlexTelevisionLibraryScanner : @@ -413,6 +413,7 @@ public class PlexTelevisionLibraryScanner :
foreach (Tag tag in existingMetadata.Tags
.Filter(g => fullMetadata.Tags.All(g2 => g2.Name != g.Name))
.Filter(g => g.ExternalCollectionId is null)
.ToList())
{
existingMetadata.Tags.Remove(tag);
@ -479,6 +480,7 @@ public class PlexTelevisionLibraryScanner : @@ -479,6 +480,7 @@ public class PlexTelevisionLibraryScanner :
foreach (Tag tag in existingMetadata.Tags
.Filter(g => fullMetadata.Tags.All(g2 => g2.Name != g.Name))
.Filter(g => g.ExternalCollectionId is null)
.ToList())
{
existingMetadata.Tags.Remove(tag);
@ -540,6 +542,7 @@ public class PlexTelevisionLibraryScanner : @@ -540,6 +542,7 @@ public class PlexTelevisionLibraryScanner :
foreach (Tag tag in existingMetadata.Tags
.Filter(g => fullMetadata.Tags.All(g2 => g2.Name != g.Name))
.Filter(g => g.ExternalCollectionId is null)
.ToList())
{
existingMetadata.Tags.Remove(tag);

Loading…
Cancel
Save