albums, NewsletterSettings settings, EmbySettings embySettings,
+ PlexSettings plexSettings)
{
var ombiSettings = await _ombiSettings.GetSettingsAsync();
var sb = new StringBuilder();
@@ -349,8 +352,16 @@ namespace Ombi.Schedule.Jobs.Ombi
sb.Append("");
sb.Append("");
sb.Append("");
- await ProcessPlexMovies(plexMovies, sb, ombiSettings.DefaultLanguageCode);
- await ProcessEmbyMovies(embyMovies, sb, ombiSettings.DefaultLanguageCode);
+ if (plexSettings.Enable)
+ {
+ await ProcessPlexMovies(plexMovies, sb, ombiSettings.DefaultLanguageCode);
+ }
+
+ if (embySettings.Enable)
+ {
+ await ProcessEmbyMovies(embyMovies, sb, ombiSettings.DefaultLanguageCode);
+ }
+
sb.Append(" ");
sb.Append(" ");
sb.Append(" | ");
@@ -367,8 +378,16 @@ namespace Ombi.Schedule.Jobs.Ombi
sb.Append("");
sb.Append("");
sb.Append("");
- await ProcessPlexTv(plexEpisodes, sb);
- await ProcessEmbyTv(embyEp, sb);
+ if (plexSettings.Enable)
+ {
+ await ProcessPlexTv(plexEpisodes, sb);
+ }
+
+ if (embySettings.Enable)
+ {
+ await ProcessEmbyTv(embyEp, sb);
+ }
+
sb.Append(" ");
sb.Append(" ");
sb.Append(" | ");
diff --git a/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs b/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs
index 5ec8978b6..783fe5f9d 100644
--- a/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs
+++ b/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs
@@ -5,18 +5,13 @@ using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
-using System.Net.Http;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Hangfire;
-using Hangfire.Console;
using Hangfire.Server;
using Microsoft.Extensions.Logging;
-
-using Ombi.Api.Service;
-using Ombi.Api.Service.Models;
using Ombi.Core.Processor;
using Ombi.Core.Settings;
using Ombi.Helpers;
@@ -40,7 +35,6 @@ namespace Ombi.Schedule.Jobs.Ombi
Settings = s;
_processProvider = proc;
_appConfig = appConfig;
- Settings.ClearCache();
}
private ILogger Logger { get; }
diff --git a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs
index d58c29ddc..c9ba5c6b3 100644
--- a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs
+++ b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using Hangfire;
using Microsoft.Extensions.Logging;
+using Ombi.Api.Emby;
using Ombi.Api.TheMovieDb;
using Ombi.Api.TheMovieDb.Models;
using Ombi.Api.TvMaze;
@@ -21,7 +22,8 @@ namespace Ombi.Schedule.Jobs.Ombi
{
public RefreshMetadata(IPlexContentRepository plexRepo, IEmbyContentRepository embyRepo,
ILogger log, ITvMazeApi tvApi, ISettingsService plexSettings,
- IMovieDbApi movieApi, ISettingsService embySettings, IPlexAvailabilityChecker plexAvailability, IEmbyAvaliabilityChecker embyAvaliability)
+ IMovieDbApi movieApi, ISettingsService embySettings, IPlexAvailabilityChecker plexAvailability, IEmbyAvaliabilityChecker embyAvaliability,
+ IEmbyApi embyApi)
{
_plexRepo = plexRepo;
_embyRepo = embyRepo;
@@ -32,6 +34,7 @@ namespace Ombi.Schedule.Jobs.Ombi
_embySettings = embySettings;
_plexAvailabilityChecker = plexAvailability;
_embyAvaliabilityChecker = embyAvaliability;
+ _embyApi = embyApi;
}
private readonly IPlexContentRepository _plexRepo;
@@ -43,6 +46,7 @@ namespace Ombi.Schedule.Jobs.Ombi
private readonly ITvMazeApi _tvApi;
private readonly ISettingsService _plexSettings;
private readonly ISettingsService _embySettings;
+ private readonly IEmbyApi _embyApi;
public async Task Start()
{
@@ -54,11 +58,11 @@ namespace Ombi.Schedule.Jobs.Ombi
{
await StartPlex();
}
-
+
var embySettings = await _embySettings.GetSettingsAsync();
if (embySettings.Enable)
{
- await StartEmby();
+ await StartEmby(embySettings);
}
}
catch (Exception e)
@@ -123,9 +127,9 @@ namespace Ombi.Schedule.Jobs.Ombi
await StartPlexTv(allTv);
}
- private async Task StartEmby()
+ private async Task StartEmby(EmbySettings s)
{
- await StartEmbyMovies();
+ await StartEmbyMovies(s);
await StartEmbyTv();
}
@@ -158,7 +162,7 @@ namespace Ombi.Schedule.Jobs.Ombi
_plexRepo.UpdateWithoutSave(show);
}
tvCount++;
- if (tvCount >= 20)
+ if (tvCount >= 75)
{
await _plexRepo.SaveChangesAsync();
tvCount = 0;
@@ -198,7 +202,7 @@ namespace Ombi.Schedule.Jobs.Ombi
_embyRepo.UpdateWithoutSave(show);
}
tvCount++;
- if (tvCount >= 20)
+ if (tvCount >= 75)
{
await _embyRepo.SaveChangesAsync();
tvCount = 0;
@@ -229,7 +233,7 @@ namespace Ombi.Schedule.Jobs.Ombi
_plexRepo.UpdateWithoutSave(movie);
}
movieCount++;
- if (movieCount >= 20)
+ if (movieCount >= 75)
{
await _plexRepo.SaveChangesAsync();
movieCount = 0;
@@ -239,31 +243,56 @@ namespace Ombi.Schedule.Jobs.Ombi
await _plexRepo.SaveChangesAsync();
}
- private async Task StartEmbyMovies()
+ private async Task StartEmbyMovies(EmbySettings settings)
{
var allMovies = _embyRepo.GetAll().Where(x =>
x.Type == EmbyMediaType.Movie && (!x.TheMovieDbId.HasValue() || !x.ImdbId.HasValue()));
int movieCount = 0;
foreach (var movie in allMovies)
{
- var hasImdb = movie.ImdbId.HasValue();
- var hasTheMovieDb = movie.TheMovieDbId.HasValue();
+ movie.ImdbId.HasValue();
+ movie.TheMovieDbId.HasValue();
// Movies don't really use TheTvDb
- if (!hasImdb)
+ // Check if it even has 1 ID
+ if (!movie.HasImdb && !movie.HasTheMovieDb)
{
- var imdbId = await GetImdbId(hasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty);
+ // Ok this sucks,
+ // The only think I can think that has happened is that we scanned Emby before Emby has got the metadata
+ // So let's recheck emby to see if they have got the metadata now
+ _log.LogInformation($"Movie {movie.Title} does not have a ImdbId or TheMovieDbId, so rechecking emby");
+ foreach (var server in settings.Servers)
+ {
+ _log.LogInformation($"Checking server {server.Name} for upto date metadata");
+ var movieInfo = await _embyApi.GetMovieInformation(movie.EmbyId, server.ApiKey, server.AdministratorId,
+ server.FullUri);
+
+ if (movieInfo.ProviderIds?.Imdb.HasValue() ?? false)
+ {
+ movie.ImdbId = movieInfo.ProviderIds.Imdb;
+ }
+
+ if (movieInfo.ProviderIds?.Tmdb.HasValue() ?? false)
+ {
+ movie.TheMovieDbId = movieInfo.ProviderIds.Tmdb;
+ }
+ }
+ }
+
+ if (!movie.HasImdb)
+ {
+ var imdbId = await GetImdbId(movie.HasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty);
movie.ImdbId = imdbId;
_embyRepo.UpdateWithoutSave(movie);
}
- if (!hasTheMovieDb)
+ if (!movie.HasTheMovieDb)
{
- var id = await GetTheMovieDbId(false, hasImdb, string.Empty, movie.ImdbId, movie.Title, true);
+ var id = await GetTheMovieDbId(false, movie.HasImdb, string.Empty, movie.ImdbId, movie.Title, true);
movie.TheMovieDbId = id;
_embyRepo.UpdateWithoutSave(movie);
}
movieCount++;
- if (movieCount >= 20)
+ if (movieCount >= 75)
{
await _embyRepo.SaveChangesAsync();
movieCount = 0;
diff --git a/src/Ombi.Schedule/Jobs/Ombi/WelcomeEmail.cs b/src/Ombi.Schedule/Jobs/Ombi/WelcomeEmail.cs
index e260ebed3..f98072e9e 100644
--- a/src/Ombi.Schedule/Jobs/Ombi/WelcomeEmail.cs
+++ b/src/Ombi.Schedule/Jobs/Ombi/WelcomeEmail.cs
@@ -20,8 +20,6 @@ namespace Ombi.Schedule.Jobs.Ombi
_email = provider;
_templates = template;
_customizationSettings = c;
- email.ClearCache();
- _customizationSettings.ClearCache();
}
private readonly ISettingsService _emailSettings;
diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs
index c39b80c1f..964832b44 100644
--- a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs
+++ b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs
@@ -57,7 +57,6 @@ namespace Ombi.Schedule.Jobs.Plex
EpisodeSync = epsiodeSync;
Metadata = metadataRefresh;
Checker = checker;
- plex.ClearCache();
}
private ISettingsService Plex { get; }
diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexEpisodeSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexEpisodeSync.cs
index 5652d126b..6ab5a5941 100644
--- a/src/Ombi.Schedule/Jobs/Plex/PlexEpisodeSync.cs
+++ b/src/Ombi.Schedule/Jobs/Plex/PlexEpisodeSync.cs
@@ -26,7 +26,6 @@ namespace Ombi.Schedule.Jobs.Plex
_api = plexApi;
_repo = repo;
_availabilityChecker = a;
- _settings.ClearCache();
}
private readonly ISettingsService _settings;
diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs b/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs
index 4f6bf2550..105e8876d 100644
--- a/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs
+++ b/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs
@@ -24,8 +24,6 @@ namespace Ombi.Schedule.Jobs.Plex
_log = log;
_plexSettings = plexSettings;
_userManagementSettings = ums;
- _userManagementSettings.ClearCache();
- _plexSettings.ClearCache();
}
private readonly IPlexApi _api;
diff --git a/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs b/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs
index 5c954def8..f61747ac6 100644
--- a/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs
+++ b/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs
@@ -22,7 +22,6 @@ namespace Ombi.Schedule.Jobs.Radarr
RadarrApi = radarrApi;
Logger = log;
_ctx = ctx;
- RadarrSettings.ClearCache();
}
private ISettingsService RadarrSettings { get; }
diff --git a/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs b/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs
index 92e0c2d55..2c8d03b1d 100644
--- a/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs
+++ b/src/Ombi.Schedule/Jobs/SickRage/SickRageSync.cs
@@ -22,7 +22,6 @@ namespace Ombi.Schedule.Jobs.SickRage
_api = api;
_log = l;
_ctx = ctx;
- _settings.ClearCache();
}
private readonly ISettingsService _settings;
diff --git a/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs b/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs
index e4c00c726..c77e23394 100644
--- a/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs
+++ b/src/Ombi.Schedule/Jobs/Sonarr/SonarrSync.cs
@@ -25,7 +25,6 @@ namespace Ombi.Schedule.Jobs.Sonarr
_api = api;
_log = l;
_ctx = ctx;
- _settings.ClearCache();
}
private readonly ISettingsService _settings;
diff --git a/src/Ombi.Settings/Settings/Models/External/EmbySettings.cs b/src/Ombi.Settings/Settings/Models/External/EmbySettings.cs
index 96df77281..595733dc1 100644
--- a/src/Ombi.Settings/Settings/Models/External/EmbySettings.cs
+++ b/src/Ombi.Settings/Settings/Models/External/EmbySettings.cs
@@ -14,6 +14,7 @@ namespace Ombi.Core.Settings.Models.External
public string Name { get; set; }
public string ApiKey { get; set; }
public string AdministratorId { get; set; }
+ public string ServerHostname { get; set; }
public bool EnableEpisodeSearching { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Ombi.Settings/Settings/SettingsService.cs b/src/Ombi.Settings/Settings/SettingsService.cs
index 3162c34c2..57ae482a2 100644
--- a/src/Ombi.Settings/Settings/SettingsService.cs
+++ b/src/Ombi.Settings/Settings/SettingsService.cs
@@ -61,7 +61,7 @@ namespace Ombi.Settings.Settings
var model = obj;
return model;
- }, DateTime.Now.AddHours(2));
+ }, DateTime.Now.AddHours(5));
}
public bool SaveSettings(T model)
diff --git a/src/Ombi.Store/Context/OmbiContext.cs b/src/Ombi.Store/Context/OmbiContext.cs
index 3d8c05daa..47b245603 100644
--- a/src/Ombi.Store/Context/OmbiContext.cs
+++ b/src/Ombi.Store/Context/OmbiContext.cs
@@ -87,43 +87,6 @@ namespace Ombi.Store.Context
public void Seed()
{
- // VACUUM;
- Database.ExecuteSqlCommand("VACUUM;");
-
- // Make sure we have the roles
- var newsletterRole = Roles.Where(x => x.Name == OmbiRoles.ReceivesNewsletter);
- if (!newsletterRole.Any())
- {
- Roles.Add(new IdentityRole(OmbiRoles.ReceivesNewsletter)
- {
- NormalizedName = OmbiRoles.ReceivesNewsletter.ToUpper()
- });
- SaveChanges();
- }
- var requestMusicRole = Roles.Where(x => x.Name == OmbiRoles.RequestMusic);
- if (!requestMusicRole.Any())
- {
- Roles.Add(new IdentityRole(OmbiRoles.RequestMusic)
- {
- NormalizedName = OmbiRoles.RequestMusic.ToUpper()
- });
- Roles.Add(new IdentityRole(OmbiRoles.AutoApproveMusic)
- {
- NormalizedName = OmbiRoles.AutoApproveMusic.ToUpper()
- });
- SaveChanges();
- }
-
- var manageOwnRequestsRole = Roles.Where(x => x.Name == OmbiRoles.ManageOwnRequests);
- if (!manageOwnRequestsRole.Any())
- {
- Roles.Add(new IdentityRole(OmbiRoles.ManageOwnRequests)
- {
- NormalizedName = OmbiRoles.ManageOwnRequests.ToUpper()
- });
- SaveChanges();
- }
-
// Make sure we have the API User
var apiUserExists = Users.Any(x => x.UserName.Equals("Api", StringComparison.CurrentCultureIgnoreCase));
if (!apiUserExists)
@@ -209,7 +172,15 @@ namespace Ombi.Store.Context
};
break;
case NotificationType.ItemAddedToFaultQueue:
- continue;
+ notificationToAdd = new NotificationTemplates
+ {
+ NotificationType = notificationType,
+ Message = "Hello! The user '{UserName}' has requested {Title} but it could not be added. This has been added into the requests queue and will keep retrying",
+ Subject = "Item Added To Retry Queue",
+ Agent = agent,
+ Enabled = true,
+ };
+ break;
case NotificationType.WelcomeEmail:
notificationToAdd = new NotificationTemplates
{
diff --git a/src/Ombi.Store/Context/SettingsContext.cs b/src/Ombi.Store/Context/SettingsContext.cs
index af5c91d20..6a53e598f 100644
--- a/src/Ombi.Store/Context/SettingsContext.cs
+++ b/src/Ombi.Store/Context/SettingsContext.cs
@@ -66,5 +66,10 @@ namespace Ombi.Store.Context
SaveChanges();
}
+
+ ~SettingsContext()
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/src/Ombi.Store/Entities/OmbiUser.cs b/src/Ombi.Store/Entities/OmbiUser.cs
index 801a50cb1..edb9708a9 100644
--- a/src/Ombi.Store/Entities/OmbiUser.cs
+++ b/src/Ombi.Store/Entities/OmbiUser.cs
@@ -34,7 +34,7 @@ namespace Ombi.Store.Entities
public bool IsEmbyConnect => UserType == UserType.EmbyUser && EmbyConnectUserId.HasValue();
[NotMapped]
- public string UserAlias => string.IsNullOrEmpty(Alias) ? UserName : Alias;
+ public virtual string UserAlias => string.IsNullOrEmpty(Alias) ? UserName : Alias;
[NotMapped]
public bool EmailLogin { get; set; }
diff --git a/src/Ombi.Store/Entities/Requests/BaseRequest.cs b/src/Ombi.Store/Entities/Requests/BaseRequest.cs
index f224032f1..596041a51 100644
--- a/src/Ombi.Store/Entities/Requests/BaseRequest.cs
+++ b/src/Ombi.Store/Entities/Requests/BaseRequest.cs
@@ -17,6 +17,7 @@ namespace Ombi.Store.Entities.Requests
public DateTime MarkedAsDenied { get; set; }
public string DeniedReason { get; set; }
public RequestType RequestType { get; set; }
+ public string RequestedByAlias { get; set; }
[ForeignKey(nameof(RequestedUserId))]
public OmbiUser RequestedUser { get; set; }
diff --git a/src/Ombi.Store/Entities/Requests/SeasonRequests.cs b/src/Ombi.Store/Entities/Requests/SeasonRequests.cs
index 521cf5b94..6abaa4de3 100644
--- a/src/Ombi.Store/Entities/Requests/SeasonRequests.cs
+++ b/src/Ombi.Store/Entities/Requests/SeasonRequests.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
+using System.Globalization;
using Ombi.Store.Entities;
using Ombi.Store.Entities.Requests;
@@ -27,9 +28,10 @@ namespace Ombi.Store.Repository.Requests
public bool Approved { get; set; }
public bool Requested { get; set; }
-
public int SeasonId { get; set; }
[ForeignKey(nameof(SeasonId))]
public SeasonRequests Season { get; set; }
+
+ [NotMapped] public string AirDateDisplay => AirDate == DateTime.MinValue ? "Unknown" : AirDate.ToString(CultureInfo.InvariantCulture);
}
}
\ No newline at end of file
diff --git a/src/Ombi.Store/Entities/Requests/TvRequests.cs b/src/Ombi.Store/Entities/Requests/TvRequests.cs
index 432bc88ab..5e33c016f 100644
--- a/src/Ombi.Store/Entities/Requests/TvRequests.cs
+++ b/src/Ombi.Store/Entities/Requests/TvRequests.cs
@@ -17,10 +17,6 @@ namespace Ombi.Store.Entities.Requests
public DateTime ReleaseDate { get; set; }
public string Status { get; set; }
- ///
- /// This is so we can correctly send the right amount of seasons to Sonarr
- ///
- [NotMapped]
public int TotalSeasons { get; set; }
public List ChildRequests { get; set; }
diff --git a/src/Ombi.Store/Migrations/20190116212601_RequestedByAlias.Designer.cs b/src/Ombi.Store/Migrations/20190116212601_RequestedByAlias.Designer.cs
new file mode 100644
index 000000000..45197bdfb
--- /dev/null
+++ b/src/Ombi.Store/Migrations/20190116212601_RequestedByAlias.Designer.cs
@@ -0,0 +1,1212 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Ombi.Store.Context;
+
+namespace Ombi.Store.Migrations
+{
+ [DbContext(typeof(OmbiContext))]
+ [Migration("20190116212601_RequestedByAlias")]
+ partial class RequestedByAlias
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.2.1-servicing-10028");
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken();
+
+ b.Property("Name")
+ .HasMaxLength(256);
+
+ b.Property("NormalizedName")
+ .HasMaxLength(256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasName("RoleNameIndex");
+
+ b.ToTable("AspNetRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType");
+
+ b.Property("ClaimValue");
+
+ b.Property("RoleId")
+ .IsRequired();
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType");
+
+ b.Property("ClaimValue");
+
+ b.Property("UserId")
+ .IsRequired();
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider");
+
+ b.Property("ProviderKey");
+
+ b.Property("ProviderDisplayName");
+
+ b.Property("UserId")
+ .IsRequired();
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("RoleId");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("LoginProvider");
+
+ b.Property("Name");
+
+ b.Property("Value");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.ApplicationConfiguration", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Type");
+
+ b.Property("Value");
+
+ b.HasKey("Id");
+
+ b.ToTable("ApplicationConfiguration");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.Audit", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AuditArea");
+
+ b.Property("AuditType");
+
+ b.Property("DateTime");
+
+ b.Property("Description");
+
+ b.Property("User");
+
+ b.HasKey("Id");
+
+ b.ToTable("Audit");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("TheMovieDbId");
+
+ b.HasKey("Id");
+
+ b.ToTable("CouchPotatoCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedAt");
+
+ b.Property("EmbyId")
+ .IsRequired();
+
+ b.Property("ImdbId");
+
+ b.Property("ProviderId");
+
+ b.Property("TheMovieDbId");
+
+ b.Property("Title");
+
+ b.Property("TvDbId");
+
+ b.Property("Type");
+
+ b.Property("Url");
+
+ b.HasKey("Id");
+
+ b.ToTable("EmbyContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedAt");
+
+ b.Property("EmbyId");
+
+ b.Property("EpisodeNumber");
+
+ b.Property("ImdbId");
+
+ b.Property("ParentId");
+
+ b.Property("ProviderId");
+
+ b.Property("SeasonNumber");
+
+ b.Property("TheMovieDbId");
+
+ b.Property("Title");
+
+ b.Property("TvDbId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("EmbyEpisode");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.GlobalSettings", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Content");
+
+ b.Property("SettingsName");
+
+ b.HasKey("Id");
+
+ b.ToTable("GlobalSettings");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.LidarrAlbumCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedAt");
+
+ b.Property("ArtistId");
+
+ b.Property("ForeignAlbumId");
+
+ b.Property("Monitored");
+
+ b.Property("PercentOfTracks");
+
+ b.Property("ReleaseDate");
+
+ b.Property("Title");
+
+ b.Property("TrackCount");
+
+ b.HasKey("Id");
+
+ b.ToTable("LidarrAlbumCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.LidarrArtistCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ArtistId");
+
+ b.Property("ArtistName");
+
+ b.Property("ForeignArtistId");
+
+ b.Property("Monitored");
+
+ b.HasKey("Id");
+
+ b.ToTable("LidarrArtistCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.NotificationTemplates", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Agent");
+
+ b.Property("Enabled");
+
+ b.Property("Message");
+
+ b.Property("NotificationType");
+
+ b.Property("Subject");
+
+ b.HasKey("Id");
+
+ b.ToTable("NotificationTemplates");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.NotificationUserId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedAt");
+
+ b.Property("PlayerId");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("NotificationUserId");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.OmbiUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AccessFailedCount");
+
+ b.Property("Alias");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken();
+
+ b.Property("Email")
+ .HasMaxLength(256);
+
+ b.Property("EmailConfirmed");
+
+ b.Property("EmbyConnectUserId");
+
+ b.Property("EpisodeRequestLimit");
+
+ b.Property("LastLoggedIn");
+
+ b.Property("LockoutEnabled");
+
+ b.Property("LockoutEnd");
+
+ b.Property("MovieRequestLimit");
+
+ b.Property("MusicRequestLimit");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256);
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256);
+
+ b.Property("PasswordHash");
+
+ b.Property("PhoneNumber");
+
+ b.Property("PhoneNumberConfirmed");
+
+ b.Property("ProviderUserId");
+
+ b.Property("SecurityStamp");
+
+ b.Property("TwoFactorEnabled");
+
+ b.Property("UserAccessToken");
+
+ b.Property("UserName")
+ .HasMaxLength(256);
+
+ b.Property("UserType");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasName("UserNameIndex");
+
+ b.ToTable("AspNetUsers");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("EpisodeNumber");
+
+ b.Property("GrandparentKey");
+
+ b.Property("Key");
+
+ b.Property("ParentKey");
+
+ b.Property("SeasonNumber");
+
+ b.Property("Title");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GrandparentKey");
+
+ b.ToTable("PlexEpisode");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ParentKey");
+
+ b.Property("PlexContentId");
+
+ b.Property("PlexServerContentId");
+
+ b.Property("SeasonKey");
+
+ b.Property("SeasonNumber");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PlexServerContentId");
+
+ b.ToTable("PlexSeasonsContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedAt");
+
+ b.Property("ImdbId");
+
+ b.Property("Key");
+
+ b.Property("Quality");
+
+ b.Property("ReleaseYear");
+
+ b.Property("TheMovieDbId");
+
+ b.Property("Title");
+
+ b.Property("TvDbId");
+
+ b.Property("Type");
+
+ b.Property("Url");
+
+ b.HasKey("Id");
+
+ b.ToTable("PlexServerContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.RadarrCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("HasFile");
+
+ b.Property("TheMovieDbId");
+
+ b.HasKey("Id");
+
+ b.ToTable("RadarrCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedAt");
+
+ b.Property("AlbumId");
+
+ b.Property("ContentId");
+
+ b.Property("ContentType");
+
+ b.Property("EpisodeNumber");
+
+ b.Property