diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 23449f30c..24c24d385 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -48,6 +48,7 @@ stages: - stage: deploy jobs: - job: + condition: and(succeeded(), eq(variables.isMain, true)) steps: - task: DownloadPipelineArtifact@2 inputs: @@ -90,4 +91,3 @@ stages: isPreRelease: true changeLogCompareToRelease: 'lastNonDraftRelease' changeLogType: 'commitBased' - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/feature/v4')) diff --git a/.azuredevops/pipelines/templates/variables.yml b/.azuredevops/pipelines/templates/variables.yml index 737f7b9d1..507746641 100644 --- a/.azuredevops/pipelines/templates/variables.yml +++ b/.azuredevops/pipelines/templates/variables.yml @@ -4,7 +4,7 @@ variables: - name: "vmImage" value: "ubuntu-latest" - + - name: "Solution" value: "**/*.sln" @@ -24,4 +24,7 @@ variables: value: "$(Build.SourcesDirectory)/src/Ombi/ClientApp/" - name: "BuildVersion" - value: "4.0.$(Build.BuildId)" \ No newline at end of file + value: "4.0.$(Build.BuildId)" + + - name: isMain + value: $[eq(variables['Build.SourceBranch'], 'refs/heads/feature/v4')] \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7697affd4..8f206e648 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -29,6 +29,7 @@ If applicable, a snippet of the logs that seems relevant to the bug if present. **Ombi Version (please complete the following information):** - Version [e.g. 3.0.1158] - Media Server [e.g. Plex] +- Database Type: SQLite (Please change if using MySQL) **Additional context** Add any other context about the problem here. diff --git a/src/Ombi.Api.Plex/Models/Metadata.cs b/src/Ombi.Api.Plex/Models/Metadata.cs index cda6ce68b..92e66b35c 100644 --- a/src/Ombi.Api.Plex/Models/Metadata.cs +++ b/src/Ombi.Api.Plex/Models/Metadata.cs @@ -44,7 +44,13 @@ namespace Ombi.Api.Plex.Models public string grandparentTheme { get; set; } public string chapterSource { get; set; } public Medium[] Media { get; set; } + public PlexGuids[] Guid { get; set; } // public Director[] Director { get; set; } // public Writer[] Writer { get; set; } } + + public class PlexGuids + { + public string Id { get; set; } + } } \ No newline at end of file diff --git a/src/Ombi.Helpers.Tests/PlexHelperTests.cs b/src/Ombi.Helpers.Tests/PlexHelperTests.cs index ef1119f9f..82b59fdf7 100644 --- a/src/Ombi.Helpers.Tests/PlexHelperTests.cs +++ b/src/Ombi.Helpers.Tests/PlexHelperTests.cs @@ -41,6 +41,37 @@ namespace Ombi.Helpers.Tests yield return new TestCaseData("com.plexapp.agents.agent47://456822/999/999?lang=en", ProviderIdType.TvDb).Returns("456822").SetName("Unknown TvDb agent, large episode and season"); yield return new TestCaseData("com.plexapp.agents.xbmcnfotv://153021/2/1?lang=xn", ProviderIdType.TvDb).Returns("153021").SetName("xmbc agent, tv episode"); yield return new TestCaseData("com.plexapp.agents.xbmcnfotv://153021?lang=xn", ProviderIdType.TvDb).Returns("153021").SetName("xmbc agent, tv show"); + yield return new TestCaseData("tmdb://610201", ProviderIdType.MovieDb).Returns("610201").SetName("Themoviedb new plex format"); + } + } + + [TestCaseSource(nameof(ProviderIdGuidDataV2))] + public void GetProviderIdsFromMetadataTests(string guidInput, ProviderId expected) + { + var param = guidInput.Split('|', StringSplitOptions.RemoveEmptyEntries); + var result = PlexHelper.GetProviderIdsFromMetadata(param); + + Assert.AreEqual(expected.ImdbId, result.ImdbId); + Assert.AreEqual(expected.TheMovieDb, result.TheMovieDb); + Assert.AreEqual(expected.TheTvDb, result.TheTvDb); + } + + public static IEnumerable ProviderIdGuidDataV2 + { + get + { + yield return new TestCaseData("plex://movie/5e1632df2d4d84003e48e54e|imdb://tt9178402|tmdb://610201", new ProviderId { ImdbId = "tt9178402", TheMovieDb = "610201" }).SetName("V2 Regular Plex Id"); + yield return new TestCaseData("plex://movie/5d7768253c3c2a001fbcab72|imdb://tt0119567|tmdb://330", new ProviderId { ImdbId = "tt0119567", TheMovieDb = "330" }).SetName("V2 Regular Plex Id Another"); + yield return new TestCaseData("plex://movie/5d7768253c3c2a001fbcab72|imdb://tt0119567", new ProviderId { ImdbId = "tt0119567" }).SetName("V2 Regular Plex Id Single Imdb"); + yield return new TestCaseData("plex://movie/5d7768253c3c2a001fbcab72|tmdb://330", new ProviderId { TheMovieDb = "330" }).SetName("V2 Regular Plex Id Single Tmdb"); + yield return new TestCaseData("com.plexapp.agents.thetvdb://269586/2/8?lang=en", new ProviderId { TheTvDb = "269586" }).SetName("V2 Regular TvDb Id"); + yield return new TestCaseData("com.plexapp.agents.themoviedb://390043?lang=en", new ProviderId { TheMovieDb = "390043" }).SetName("V2 Regular MovieDb Id"); + yield return new TestCaseData("com.plexapp.agents.imdb://tt2543164?lang=en", new ProviderId { ImdbId = "tt2543164" }).SetName("V2 Regular Imdb Id"); + yield return new TestCaseData("com.plexapp.agents.agent47://tt2543456?lang=en", new ProviderId { ImdbId = "tt2543456" }).SetName("V2 Unknown IMDB agent"); + yield return new TestCaseData("com.plexapp.agents.agent47://456822/1/1?lang=en", new ProviderId { TheTvDb = "456822" }).SetName("V2 Unknown TvDb agent"); + yield return new TestCaseData("com.plexapp.agents.agent47://456822/999/999?lang=en", new ProviderId { TheTvDb = "456822" }).SetName("V2 Unknown TvDb agent, large episode and season"); + yield return new TestCaseData("com.plexapp.agents.xbmcnfotv://153021/2/1?lang=xn", new ProviderId { TheTvDb = "153021" }).SetName("V2 xmbc agent, tv episode"); + yield return new TestCaseData("com.plexapp.agents.xbmcnfotv://153021?lang=xn", new ProviderId { TheTvDb = "153021" }).SetName("V2 xmbc agent, tv show"); } } diff --git a/src/Ombi.Helpers/PlexHelper.cs b/src/Ombi.Helpers/PlexHelper.cs index a25c3b14a..4dbde0c92 100644 --- a/src/Ombi.Helpers/PlexHelper.cs +++ b/src/Ombi.Helpers/PlexHelper.cs @@ -41,6 +41,7 @@ namespace Ombi.Helpers //com.plexapp.agents.thetvdb://269586/2/8?lang=en //com.plexapp.agents.themoviedb://390043?lang=en //com.plexapp.agents.imdb://tt2543164?lang=en + //plex://movie/5e1632df2d4d84003e48e54e // https://github.com/tidusjar/Ombi/issues/3277 if (string.IsNullOrEmpty(guid)) { @@ -57,7 +58,7 @@ namespace Ombi.Helpers TheTvDb = guidSplit[1] }; } - if (guid.Contains("themoviedb", CompareOptions.IgnoreCase)) + if (guid.Contains("themoviedb", CompareOptions.IgnoreCase) || guid.Contains("tmdb", CompareOptions.IgnoreCase)) { return new ProviderId { @@ -71,6 +72,13 @@ namespace Ombi.Helpers ImdbId = guidSplit[1] }; } + if (guid.Contains("plex://", CompareOptions.IgnoreCase)) + { + return new ProviderId + { + Plex = true + }; + } var imdbRegex = new Regex(ImdbMatchExpression, RegexOptions.Compiled); var tvdbRegex = new Regex(TvDbIdMatchExpression, RegexOptions.Compiled); @@ -102,6 +110,37 @@ namespace Ombi.Helpers $"https://app.plex.tv/web/app#!/server/{machineId}/details?key=library%2Fmetadata%2F{mediaId}"; return url; } + + public static ProviderId GetProviderIdsFromMetadata(params string[] guids) + { + var providerIds = new ProviderId(); + foreach (var guid in guids) + { + var provider = GetProviderIdFromPlexGuid(guid); + if (provider.Type == ProviderType.Plex) + { + // There are more guids! + continue; + } + + switch (provider.Type) + { + case ProviderType.ImdbId: + providerIds.ImdbId = provider.ImdbId; + break; + case ProviderType.TheMovieDbId: + providerIds.TheMovieDb = provider.TheMovieDb; + break; + case ProviderType.TvDbId: + providerIds.TheTvDb = provider.TheTvDb; + break; + default: + throw new ArgumentOutOfRangeException(nameof(provider.Type)); + } + } + + return providerIds; + } } public class ProviderId @@ -109,6 +148,7 @@ namespace Ombi.Helpers public string TheTvDb { get; set; } public string TheMovieDb { get; set; } public string ImdbId { get; set; } + public bool Plex { get; set; } public ProviderType Type { @@ -126,6 +166,10 @@ namespace Ombi.Helpers { return ProviderType.TvDbId; } + if (Plex) + { + return ProviderType.Plex; + } return ProviderType.ImdbId; } } @@ -135,6 +179,7 @@ namespace Ombi.Helpers { ImdbId, TheMovieDbId, - TvDbId + TvDbId, + Plex } } \ No newline at end of file diff --git a/src/Ombi.Notifications/Agents/DiscordNotification.cs b/src/Ombi.Notifications/Agents/DiscordNotification.cs index 7c49dc7d5..e1f0e78c5 100644 --- a/src/Ombi.Notifications/Agents/DiscordNotification.cs +++ b/src/Ombi.Notifications/Agents/DiscordNotification.cs @@ -107,11 +107,20 @@ namespace Ombi.Notifications.Agents var fields = new List(); - if (model.Data.TryGetValue("RequestedUser", out var requestedUser)) + if (model.Data.TryGetValue("Alias", out var alias)) { - if (requestedUser.HasValue()) + if (alias.HasValue()) { - fields.Add(new DiscordField { name = "Requested By", value = requestedUser, inline = true }); + fields.Add(new DiscordField { name = "Requested By", value = alias, inline = true }); + } + } else + { + if (model.Data.TryGetValue("RequestedUser", out var requestedUser)) + { + if (requestedUser.HasValue()) + { + fields.Add(new DiscordField { name = "Requested By", value = requestedUser, inline = true }); + } } } if (model.Data.TryGetValue("DenyReason", out var denyReason)) diff --git a/src/Ombi.Schedule/Jobs/ArrAvailabilityChecker.cs b/src/Ombi.Schedule/Jobs/ArrAvailabilityChecker.cs index 55bb350ff..d8676ab86 100644 --- a/src/Ombi.Schedule/Jobs/ArrAvailabilityChecker.cs +++ b/src/Ombi.Schedule/Jobs/ArrAvailabilityChecker.cs @@ -7,10 +7,12 @@ using Microsoft.AspNetCore.SignalR; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Ombi.Core; +using Ombi.Core.Settings; using Ombi.Helpers; using Ombi.Hubs; using Ombi.Notifications.Models; using Ombi.Schedule.Jobs.Plex.Models; +using Ombi.Settings.Settings.Models.External; using Ombi.Store.Entities; using Ombi.Store.Repository; using Ombi.Store.Repository.Requests; @@ -20,13 +22,26 @@ namespace Ombi.Schedule.Jobs.Radarr { public class ArrAvailabilityChecker : IArrAvailabilityChecker { + private readonly IExternalRepository _radarrRepo; + private readonly IExternalRepository _sonarrRepo; + private readonly ILogger _logger; + private readonly ISettingsService _radarrSettings; + private readonly ISettingsService _sonarrSettings; + private readonly IExternalRepository _sonarrEpisodeRepo; + private readonly INotificationHelper _notification; + private readonly IHubContext _hub; + private readonly ITvRequestRepository _tvRequest; + private readonly IMovieRequestRepository _movies; + public ArrAvailabilityChecker( IExternalRepository radarrRepo, IExternalRepository sonarrRepo, IExternalRepository sonarrEpisodeRepo, INotificationHelper notification, IHubContext hub, ITvRequestRepository tvRequest, IMovieRequestRepository movies, - ILogger log) + ILogger log, + ISettingsService radarrSettings, + ISettingsService sonarrSettings) { _radarrRepo = radarrRepo; _sonarrRepo = sonarrRepo; @@ -36,21 +51,23 @@ namespace Ombi.Schedule.Jobs.Radarr _tvRequest = tvRequest; _movies = movies; _logger = log; + _radarrSettings = radarrSettings; + _sonarrSettings = sonarrSettings; } - - private readonly IExternalRepository _radarrRepo; - private readonly IExternalRepository _sonarrRepo; - private readonly ILogger _logger; - private readonly IExternalRepository _sonarrEpisodeRepo; - private readonly INotificationHelper _notification; - private readonly IHubContext _hub; - private readonly ITvRequestRepository _tvRequest; - private readonly IMovieRequestRepository _movies; - public async Task Execute(IJobExecutionContext job) { - await ProcessMovies(); - await ProcessTvShows(); + var radarrSettings = await _radarrSettings.GetSettingsAsync(); + var sonarrSettings = await _sonarrSettings.GetSettingsAsync(); + + if (radarrSettings.ScanForAvailability) + { + await ProcessMovies(); + } + + if (sonarrSettings.ScanForAvailability) + { + await ProcessTvShows(); + } } private async Task ProcessMovies() diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs index 6dd01a298..f554e428d 100644 --- a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs +++ b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs @@ -281,9 +281,21 @@ namespace Ombi.Schedule.Jobs.Plex Logger.LogDebug("Adding movie {0}", movie.title); var metaData = await PlexApi.GetMetadata(servers.PlexAuthToken, servers.FullUri, movie.ratingKey); - var providerIds = PlexHelper.GetProviderIdFromPlexGuid(metaData.MediaContainer.Metadata - .FirstOrDefault() - .guid); + + var meta = metaData.MediaContainer.Metadata.FirstOrDefault(); + var guids = new List + { + meta.guid + }; + if (meta.Guid != null) + { + foreach (var g in meta.Guid) + { + guids.Add(g.Id); + } + } + + var providerIds = PlexHelper.GetProviderIdsFromMetadata(guids.ToArray()); var item = new PlexServerContent { @@ -296,15 +308,15 @@ namespace Ombi.Schedule.Jobs.Plex Seasons = new List(), Quality = movie.Media?.FirstOrDefault()?.videoResolution ?? string.Empty }; - if (providerIds.Type == ProviderType.ImdbId) + if (providerIds.ImdbId.HasValue()) { item.ImdbId = providerIds.ImdbId; } - if (providerIds.Type == ProviderType.TheMovieDbId) + if (providerIds.TheMovieDb.HasValue()) { item.TheMovieDbId = providerIds.TheMovieDb; } - if (providerIds.Type == ProviderType.TvDbId) + if (providerIds.TheTvDb.HasValue()) { item.TvDbId = providerIds.TheTvDb; } @@ -563,20 +575,31 @@ namespace Ombi.Schedule.Jobs.Plex private static void GetProviderIds(PlexMetadata showMetadata, PlexServerContent existingContent) { + var metadata = showMetadata.MediaContainer.Metadata.FirstOrDefault(); + var guids = new List + { + metadata.guid + }; + if (metadata.Guid != null) + { + foreach (var g in metadata.Guid) + { + guids.Add(g.Id); + } + } var providerIds = - PlexHelper.GetProviderIdFromPlexGuid(showMetadata.MediaContainer.Metadata.FirstOrDefault() - .guid); - if (providerIds.Type == ProviderType.ImdbId) + PlexHelper.GetProviderIdsFromMetadata(guids.ToArray()); + if (providerIds.ImdbId.HasValue()) { existingContent.ImdbId = providerIds.ImdbId; } - if (providerIds.Type == ProviderType.TheMovieDbId) + if (providerIds.TheMovieDb.HasValue()) { existingContent.TheMovieDbId = providerIds.TheMovieDb; } - if (providerIds.Type == ProviderType.TvDbId) + if (providerIds.TheTvDb.HasValue()) { existingContent.TvDbId = providerIds.TheTvDb; } diff --git a/src/Ombi.Settings/Settings/Models/External/RadarrSettings.cs b/src/Ombi.Settings/Settings/Models/External/RadarrSettings.cs index bfed9708c..da35f8dd8 100644 --- a/src/Ombi.Settings/Settings/Models/External/RadarrSettings.cs +++ b/src/Ombi.Settings/Settings/Models/External/RadarrSettings.cs @@ -10,5 +10,6 @@ namespace Ombi.Settings.Settings.Models.External public string DefaultRootPath { get; set; } public bool AddOnly { get; set; } public string MinimumAvailability { get; set; } + public bool ScanForAvailability { get; set; } } } \ No newline at end of file diff --git a/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs b/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs index bbbe58fd3..44c910519 100644 --- a/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs +++ b/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs @@ -20,5 +20,6 @@ public bool AddOnly { get; set; } public bool V3 { get; set; } public int LanguageProfile { get; set; } + public bool ScanForAvailability { get; set; } } } \ No newline at end of file diff --git a/src/Ombi.Store/Migrations/OmbiMySql/20200218230644_MobileDevices.cs b/src/Ombi.Store/Migrations/OmbiMySql/20200218230644_MobileDevices.cs index ce2c2ebd2..7dc1afb66 100644 --- a/src/Ombi.Store/Migrations/OmbiMySql/20200218230644_MobileDevices.cs +++ b/src/Ombi.Store/Migrations/OmbiMySql/20200218230644_MobileDevices.cs @@ -8,34 +8,34 @@ namespace Ombi.Store.Migrations.OmbiMySql { protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.Sql(@"CREATE TABLE `MobileDevices` ( - `Id` int NOT NULL AUTO_INCREMENT, - `Token` longtext CHARACTER SET utf8mb4 NULL, - `UserId` varchar(255) COLLATE utf8mb4_bin NOT NULL, - `AddedAt` datetime(6) NOT NULL, - CONSTRAINT `PK_MobileDevices` PRIMARY KEY (`Id`), - CONSTRAINT `FK_MobileDevices_AspNetUsers_UserId` FOREIGN KEY (`UserId`) REFERENCES `AspNetUsers` (`Id`) ON DELETE RESTRICT -);"); +// migrationBuilder.Sql(@"CREATE TABLE `MobileDevices` ( +// `Id` int NOT NULL AUTO_INCREMENT, +// `Token` longtext CHARACTER SET utf8mb4 NULL, +// `UserId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, +// `AddedAt` datetime(6) NOT NULL, +// CONSTRAINT `PK_MobileDevices` PRIMARY KEY (`Id`), +// CONSTRAINT `FK_MobileDevices_AspNetUsers_UserId` FOREIGN KEY (`UserId`) REFERENCES `AspNetUsers` (`Id`) ON DELETE RESTRICT +//);"); - //migrationBuilder.CreateTable( - // name: "MobileDevices", - // columns: table => new - // { - // Id = table.Column(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - // Token = table.Column(maxLength: 256, nullable: true), - // UserId = table.Column(maxLength: 255, nullable: false), - // AddedAt = table.Column(maxLength: 256, nullable: false), - // }, - // constraints: table => - // { - // table.PrimaryKey("PK_MobileDevices", x => x.Id); - // table.ForeignKey( - // name: "FK_MobileDevices_AspNetUsers_UserId", - // column: x => x.UserId, - // principalTable: "AspNetUsers", - // principalColumn: "Id", - // onDelete: ReferentialAction.Restrict); - // }); + migrationBuilder.CreateTable( + name: "MobileDevices", + columns: table => new + { + Id = table.Column(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Token = table.Column(maxLength: 256, nullable: true), + UserId = table.Column(maxLength: 255, nullable: false), + AddedAt = table.Column(maxLength: 256, nullable: false), + }, + constraints: table => + { + table.PrimaryKey("PK_MobileDevices", x => x.Id); + table.ForeignKey( + name: "FK_MobileDevices_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); migrationBuilder.CreateIndex( diff --git a/src/Ombi.Store/Migrations/OmbiMySql/20200829205234_Charset.Designer.cs b/src/Ombi.Store/Migrations/OmbiMySql/20200829205234_Charset.Designer.cs new file mode 100644 index 000000000..c6251941f --- /dev/null +++ b/src/Ombi.Store/Migrations/OmbiMySql/20200829205234_Charset.Designer.cs @@ -0,0 +1,1152 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Ombi.Store.Context.MySql; + +namespace Ombi.Store.Migrations.OmbiMySql +{ + [DbContext(typeof(OmbiMySqlContext))] + [Migration("20200829205234_Charset")] + partial class Charset + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.1.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Name") + .HasColumnType("varchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedName") + .HasColumnType("varchar(256)") + .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() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("ProviderKey") + .HasColumnType("varchar(255)"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.Property("RoleId") + .HasColumnType("varchar(255)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("Name") + .HasColumnType("varchar(255)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Audit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AuditArea") + .HasColumnType("int"); + + b.Property("AuditType") + .HasColumnType("int"); + + b.Property("DateTime") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("User") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("Audit"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.MobileDevices", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AddedAt") + .HasColumnType("datetime(6)"); + + b.Property("Token") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("MobileDevices"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.NotificationTemplates", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Agent") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)"); + + b.Property("Message") + .HasColumnType("longtext"); + + b.Property("NotificationType") + .HasColumnType("int"); + + b.Property("Subject") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("NotificationTemplates"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.NotificationUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AddedAt") + .HasColumnType("datetime(6)"); + + b.Property("PlayerId") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("NotificationUserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.OmbiUser", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("Alias") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Email") + .HasColumnType("varchar(256)") + .HasMaxLength(256); + + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("EpisodeRequestLimit") + .HasColumnType("int"); + + b.Property("Language") + .HasColumnType("longtext"); + + b.Property("LastLoggedIn") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("MovieRequestLimit") + .HasColumnType("int"); + + b.Property("MusicRequestLimit") + .HasColumnType("int"); + + b.Property("NormalizedEmail") + .HasColumnType("varchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasColumnType("varchar(256)") + .HasMaxLength(256); + + b.Property("PasswordHash") + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("longtext"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("ProviderUserId") + .HasColumnType("longtext"); + + b.Property("SecurityStamp") + .HasColumnType("longtext"); + + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserAccessToken") + .HasColumnType("longtext"); + + b.Property("UserName") + .HasColumnType("varchar(256)") + .HasMaxLength(256); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AddedAt") + .HasColumnType("datetime(6)"); + + b.Property("AlbumId") + .HasColumnType("longtext"); + + b.Property("ContentId") + .HasColumnType("int"); + + b.Property("ContentType") + .HasColumnType("int"); + + b.Property("EpisodeNumber") + .HasColumnType("int"); + + b.Property("SeasonNumber") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("RecentlyAddedLog"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.RequestQueue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Completed") + .HasColumnType("datetime(6)"); + + b.Property("Dts") + .HasColumnType("datetime(6)"); + + b.Property("Error") + .HasColumnType("longtext"); + + b.Property("RequestId") + .HasColumnType("int"); + + b.Property("RetryCount") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("RequestQueue"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.RequestSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("RequestId") + .HasColumnType("int"); + + b.Property("RequestType") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("RequestSubscription"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.AlbumRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Approved") + .HasColumnType("tinyint(1)"); + + b.Property("ArtistName") + .HasColumnType("longtext"); + + b.Property("Available") + .HasColumnType("tinyint(1)"); + + b.Property("Cover") + .HasColumnType("longtext"); + + b.Property("Denied") + .HasColumnType("tinyint(1)"); + + b.Property("DeniedReason") + .HasColumnType("longtext"); + + b.Property("Disk") + .HasColumnType("longtext"); + + b.Property("ForeignAlbumId") + .HasColumnType("longtext"); + + b.Property("ForeignArtistId") + .HasColumnType("longtext"); + + b.Property("MarkedAsApproved") + .HasColumnType("datetime(6)"); + + b.Property("MarkedAsAvailable") + .HasColumnType("datetime(6)"); + + b.Property("MarkedAsDenied") + .HasColumnType("datetime(6)"); + + b.Property("Rating") + .HasColumnType("decimal(65,30)"); + + b.Property("ReleaseDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestType") + .HasColumnType("int"); + + b.Property("RequestedByAlias") + .HasColumnType("longtext"); + + b.Property("RequestedDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestedUserId") + .HasColumnType("varchar(255)"); + + b.Property("Title") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("RequestedUserId"); + + b.ToTable("AlbumRequests"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.ChildRequests", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Approved") + .HasColumnType("tinyint(1)"); + + b.Property("Available") + .HasColumnType("tinyint(1)"); + + b.Property("Denied") + .HasColumnType("tinyint(1)"); + + b.Property("DeniedReason") + .HasColumnType("longtext"); + + b.Property("IssueId") + .HasColumnType("int"); + + b.Property("MarkedAsApproved") + .HasColumnType("datetime(6)"); + + b.Property("MarkedAsAvailable") + .HasColumnType("datetime(6)"); + + b.Property("MarkedAsDenied") + .HasColumnType("datetime(6)"); + + b.Property("ParentRequestId") + .HasColumnType("int"); + + b.Property("RequestType") + .HasColumnType("int"); + + b.Property("RequestedByAlias") + .HasColumnType("longtext"); + + b.Property("RequestedDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestedUserId") + .HasColumnType("varchar(255)"); + + b.Property("SeriesType") + .HasColumnType("int"); + + b.Property("Title") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ParentRequestId"); + + b.HasIndex("RequestedUserId"); + + b.ToTable("ChildRequests"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.IssueCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("IssueCategory"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.IssueComments", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("longtext"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("IssuesId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("IssuesId"); + + b.HasIndex("UserId"); + + b.ToTable("IssueComments"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.Issues", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("IssueCategoryId") + .HasColumnType("int"); + + b.Property("IssueId") + .HasColumnType("int"); + + b.Property("ProviderId") + .HasColumnType("longtext"); + + b.Property("RequestId") + .HasColumnType("int"); + + b.Property("RequestType") + .HasColumnType("int"); + + b.Property("ResovledDate") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Subject") + .HasColumnType("longtext"); + + b.Property("Title") + .HasColumnType("longtext"); + + b.Property("UserReportedId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("IssueCategoryId"); + + b.HasIndex("IssueId"); + + b.HasIndex("UserReportedId"); + + b.ToTable("Issues"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.MovieRequests", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Approved") + .HasColumnType("tinyint(1)"); + + b.Property("Available") + .HasColumnType("tinyint(1)"); + + b.Property("Background") + .HasColumnType("longtext"); + + b.Property("Denied") + .HasColumnType("tinyint(1)"); + + b.Property("DeniedReason") + .HasColumnType("longtext"); + + b.Property("DigitalReleaseDate") + .HasColumnType("datetime(6)"); + + b.Property("ImdbId") + .HasColumnType("longtext"); + + b.Property("IssueId") + .HasColumnType("int"); + + b.Property("LangCode") + .HasColumnType("longtext"); + + b.Property("MarkedAsApproved") + .HasColumnType("datetime(6)"); + + b.Property("MarkedAsAvailable") + .HasColumnType("datetime(6)"); + + b.Property("MarkedAsDenied") + .HasColumnType("datetime(6)"); + + b.Property("Overview") + .HasColumnType("longtext"); + + b.Property("PosterPath") + .HasColumnType("longtext"); + + b.Property("QualityOverride") + .HasColumnType("int"); + + b.Property("ReleaseDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestType") + .HasColumnType("int"); + + b.Property("RequestedByAlias") + .HasColumnType("longtext"); + + b.Property("RequestedDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestedUserId") + .HasColumnType("varchar(255)"); + + b.Property("RootPathOverride") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("longtext"); + + b.Property("TheMovieDbId") + .HasColumnType("int"); + + b.Property("Title") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("RequestedUserId"); + + b.ToTable("MovieRequests"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.RequestLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("EpisodeCount") + .HasColumnType("int"); + + b.Property("RequestDate") + .HasColumnType("datetime(6)"); + + b.Property("RequestId") + .HasColumnType("int"); + + b.Property("RequestType") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("RequestLog"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.TvRequests", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Background") + .HasColumnType("longtext"); + + b.Property("ImdbId") + .HasColumnType("longtext"); + + b.Property("Overview") + .HasColumnType("longtext"); + + b.Property("PosterPath") + .HasColumnType("longtext"); + + b.Property("QualityOverride") + .HasColumnType("int"); + + b.Property("ReleaseDate") + .HasColumnType("datetime(6)"); + + b.Property("RootFolder") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("longtext"); + + b.Property("Title") + .HasColumnType("longtext"); + + b.Property("TotalSeasons") + .HasColumnType("int"); + + b.Property("TvDbId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TvRequests"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Tokens", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Token") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Tokens"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.UserNotificationPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Agent") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserNotificationPreferences"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.UserQualityProfiles", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("RadarrQualityProfile") + .HasColumnType("int"); + + b.Property("RadarrRootPath") + .HasColumnType("int"); + + b.Property("SonarrQualityProfile") + .HasColumnType("int"); + + b.Property("SonarrQualityProfileAnime") + .HasColumnType("int"); + + b.Property("SonarrRootPath") + .HasColumnType("int"); + + b.Property("SonarrRootPathAnime") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserQualityProfiles"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Votes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("Deleted") + .HasColumnType("tinyint(1)"); + + b.Property("RequestId") + .HasColumnType("int"); + + b.Property("RequestType") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.Property("VoteType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Votes"); + }); + + modelBuilder.Entity("Ombi.Store.Repository.Requests.EpisodeRequests", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AirDate") + .HasColumnType("datetime(6)"); + + b.Property("Approved") + .HasColumnType("tinyint(1)"); + + b.Property("Available") + .HasColumnType("tinyint(1)"); + + b.Property("EpisodeNumber") + .HasColumnType("int"); + + b.Property("Requested") + .HasColumnType("tinyint(1)"); + + b.Property("SeasonId") + .HasColumnType("int"); + + b.Property("Title") + .HasColumnType("longtext"); + + b.Property("Url") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("SeasonId"); + + b.ToTable("EpisodeRequests"); + }); + + modelBuilder.Entity("Ombi.Store.Repository.Requests.SeasonRequests", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ChildRequestId") + .HasColumnType("int"); + + b.Property("SeasonNumber") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ChildRequestId"); + + b.ToTable("SeasonRequests"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Ombi.Store.Entities.OmbiUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Ombi.Store.Entities.MobileDevices", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.NotificationUserId", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany("NotificationUserIds") + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.RequestSubscription", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.AlbumRequest", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser") + .WithMany() + .HasForeignKey("RequestedUserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.ChildRequests", b => + { + b.HasOne("Ombi.Store.Entities.Requests.TvRequests", "ParentRequest") + .WithMany("ChildRequests") + .HasForeignKey("ParentRequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser") + .WithMany() + .HasForeignKey("RequestedUserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.IssueComments", b => + { + b.HasOne("Ombi.Store.Entities.Requests.Issues", "Issues") + .WithMany("Comments") + .HasForeignKey("IssuesId"); + + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.Issues", b => + { + b.HasOne("Ombi.Store.Entities.Requests.IssueCategory", "IssueCategory") + .WithMany() + .HasForeignKey("IssueCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Ombi.Store.Entities.Requests.ChildRequests", null) + .WithMany("Issues") + .HasForeignKey("IssueId"); + + b.HasOne("Ombi.Store.Entities.Requests.MovieRequests", null) + .WithMany("Issues") + .HasForeignKey("IssueId"); + + b.HasOne("Ombi.Store.Entities.OmbiUser", "UserReported") + .WithMany() + .HasForeignKey("UserReportedId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.MovieRequests", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser") + .WithMany() + .HasForeignKey("RequestedUserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Requests.RequestLog", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Tokens", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.UserNotificationPreferences", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany("UserNotificationPreferences") + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.UserQualityProfiles", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Entities.Votes", b => + { + b.HasOne("Ombi.Store.Entities.OmbiUser", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Ombi.Store.Repository.Requests.EpisodeRequests", b => + { + b.HasOne("Ombi.Store.Repository.Requests.SeasonRequests", "Season") + .WithMany("Episodes") + .HasForeignKey("SeasonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Ombi.Store.Repository.Requests.SeasonRequests", b => + { + b.HasOne("Ombi.Store.Entities.Requests.ChildRequests", "ChildRequest") + .WithMany("SeasonRequests") + .HasForeignKey("ChildRequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Ombi.Store/Migrations/OmbiMySql/20200829205234_Charset.cs b/src/Ombi.Store/Migrations/OmbiMySql/20200829205234_Charset.cs new file mode 100644 index 000000000..d907bc0e1 --- /dev/null +++ b/src/Ombi.Store/Migrations/OmbiMySql/20200829205234_Charset.cs @@ -0,0 +1,1457 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Ombi.Store.Migrations.OmbiMySql +{ + public partial class Charset : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql("SET FOREIGN_KEY_CHECKS=0;"); + migrationBuilder.AlterColumn( + name: "UserId", + table: "Votes", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "UserQualityProfiles", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value", + table: "UserNotificationPreferences", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "UserNotificationPreferences", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "TvRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Status", + table: "TvRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PosterPath", + table: "TvRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Overview", + table: "TvRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ImdbId", + table: "TvRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Background", + table: "TvRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "Tokens", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Token", + table: "Tokens", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "RequestSubscription", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Error", + table: "RequestQueue", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "RequestLog", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AlbumId", + table: "RecentlyAddedLog", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "NotificationUserId", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlayerId", + table: "NotificationUserId", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Subject", + table: "NotificationTemplates", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Message", + table: "NotificationTemplates", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Status", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedUserId", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedByAlias", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PosterPath", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Overview", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LangCode", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ImdbId", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeniedReason", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Background", + table: "MovieRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "MobileDevices", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Token", + table: "MobileDevices", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserReportedId", + table: "Issues", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "Issues", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Subject", + table: "Issues", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProviderId", + table: "Issues", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Issues", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "IssueComments", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Comment", + table: "IssueComments", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value", + table: "IssueCategory", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Url", + table: "EpisodeRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "EpisodeRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "ChildRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedUserId", + table: "ChildRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedByAlias", + table: "ChildRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeniedReason", + table: "ChildRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "User", + table: "Audit", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Audit", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value", + table: "AspNetUserTokens", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AspNetUserTokens", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "LoginProvider", + table: "AspNetUserTokens", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserTokens", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "UserName", + table: "AspNetUsers", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256) CHARACTER SET utf8mb4", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserAccessToken", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SecurityStamp", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProviderUserId", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PhoneNumber", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PasswordHash", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "NormalizedUserName", + table: "AspNetUsers", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256) CHARACTER SET utf8mb4", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "NormalizedEmail", + table: "AspNetUsers", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256) CHARACTER SET utf8mb4", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Language", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Email", + table: "AspNetUsers", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256) CHARACTER SET utf8mb4", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Alias", + table: "AspNetUsers", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetUsers", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "RoleId", + table: "AspNetUserRoles", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserRoles", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserLogins", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ProviderDisplayName", + table: "AspNetUserLogins", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProviderKey", + table: "AspNetUserLogins", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "LoginProvider", + table: "AspNetUserLogins", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserClaims", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ClaimValue", + table: "AspNetUserClaims", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ClaimType", + table: "AspNetUserClaims", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "NormalizedName", + table: "AspNetRoles", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256) CHARACTER SET utf8mb4", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AspNetRoles", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256) CHARACTER SET utf8mb4", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AspNetRoles", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetRoles", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "RoleId", + table: "AspNetRoleClaims", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ClaimValue", + table: "AspNetRoleClaims", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ClaimType", + table: "AspNetRoleClaims", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedUserId", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255) CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedByAlias", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ForeignArtistId", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ForeignAlbumId", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Disk", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeniedReason", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Cover", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ArtistName", + table: "AlbumRequests", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext CHARACTER SET utf8mb4", + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "UserId", + table: "Votes", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "UserQualityProfiles", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value", + table: "UserNotificationPreferences", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "UserNotificationPreferences", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "TvRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Status", + table: "TvRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PosterPath", + table: "TvRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Overview", + table: "TvRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ImdbId", + table: "TvRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Background", + table: "TvRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "Tokens", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Token", + table: "Tokens", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "RequestSubscription", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Error", + table: "RequestQueue", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "RequestLog", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AlbumId", + table: "RecentlyAddedLog", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "NotificationUserId", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlayerId", + table: "NotificationUserId", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Subject", + table: "NotificationTemplates", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Message", + table: "NotificationTemplates", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Status", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedUserId", + table: "MovieRequests", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedByAlias", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PosterPath", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Overview", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LangCode", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ImdbId", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeniedReason", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Background", + table: "MovieRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "MobileDevices", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Token", + table: "MobileDevices", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserReportedId", + table: "Issues", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "Issues", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Subject", + table: "Issues", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProviderId", + table: "Issues", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Issues", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "IssueComments", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Comment", + table: "IssueComments", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value", + table: "IssueCategory", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Url", + table: "EpisodeRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "EpisodeRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "ChildRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedUserId", + table: "ChildRequests", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedByAlias", + table: "ChildRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeniedReason", + table: "ChildRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "User", + table: "Audit", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Audit", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value", + table: "AspNetUserTokens", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AspNetUserTokens", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "LoginProvider", + table: "AspNetUserTokens", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserTokens", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "UserName", + table: "AspNetUsers", + type: "varchar(256) CHARACTER SET utf8mb4", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserAccessToken", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SecurityStamp", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProviderUserId", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PhoneNumber", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PasswordHash", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "NormalizedUserName", + table: "AspNetUsers", + type: "varchar(256) CHARACTER SET utf8mb4", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "NormalizedEmail", + table: "AspNetUsers", + type: "varchar(256) CHARACTER SET utf8mb4", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Language", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Email", + table: "AspNetUsers", + type: "varchar(256) CHARACTER SET utf8mb4", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Alias", + table: "AspNetUsers", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetUsers", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "RoleId", + table: "AspNetUserRoles", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserRoles", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserLogins", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "ProviderDisplayName", + table: "AspNetUserLogins", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProviderKey", + table: "AspNetUserLogins", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "LoginProvider", + table: "AspNetUserLogins", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "AspNetUserClaims", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "ClaimValue", + table: "AspNetUserClaims", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ClaimType", + table: "AspNetUserClaims", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "NormalizedName", + table: "AspNetRoles", + type: "varchar(256) CHARACTER SET utf8mb4", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AspNetRoles", + type: "varchar(256) CHARACTER SET utf8mb4", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AspNetRoles", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetRoles", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "RoleId", + table: "AspNetRoleClaims", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: false, + oldClrType: typeof(string)); + + migrationBuilder.AlterColumn( + name: "ClaimValue", + table: "AspNetRoleClaims", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ClaimType", + table: "AspNetRoleClaims", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedUserId", + table: "AlbumRequests", + type: "varchar(255) CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestedByAlias", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ForeignArtistId", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ForeignAlbumId", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Disk", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeniedReason", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Cover", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ArtistName", + table: "AlbumRequests", + type: "longtext CHARACTER SET utf8mb4", + nullable: true, + oldClrType: typeof(string), + oldNullable: true); + + + migrationBuilder.Sql("SET FOREIGN_KEY_CHECKS=1;"); + } + } +} diff --git a/src/Ombi.Store/Migrations/OmbiMySql/OmbiMySqlContextModelSnapshot.cs b/src/Ombi.Store/Migrations/OmbiMySql/OmbiMySqlContextModelSnapshot.cs index e47a5f12b..1678a77c1 100644 --- a/src/Ombi.Store/Migrations/OmbiMySql/OmbiMySqlContextModelSnapshot.cs +++ b/src/Ombi.Store/Migrations/OmbiMySql/OmbiMySqlContextModelSnapshot.cs @@ -20,18 +20,18 @@ namespace Ombi.Store.Migrations.OmbiMySql modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Name") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasMaxLength(256); b.Property("NormalizedName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -50,14 +50,14 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("ClaimType") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ClaimValue") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("RoleId") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -73,14 +73,14 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("ClaimType") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ClaimValue") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("UserId") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -92,17 +92,17 @@ namespace Ombi.Store.Migrations.OmbiMySql modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("ProviderKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("ProviderDisplayName") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("UserId") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("LoginProvider", "ProviderKey"); @@ -114,10 +114,10 @@ namespace Ombi.Store.Migrations.OmbiMySql modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("RoleId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("UserId", "RoleId"); @@ -129,16 +129,16 @@ namespace Ombi.Store.Migrations.OmbiMySql modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("LoginProvider") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -161,10 +161,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("datetime(6)"); b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("User") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -181,10 +181,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("datetime(6)"); b.Property("Token") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -206,13 +206,13 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("tinyint(1)"); b.Property("Message") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("NotificationType") .HasColumnType("int"); b.Property("Subject") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -229,10 +229,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("datetime(6)"); b.Property("PlayerId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -244,20 +244,20 @@ namespace Ombi.Store.Migrations.OmbiMySql modelBuilder.Entity("Ombi.Store.Entities.OmbiUser", b => { b.Property("Id") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("AccessFailedCount") .HasColumnType("int"); b.Property("Alias") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Email") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") @@ -267,7 +267,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Language") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("LastLoggedIn") .HasColumnType("datetime(6)"); @@ -285,36 +285,36 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("NormalizedEmail") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasMaxLength(256); b.Property("NormalizedUserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasMaxLength(256); b.Property("PasswordHash") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("PhoneNumber") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("PhoneNumberConfirmed") .HasColumnType("tinyint(1)"); b.Property("ProviderUserId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("SecurityStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("TwoFactorEnabled") .HasColumnType("tinyint(1)"); b.Property("UserAccessToken") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("UserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasMaxLength(256); b.Property("UserType") @@ -342,7 +342,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("datetime(6)"); b.Property("AlbumId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ContentId") .HasColumnType("int"); @@ -377,7 +377,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("datetime(6)"); b.Property("Error") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("RequestId") .HasColumnType("int"); @@ -406,7 +406,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -425,28 +425,28 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("tinyint(1)"); b.Property("ArtistName") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Available") .HasColumnType("tinyint(1)"); b.Property("Cover") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Denied") .HasColumnType("tinyint(1)"); b.Property("DeniedReason") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Disk") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ForeignAlbumId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ForeignArtistId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("MarkedAsApproved") .HasColumnType("datetime(6)"); @@ -467,16 +467,16 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("RequestedByAlias") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("RequestedDate") .HasColumnType("datetime(6)"); b.Property("RequestedUserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("Title") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -501,7 +501,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("tinyint(1)"); b.Property("DeniedReason") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("IssueId") .HasColumnType("int"); @@ -522,19 +522,19 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("RequestedByAlias") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("RequestedDate") .HasColumnType("datetime(6)"); b.Property("RequestedUserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("SeriesType") .HasColumnType("int"); b.Property("Title") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -552,7 +552,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -566,7 +566,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Comment") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Date") .HasColumnType("datetime(6)"); @@ -575,7 +575,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -596,7 +596,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("datetime(6)"); b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("IssueCategoryId") .HasColumnType("int"); @@ -605,7 +605,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("ProviderId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("RequestId") .HasColumnType("int"); @@ -620,13 +620,13 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Subject") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Title") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("UserReportedId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -652,25 +652,25 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("tinyint(1)"); b.Property("Background") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Denied") .HasColumnType("tinyint(1)"); b.Property("DeniedReason") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DigitalReleaseDate") .HasColumnType("datetime(6)"); b.Property("ImdbId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("IssueId") .HasColumnType("int"); b.Property("LangCode") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("MarkedAsApproved") .HasColumnType("datetime(6)"); @@ -682,10 +682,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("datetime(6)"); b.Property("Overview") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("PosterPath") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("QualityOverride") .HasColumnType("int"); @@ -697,25 +697,25 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("RequestedByAlias") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("RequestedDate") .HasColumnType("datetime(6)"); b.Property("RequestedUserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("RootPathOverride") .HasColumnType("int"); b.Property("Status") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("TheMovieDbId") .HasColumnType("int"); b.Property("Title") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -743,7 +743,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -759,16 +759,16 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Background") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ImdbId") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Overview") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("PosterPath") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("QualityOverride") .HasColumnType("int"); @@ -780,10 +780,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Status") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Title") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("TotalSeasons") .HasColumnType("int"); @@ -803,10 +803,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Token") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -828,10 +828,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("tinyint(1)"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -865,7 +865,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -893,7 +893,7 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("UserId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + .HasColumnType("varchar(255)"); b.Property("VoteType") .HasColumnType("int"); @@ -930,10 +930,10 @@ namespace Ombi.Store.Migrations.OmbiMySql .HasColumnType("int"); b.Property("Title") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Url") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); diff --git a/src/Ombi/ClientApp/src/app/app.component.html b/src/Ombi/ClientApp/src/app/app.component.html index 9cd684ec1..09ec98ef9 100644 --- a/src/Ombi/ClientApp/src/app/app.component.html +++ b/src/Ombi/ClientApp/src/app/app.component.html @@ -170,7 +170,7 @@
- + diff --git a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.scss b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.scss index cc903ad99..27079acbf 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.scss +++ b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.scss @@ -17,13 +17,7 @@ font-weight: bold; } -.grow { - transition: all .2s ease-in-out; -} -.grow:hover { - transform: scale(1.1); -} h3 strong { font-weight: bold; } diff --git a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.scss b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.scss index f55b989f2..cfb8e6494 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.scss +++ b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.scss @@ -1,8 +1,9 @@ $ombi-primary:#3f3f3f; $card-background: #2b2b2b; + #cardImage { border-radius: 5px 5px 0px 0px; - height:75%; + height: 75%; } .dark-card { @@ -12,7 +13,7 @@ $card-background: #2b2b2b; // Changed height to 100% to make all cards the same height .card-spacing { margin-top: 10%; - height:100%; + height: 100%; } @@ -34,6 +35,7 @@ $border-width: 3px; .requested { border-bottom: $border-width #ffd740 solid; } + .notrequested { border-bottom: $border-width #303030 solid; } @@ -42,14 +44,17 @@ $border-width: 3px; text-align: center; } -// Changed height to 100% to make all cards the same height -.grow { - transition: all .2s ease-in-out; - height:100%; -} +@media (min-width: 1025px) { -.grow:hover { - transform: scale(1.1); + // Changed height to 100% to make all cards the same height + .grow { + transition: all .2s ease-in-out; + height: 100%; + } + + .grow:hover { + transform: scale(1.1); + } } ::ng-deep mat-dialog-container.mat-dialog-container { @@ -61,21 +66,22 @@ $border-width: 3px; /* Title adjust for the Discover page */ .mat-card-content h6 { - overflow:hidden; - white-space:nowrap; - font-weight:400; - font-size:1.1rem; + overflow: hidden; + white-space: nowrap; + font-weight: 400; + font-size: 1.1rem; } /* Summary adjust for Discover page */ -.small, small { - font-size:0.8rem; +.small, +small { + font-size: 0.8rem; } @media (min-width: 2000px) { #cardImage { - height:80%; - object-fit:cover; - display:block; + height: 80%; + object-fit: cover; + display: block; } } \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.scss b/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.scss index dd8879545..df7db5335 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.scss +++ b/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.scss @@ -27,80 +27,83 @@ } ::ng-deep .mat-card-image { - height:75%; - object-fit:cover; - display:block; + height: 75%; + object-fit: cover; + display: block; } .card-spacing { - height:100%; + height: 100%; } .mat-card-content h6 { - overflow:hidden; - white-space:nowrap; - font-weight:500; - font-size:1.1rem; + overflow: hidden; + white-space: nowrap; + font-weight: 500; + font-size: 1.1rem; } @media (min-width: 300px) { + + .small-middle-container { + margin: inherit; + } + .col-xl-2 { flex: 0 0 100%; max-width: 100%; min-width: 100%; } - .small-middle-container{ - width:100%; - } .btn-group { - width:100%; + width: 100%; } mat-button-base { - width:100%; + width: 100%; } - .col{ + .col { padding-right: 10px !important; - padding-left:10px !important; + padding-left: 10px !important; } - .row{ - margin-left:0px; + .row { + margin-left: 0px; } - .small-padding{ + .small-padding { padding-left: 5px !important; padding-right: 0px !important; height: 40em; } ::ng-deep .mat-card-image { - height:85% !important; + height: 85% !important; } } @media (min-width: 600px) { .justify-content-md-center { - justify-content: center !important; + justify-content: center !important; } - .small-middle-container{ - width:auto; + + .small-middle-container { + width: auto; } .btn-group { - width:auto; + width: auto; } mat-button-base { - width:auto; + width: auto; } ::ng-deep .mat-card-image { - height:75% !important; + height: 75% !important; } -} +} @media (min-width: 660px) { .col-xl-2 { @@ -109,35 +112,35 @@ min-width: 50%; } - .col{ + .col { padding-right: 15px !important; padding-left: 15px !important; } - .small-padding{ + .small-padding { padding-left: 20px !important; padding-right: 20px !important; - height:auto; + height: auto; } - .row{ - margin-left:0px; + .row { + margin-left: 0px; } - .small-middle-container{ - width:auto; - overflow:hidden; + .small-middle-container { + width: auto; + overflow: hidden; } .btn-group { - width:auto; + width: auto; } mat-button-base { - width:auto; + width: auto; } } - + @media (min-width: 870px) { .col-xl-2 { flex: 0 0 33.33333%; @@ -145,7 +148,7 @@ min-width: 33.33333%; } } - + @media (min-width: 1100px) { .col-xl-2 { flex: 0 0 20%; @@ -153,27 +156,29 @@ min-width: 25%; } } - -@media (min-width: 1300px) { + +@media (min-width: 1300px) { .col-xl-2 { flex: 0 0 18%; max-width: 20%; min-width: 20%; } -} +} + @media (min-width: 1600px) { .col-xl-2 { flex: 0 0 16.66666667%; max-width: 16.66666667%; min-width: 16.66666667%; - } + } } + @media (min-width: 1900px) { .col-xl-2 { flex: 0 0 14.285713%; max-width: 14.285713%; min-width: 14.285713%; - } + } } @media (min-width: 2200px) { @@ -181,7 +186,7 @@ flex: 0 0 12.5%; max-width: 12.5%; min-width: 12.5%; - } + } } @media (min-width: 2500px) { @@ -189,5 +194,5 @@ flex: 0 0 11.111111%; max-width: 11.111111%; min-width: 11.111111%; - } + } } \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.ts b/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.ts index a92d92c5f..5e1f8f640 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.ts @@ -1,9 +1,10 @@ -import { Component, OnInit } from "@angular/core"; +import { Component, OnInit, Inject } from "@angular/core"; import { SearchV2Service } from "../../../services"; import { ISearchMovieResult, ISearchTvResult, RequestType } from "../../../interfaces"; import { IDiscoverCardResult, DiscoverOption } from "../../interfaces"; import { trigger, transition, style, animate } from "@angular/animations"; import { StorageService } from "../../../shared/storage/storage-service"; +import { DOCUMENT } from "@angular/common"; @Component({ templateUrl: "./discover.component.html", @@ -42,7 +43,9 @@ export class DiscoverComponent implements OnInit { private mediaTypeStorageKey = "DiscoverOptions"; constructor(private searchService: SearchV2Service, - private storageService: StorageService) { } + private storageService: StorageService, + @Inject(DOCUMENT) private container: Document) { } + public async ngOnInit() { this.loading() @@ -68,6 +71,9 @@ export class DiscoverComponent implements OnInit { this.createInitialModel(); this.scrollDisabled = false; + if (!this.containerHasScrollBar()) { + await this.onScroll(); + } } public async onScroll() { @@ -209,7 +215,7 @@ export class DiscoverComponent implements OnInit { public async switchDiscoverMode(newMode: DiscoverOption) { this.loading(); this.clear(); - this.discoverOptions = newMode; + this.discoverOptions = newMode; this.storageService.save(this.mediaTypeStorageKey, newMode.toString()); await this.ngOnInit(); this.finishLoading(); @@ -242,7 +248,7 @@ export class DiscoverComponent implements OnInit { this.movies.forEach(m => { tempResults.push({ available: m.available, - posterPath: m.posterPath ? `https://image.tmdb.org/t/p/w300/${m.posterPath}` : "../../../images/default_movie_poster.png", + posterPath: m.posterPath ? `https://image.tmdb.org/t/p/w500/${m.posterPath}` : "../../../images/default_movie_poster.png", requested: m.requested, title: m.title, type: RequestType.movie, @@ -301,4 +307,11 @@ export class DiscoverComponent implements OnInit { private finishLoading() { this.loadingFlag = false; } + + private containerHasScrollBar(): boolean { + return + // div.scrollHeight > div.clientHeight; + this.container.documentElement.scrollHeight > this.container.documentElement.clientHeight; + // this.container.documentElement.scrollHeight > (window.innerHeight + window.pageYOffset); + } } diff --git a/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts b/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts index 764ac25e1..ee1523a76 100644 --- a/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts +++ b/src/Ombi/ClientApp/src/app/interfaces/ISettings.ts @@ -85,6 +85,7 @@ export interface ISonarrSettings extends IExternalSettings { addOnly: boolean; v3: boolean; languageProfile: number; + scanForAvailability: boolean; } export interface IRadarrSettings extends IExternalSettings { @@ -95,6 +96,7 @@ export interface IRadarrSettings extends IExternalSettings { fullRootPath: string; addOnly: boolean; minimumAvailability: string; + scanForAvailability: boolean; } export interface ILidarrSettings extends IExternalSettings { diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss index 57c6d10ed..866723b93 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss @@ -1,11 +1,4 @@ -.grow-social { - transition: all .2s ease-in-out; -} -.grow-social:hover { - transform: scale(1.1); - color: black; -} .media-icons.plex { color: #feb801 !important; diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html index 93c689741..5ee98056c 100644 --- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html +++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html @@ -35,7 +35,7 @@ menu -
+
diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss index 3396a06cc..22f291331 100644 --- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss +++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.scss @@ -1,6 +1,8 @@ @import "~styles/variables.scss"; .sidenav-container { min-height: 100vh; + -webkit-overflow-scrolling:touch; + overflow:auto; } .sidenav { diff --git a/src/Ombi/ClientApp/src/app/services/signlarnotification.service.ts b/src/Ombi/ClientApp/src/app/services/signlarnotification.service.ts index 72a101c86..2597fff54 100644 --- a/src/Ombi/ClientApp/src/app/services/signlarnotification.service.ts +++ b/src/Ombi/ClientApp/src/app/services/signlarnotification.service.ts @@ -3,6 +3,7 @@ import { AuthService } from '../auth/auth.service'; import { HubConnection } from '@aspnet/signalr'; import * as signalR from '@aspnet/signalr'; + @Injectable() export class SignalRNotificationService { @@ -28,12 +29,16 @@ export class SignalRNotificationService { this.Notification.emit(data); }); + let retryCount = 0; this.hubConnection.start().then((data: any) => { console.log('Now connected'); }).catch((error: any) => { + retryCount++; console.log('Could not connect ' + error); - setTimeout(() => this.initialize(), 3000); + if (retryCount <= 3) { + setTimeout(() => this.initialize(), 3000); + } }); } diff --git a/src/Ombi/ClientApp/src/app/settings/customization/customization.component.html b/src/Ombi/ClientApp/src/app/settings/customization/customization.component.html index f9ab12c6b..178978380 100644 --- a/src/Ombi/ClientApp/src/app/settings/customization/customization.component.html +++ b/src/Ombi/ClientApp/src/app/settings/customization/customization.component.html @@ -45,7 +45,7 @@
Custom Donation URL - +
diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html index 519ac8b9f..cc17543b0 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html +++ b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html @@ -12,6 +12,9 @@
Advanced
+
+ Scan for Availability +
diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts index 505a188c6..cee54b65a 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts @@ -43,6 +43,7 @@ export class RadarrComponent implements OnInit { port: [x.port, [Validators.required]], addOnly: [x.addOnly], minimumAvailability: [x.minimumAvailability, [Validators.required]], + scanForAvailability: [x.scanForAvailability] }); if (x.defaultQualityProfile) { diff --git a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html index aeda043a1..ac5327c5f 100644 --- a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html +++ b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.html @@ -17,6 +17,9 @@
Advanced
+
+ Scan for Availability +
diff --git a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts index c4cb0d920..157accf02 100644 --- a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts @@ -73,6 +73,7 @@ export class SonarrComponent implements OnInit { seasonFolders: [x.seasonFolders], v3: [x.v3], languageProfile: [x.languageProfile], + scanForAvailability: [x.scanForAvailability] }); if (x.qualityProfile) { diff --git a/src/Ombi/ClientApp/src/app/settings/themoviedb/themoviedb.component.html b/src/Ombi/ClientApp/src/app/settings/themoviedb/themoviedb.component.html index f57962ac2..1c972bf53 100644 --- a/src/Ombi/ClientApp/src/app/settings/themoviedb/themoviedb.component.html +++ b/src/Ombi/ClientApp/src/app/settings/themoviedb/themoviedb.component.html @@ -6,14 +6,37 @@
- +
-