Hopefully provide a fix now for #2998

Theory is that the refresh metadata was using stale data and then overriding the availbility that just happened on that media item.
This commit is contained in:
tidusjar 2019-10-16 21:41:17 +01:00
parent 7a72496c78
commit 1286c40f82
17 changed files with 1314 additions and 221 deletions

View file

@ -53,6 +53,8 @@ namespace Ombi.Store.Entities
public DateTime AddedAt { get; set; }
public string Quality { get; set; }
public int? RequestId { get; set; }
[NotMapped]
public bool HasImdb => !string.IsNullOrEmpty(ImdbId);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Ombi.Store.Migrations
{
public partial class RequestIdOnPlexContent : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "RequestId",
table: "PlexServerContent",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RequestId",
table: "PlexServerContent");
}
}
}

View file

@ -14,7 +14,7 @@ namespace Ombi.Store.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.1-servicing-10028");
.HasAnnotation("ProductVersion", "2.2.2-servicing-10034");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
@ -455,6 +455,8 @@ namespace Ombi.Store.Migrations
b.Property<string>("ReleaseYear");
b.Property<int?>("RequestId");
b.Property<string>("TheMovieDbId");
b.Property<string>("Title");

View file

@ -90,8 +90,8 @@ namespace Ombi.Store.Repository
.WaitAndRetryAsync(new[]
{
TimeSpan.FromSeconds(1),
TimeSpan.FromSeconds(2),
TimeSpan.FromSeconds(3)
TimeSpan.FromSeconds(5),
TimeSpan.FromSeconds(10)
});
var result = await policy.ExecuteAndCaptureAsync(async () =>