mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
dev - master (#5143)
Co-authored-by: tidusjar <tidusjar@gmail.com> Co-authored-by: sephrat <34862846+sephrat@users.noreply.github.com> Co-authored-by: Conventional Changelog Action <conventional.changelog.action@github.com> Co-authored-by: Teifun2 <Teifun2@users.noreply.github.com> Co-authored-by: contrib-readme-bot <contrib-readme-action@noreply.com> Co-authored-by: dr3amer <91037083+dr3am37@users.noreply.github.com> Co-authored-by: echel0n <echel0n@sickrage.ca> Co-authored-by: Marley <55280588+marleypowell@users.noreply.github.com> Co-authored-by: Igor Borges <igor@borges.dev> Co-authored-by: Lucane <Lucane@users.noreply.github.com> Co-authored-by: mkgeeky <github@mkgeeky.xyz> Co-authored-by: Miguel A Vico Moya <mvicomoya@gmail.com> Co-authored-by: Hadrien <26697460+ketsapiwiq@users.noreply.github.com> Co-authored-by: Victor Usoltsev <bernarden@users.noreply.github.com> Co-authored-by: Wesley King <kingwe92@gmail.com> Co-authored-by: Lea <me@janderedev.xyz> Co-authored-by: snyk-bot <snyk-bot@snyk.io> Co-authored-by: snyk-bot <snyk-bot@snyk.io> [skip ci] Co-authored-by: Jamie <tidusjar@gmail.com> Co-authored-by: Drew <drewm727@hotmail.com> [skip ci] Co-authored-by: ryan-c44 <54028283+ryan-c44@users.noreply.github.com> Co-authored-by: Alexander Russell <ajex94@gmail.com> Co-authored-by: Grygon <647846+Grygon@users.noreply.github.com> Co-authored-by: phildups7 <60622768+phildups7@users.noreply.github.com> Co-authored-by: Avi <357984+Unimatrix0@users.noreply.github.com> Co-authored-by: Antonin <82907030+Antonin-Bruzard@users.noreply.github.com> Co-authored-by: Drew <mcminn.drew@gmail.com> Co-authored-by: Joel Samson <joel.samson@hotmail.com> Co-authored-by: David Benson <dben@users.noreply.github.com> fix: Consistently reset loading flag when requesting movies on discover page. (#4777) fix(sonarr): 🐛 Fixed an issue where the language list didn't correctly load for power users in the advanced options #4782 fix: Only log error messages from Microsoft (#4787) fix(notifications): Fixed the Partially TV notifications going to the admin #4797 (#4799) fix(translations): 🌐 New translations from Crowdin [skip ci] (#4801) fix(sonarr): 🐛 Sonarr V4 should work now (#4810) fixed (#4833) fix(plex-watchlist): Lookup the ID from different sources when Plex doesn't contain the metadata (#4843) fix(#4847): Invalid Discord request fixed, also fixed an issue where App Only users would not show as logged in on the user management page (#4848) fix(discover): 🐛 Fixed the default poster not taking into account the base url in some scenarios #4845 fix(wizard): 🐛 Stop access to the wizard when you have already setup ombi (#4866) fix(plex-oauth): 🐛 Fixed an issue where using OAuth you could log in as a Ombi Local user #4835 fix: Some minor tweaks to the movie info panel (#4883) fix(sonarr): 🐛 Stop the sonarr version endpoint from breaking when Sonarr is down #4895 fix: Support duplicates in Emby/JF collections (#4902) fix(discover): Fix denied requests displayed as approved (#4901) fix: Fix denied movie shown as 'processing request' in details view (#4900) fix(#4906): 🐛 Fixed an issue with power users and permissions fix: Cron Validation (#4842) fix(lidarr): Change monitor to Existing to properly add artist #3597 fix(API): Allow RequestOnBehalf rights if requested from the API (#4919) Fixes #4610 fix: added media type tag to media type text (#4638) fix(sickrage): Fixed issue with incorrect handling of SiCKRAGE episode results returned during episode status changes, now expects array of objects from data path if present (#4648) fix: Missing Poster broken link fix (#4637) fix: Improve Swagger documentation (#4652) fix(API): Fix pagination in some edge cases (#4649) fix(discover): Carousel touch not working when scrolling page and recommendations and similar movie navigation (#4633) fix: 🐛 Fixed the Request on Behalf of having blanks (#4667) fix(images): Retry images with a backoff when we get a Too Many requests from TheMovieDb #4685 fix: Landing and Login page improvements (#4690) fix(discover): 🐛 Created new Image component to handle 429's from TMDB (#4698) and fixed #4635 (#4699) fix: Override Sonarr V3 Profiles endpoint (#4678) fix(4K) :4K request fixes (#4702) fix(translations): 🌐 New translations from Crowdin [skip ci] (#4713) fix: fixed trakt image not loading when base url present (#4711) fix: 🐛 Fixed missing externals (#4712) fix: Log Microsoft warnings to log file (#4723) fix: Localize recently requested on discover page (#4729) Fix: Ombi.Api.Lidarr: Remove unused fields from ArtistAdd (#4727) fix: Fix conflicting property name for Swagger (#4733) fix: fixed stats controller (#4742) fix(webhook): Remove added trailing slash from webhook URL #4710 fix(sonarr): 🐛 Cleaned up and removed Sonarr v3 option, sonarr v3 is now the default. This allows us to get ready for the upcoming Sonarr v4 (#4764) fix: Fixes default image for recently requested items. (#4767) Fixes build warnings. (#4769) fix: Reworked the version check (#4719) (#4781) fix: Unable to Delete Jellyfin Server (#4705) (#4780) fix: Partially Available prevents further TV requests (#4768) (#4779) fix(emby): Fix Emby played sync running a full sync during recently added sync (#4932) Fixes #4947 fix: Fix various styling issues (#4935) fix(translations): 🌐 New translations from Crowdin [skip ci] (#4926) fix: upgrade @microsoft/signalr from 6.0.11 to 6.0.16 (#4964) [skip ci] fix: upgrade primeng from 15.0.0-rc.1 to 15.4.1 (#4962) [skip ci] fix: src/Ombi.Notifications/Ombi.Notifications.csproj to reduce vulnerabilities (#4969) [skip ci] fix: upgrade @fortawesome/fontawesome-free from 6.1.2 to 6.4.0 (#4965) [skip ci] fix: upgrade multiple dependencies with Snyk (#4963) [skip ci] fix flaky tests (#4970) [skip ci] fix: More automation tests mainly around the Plex Settings page (#4821) fix: upgrade cypress-real-events from 1.7.4 to 1.8.1 (#4968) [skip ci] fix: Remove Angular TSLint (#4973) fix: upgrade zone.js from 0.11.8 to 0.13.0 (#4975) fix: upgrade jquery from 3.6.1 to 3.7.0 (#4974) fix: upgrade multiple dependencies with Snyk (#4961) fixes (#4978) fix(user-importer): 🐛 Fixed an issue where the cleanup wouldn't delete users #4812 fix(user-importer): Do not delete the Plex Admin as part of the user Importer cleanup #4870 (#4981) Fixes #4957 fix: Remove old trending source (#4987) fix(plex-api): Switch over to the new API to avoid deprecation & save… (#4986) fix: switch back to the old plex friends API #4989 fix(user-importer): Fixed not importing all correct users #4989 fix: upgrade cypress-real-events from 1.8.1 to 1.9.1 (#5000) [skip ci] fix: upgrade @microsoft/signalr from 6.0.18 to 6.0.20 (#4999) [skip ci] fix: upgrade @fortawesome/fontawesome-free from 6.4.0 to 6.4.2 (#5005) [skip ci] fix: upgrade @types/jquery from 3.5.16 to 3.5.17 (#5011) [skip ci] fix: src/Ombi/ClientApp/package.json & src/Ombi/ClientApp/yarn.lock to reduce vulnerabilities (#5010) [skip ci] fix: upgrade @microsoft/signalr from 6.0.21 to 6.0.22 (#5020) fix: upgrade @types/jquery from 3.5.18 to 3.5.19 (#5022) fix: upgrade zone.js from 0.13.1 to 0.13.2 (#5019) fix: upgrade multiple dependencies with Snyk (#5030) fix: upgrade cypress-real-events from 1.10.0 to 1.10.1 (#5014) fix: upgrade jquery from 3.7.0 to 3.7.1 (#5015) Fix: Linkify logo in newsletter (#5036) fix: upgrade @types/jquery from 3.5.22 to 3.5.23 (#5034) [skip ci] fix: upgrade @microsoft/signalr from 6.0.22 to 6.0.23 (#5032) [skip ci] Fix(mutliple servers): attempting to cache the Plex Content in server (#5018) fix(radarr-4k): 🐛 Fixed an issue when using Radarr 4k with user set quality profiles. There are now user quality profiles for 4k profile #5025 fix: src/Ombi/ClientApp/package.json & src/Ombi/ClientApp/yarn.lock to reduce vulnerabilities (#5072) [skip ci] fix: src/Ombi/Ombi.csproj to reduce vulnerabilities (#5066) [skip ci] fix: upgrade @fortawesome/fontawesome-free from 6.4.2 to 6.5.0 (#5053) [skip ci] fix: upgrade @types/jquery from 3.5.27 to 3.5.28 (#5049) [skip ci] fix: src/Ombi/ClientApp/package.json & src/Ombi/ClientApp/yarn.lock to reduce vulnerabilities (#5040) [skip ci] fix: upgrade moment from 2.29.4 to 2.30.1 (#5075) [skip ci] fix: upgrade multiple dependencies with Snyk (#5073) [skip ci] fix: upgrade multiple dependencies with Snyk (#5104) [skip ci]
This commit is contained in:
parent
f4d0bf1dae
commit
1e3bd6377c
165 changed files with 18692 additions and 11141 deletions
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Nuget Cache
|
||||
uses: actions/cache@v2
|
||||
|
@ -84,10 +84,10 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: win10-x64
|
||||
- os: win-x64
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: win10-x86
|
||||
- os: win-x86
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: linux-x64
|
||||
|
@ -106,7 +106,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
dotnet-version: '8.0.x'
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '5.0.x'
|
||||
|
@ -190,7 +190,7 @@ jobs:
|
|||
if: contains(github.ref, 'develop')
|
||||
with:
|
||||
prerelease: true
|
||||
generate_release_notes: true
|
||||
generate_release_notes: false
|
||||
body: ${{ needs.versioning.outputs.changelog }}
|
||||
name: ${{ needs.versioning.outputs.tag }}
|
||||
tag_name: ${{ needs.versioning.outputs.tag }}
|
||||
|
|
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
|
@ -37,7 +37,7 @@ jobs:
|
|||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
|
@ -48,7 +48,7 @@ jobs:
|
|||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
@ -62,4 +62,4 @@ jobs:
|
|||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
|
8
.github/workflows/pr.yml
vendored
8
.github/workflows/pr.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Nuget Cache
|
||||
uses: actions/cache@v2
|
||||
|
@ -76,10 +76,10 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: win10-x64
|
||||
- os: win-x64
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: win10-x86
|
||||
- os: win-x86
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: linux-x64
|
||||
|
@ -98,7 +98,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Nuget Cache
|
||||
uses: actions/cache@v2
|
||||
|
|
2114
CHANGELOG.md
2114
CHANGELOG.md
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Ombi.Api.Discord.Models
|
|||
{
|
||||
public string content { get; set; }
|
||||
public string username { get; set; }
|
||||
public string avatar_url { get; set; }
|
||||
public List<DiscordEmbeds> embeds { get; set; }
|
||||
}
|
||||
|
||||
|
@ -32,7 +33,6 @@ namespace Ombi.Api.Discord.Models
|
|||
{
|
||||
public string name { get; set; }
|
||||
public string url { get; set; }
|
||||
public string iconurl { get; set; }
|
||||
}
|
||||
|
||||
public class DiscordField
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -11,7 +11,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -13,7 +13,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace Ombi.Api.Sonarr
|
|||
|
||||
public async Task<List<MonitoredEpisodeResult>> MonitorEpisode(int[] episodeIds, bool monitor, string apiKey, string baseUrl)
|
||||
{
|
||||
var request = new Request($"{ApiBaseUrl}Episode/monitor", baseUrl, HttpMethod.Put);
|
||||
var request = new Request($"{ApiBaseUrl}episode/monitor", baseUrl, HttpMethod.Put);
|
||||
request.AddHeader("X-Api-Key", apiKey);
|
||||
request.AddJsonBody(new { episodeIds = episodeIds, monitored = monitor });
|
||||
return await Api.Request<List<MonitoredEpisodeResult>>(request);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -11,8 +11,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Polly" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -300,13 +300,13 @@ namespace Ombi.Core.Tests.Engine
|
|||
{
|
||||
UserId = "id1",
|
||||
RequestType = RequestType.Movie,
|
||||
RequestDate = today.AddHours(-1),
|
||||
RequestDate = today.AddMinutes(-1),
|
||||
},
|
||||
new RequestLog
|
||||
{
|
||||
UserId = "id1",
|
||||
RequestType = RequestType.Movie,
|
||||
RequestDate = today.AddHours(-2),
|
||||
RequestDate = today.AddMinutes(-2),
|
||||
},
|
||||
};
|
||||
var repoMock = _mocker.GetMock<IRepository<RequestLog>>();
|
||||
|
|
|
@ -298,13 +298,13 @@ namespace Ombi.Core.Tests.Engine
|
|||
{
|
||||
UserId = "id1",
|
||||
RequestType = RequestType.Album,
|
||||
RequestDate = today.AddHours(-1),
|
||||
RequestDate = today.AddMinutes(-1),
|
||||
},
|
||||
new RequestLog
|
||||
{
|
||||
UserId = "id1",
|
||||
RequestType = RequestType.Album,
|
||||
RequestDate = today.AddHours(-2),
|
||||
RequestDate = today.AddMinutes(-2),
|
||||
},
|
||||
};
|
||||
var repoMock = _mocker.GetMock<IRepository<RequestLog>>();
|
||||
|
|
|
@ -304,7 +304,7 @@ namespace Ombi.Core.Tests.Engine
|
|||
{
|
||||
UserId = "id1",
|
||||
RequestType = RequestType.TvShow,
|
||||
RequestDate = today.AddHours(-1),
|
||||
RequestDate = today.AddMinutes(-1),
|
||||
EpisodeCount = 1,
|
||||
},
|
||||
new RequestLog
|
||||
|
@ -312,7 +312,7 @@ namespace Ombi.Core.Tests.Engine
|
|||
UserId = "id1",
|
||||
RequestType = RequestType.TvShow,
|
||||
EpisodeCount = 1,
|
||||
RequestDate = today.AddHours(-2),
|
||||
RequestDate = today.AddMinutes(-2),
|
||||
},
|
||||
};
|
||||
var repoMock = _mocker.GetMock<IRepository<RequestLog>>();
|
||||
|
@ -345,7 +345,7 @@ namespace Ombi.Core.Tests.Engine
|
|||
{
|
||||
UserId = "id1",
|
||||
RequestType = RequestType.TvShow,
|
||||
RequestDate = today.AddHours(-1),
|
||||
RequestDate = today.AddMinutes(-1),
|
||||
EpisodeCount = 5,
|
||||
},
|
||||
new RequestLog
|
||||
|
@ -353,7 +353,7 @@ namespace Ombi.Core.Tests.Engine
|
|||
UserId = "id1",
|
||||
RequestType = RequestType.TvShow,
|
||||
EpisodeCount = 4,
|
||||
RequestDate = today.AddHours(-2),
|
||||
RequestDate = today.AddMinutes(-2),
|
||||
},
|
||||
};
|
||||
var repoMock = _mocker.GetMock<IRepository<RequestLog>>();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoFixture" Version="4.18.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="Moq" Version="4.18.2" />
|
||||
<PackageReference Include="Moq.AutoMock" Version="3.4.0" />
|
||||
<PackageReference Include="Nunit" Version="3.13.3" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -13,8 +13,8 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="12.0.0" />
|
||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.5" />
|
||||
<PackageReference Include="MusicBrainzAPI" Version="2.5.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace Ombi.Core.Senders
|
|||
}
|
||||
if (radarrSettings.Enabled)
|
||||
{
|
||||
return await SendToRadarr(model, radarrSettings);
|
||||
return await SendToRadarr(model, radarrSettings, is4K);
|
||||
}
|
||||
|
||||
var dogSettings = await _dogNzbSettings.GetSettingsAsync();
|
||||
|
@ -133,7 +133,7 @@ namespace Ombi.Core.Senders
|
|||
return await _dogNzbApi.AddMovie(settings.ApiKey, id);
|
||||
}
|
||||
|
||||
private async Task<SenderResult> SendToRadarr(MovieRequests model, RadarrSettings settings)
|
||||
private async Task<SenderResult> SendToRadarr(MovieRequests model, RadarrSettings settings, bool is4k)
|
||||
{
|
||||
var qualityToUse = int.Parse(settings.DefaultQualityProfile);
|
||||
|
||||
|
@ -142,17 +142,35 @@ namespace Ombi.Core.Senders
|
|||
var profiles = await _userProfiles.GetAll().FirstOrDefaultAsync(x => x.UserId == model.RequestedUserId);
|
||||
if (profiles != null)
|
||||
{
|
||||
if (profiles.RadarrRootPath > 0)
|
||||
if (is4k)
|
||||
{
|
||||
var tempPath = await RadarrRootPath(profiles.RadarrRootPath, settings);
|
||||
if (tempPath.HasValue())
|
||||
if (profiles.Radarr4KRootPath > 0)
|
||||
{
|
||||
rootFolderPath = tempPath;
|
||||
var tempPath = await RadarrRootPath(profiles.Radarr4KRootPath, settings);
|
||||
if (tempPath.HasValue())
|
||||
{
|
||||
rootFolderPath = tempPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (profiles.RadarrQualityProfile > 0)
|
||||
if (profiles.Radarr4KQualityProfile > 0)
|
||||
{
|
||||
qualityToUse = profiles.Radarr4KQualityProfile;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qualityToUse = profiles.RadarrQualityProfile;
|
||||
if (profiles.RadarrRootPath > 0)
|
||||
{
|
||||
var tempPath = await RadarrRootPath(profiles.RadarrRootPath, settings);
|
||||
if (tempPath.HasValue())
|
||||
{
|
||||
rootFolderPath = tempPath;
|
||||
}
|
||||
}
|
||||
if (profiles.RadarrQualityProfile > 0)
|
||||
{
|
||||
qualityToUse = profiles.RadarrQualityProfile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualBasic;
|
||||
using Ombi.Api.DogNzb;
|
||||
using Ombi.Api.DogNzb.Models;
|
||||
using Ombi.Api.SickRage;
|
||||
using Ombi.Api.SickRage.Models;
|
||||
using Ombi.Api.Sonarr;
|
||||
|
@ -23,15 +19,13 @@ namespace Ombi.Core.Senders
|
|||
{
|
||||
public class TvSender : ITvSender
|
||||
{
|
||||
public TvSender(ISonarrApi sonarrApi, ISonarrV3Api sonarrV3Api, ILogger<TvSender> log, ISettingsService<SonarrSettings> sonarrSettings,
|
||||
ISettingsService<DogNzbSettings> dog, IDogNzbApi dogApi, ISettingsService<SickRageSettings> srSettings,
|
||||
public TvSender(ISonarrV3Api sonarrV3Api, ILogger<TvSender> log, ISettingsService<SonarrSettings> sonarrSettings,
|
||||
ISettingsService<SickRageSettings> srSettings,
|
||||
ISickRageApi srApi, IRepository<UserQualityProfiles> userProfiles, IRepository<RequestQueue> requestQueue, INotificationHelper notify)
|
||||
{
|
||||
SonarrApi = sonarrV3Api;
|
||||
Logger = log;
|
||||
SonarrSettings = sonarrSettings;
|
||||
DogNzbSettings = dog;
|
||||
DogNzbApi = dogApi;
|
||||
SickRageSettings = srSettings;
|
||||
SickRageApi = srApi;
|
||||
UserQualityProfiles = userProfiles;
|
||||
|
@ -40,11 +34,9 @@ namespace Ombi.Core.Senders
|
|||
}
|
||||
|
||||
private ISonarrV3Api SonarrApi { get; }
|
||||
private IDogNzbApi DogNzbApi { get; }
|
||||
private ISickRageApi SickRageApi { get; }
|
||||
private ILogger<TvSender> Logger { get; }
|
||||
private ISettingsService<SonarrSettings> SonarrSettings { get; }
|
||||
private ISettingsService<DogNzbSettings> DogNzbSettings { get; }
|
||||
private ISettingsService<SickRageSettings> SickRageSettings { get; }
|
||||
private IRepository<UserQualityProfiles> UserQualityProfiles { get; }
|
||||
private readonly IRepository<RequestQueue> _requestQueueRepository;
|
||||
|
@ -67,23 +59,7 @@ namespace Ombi.Core.Senders
|
|||
};
|
||||
}
|
||||
}
|
||||
var dog = await DogNzbSettings.GetSettingsAsync();
|
||||
if (dog.Enabled)
|
||||
{
|
||||
var result = await SendToDogNzb(model, dog);
|
||||
if (!result.Failure)
|
||||
{
|
||||
return new SenderResult
|
||||
{
|
||||
Sent = true,
|
||||
Success = true
|
||||
};
|
||||
}
|
||||
return new SenderResult
|
||||
{
|
||||
Message = result.ErrorMessage
|
||||
};
|
||||
}
|
||||
|
||||
var sr = await SickRageSettings.GetSettingsAsync();
|
||||
if (sr.Enabled)
|
||||
{
|
||||
|
@ -137,12 +113,6 @@ namespace Ombi.Core.Senders
|
|||
};
|
||||
}
|
||||
|
||||
private async Task<DogNzbAddResult> SendToDogNzb(ChildRequests model, DogNzbSettings settings)
|
||||
{
|
||||
var id = model.ParentRequest.ExternalProviderId;
|
||||
return await DogNzbApi.AddTvShow(settings.ApiKey, id.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send the request to Sonarr to process
|
||||
/// </summary>
|
||||
|
@ -216,30 +186,19 @@ namespace Ombi.Core.Senders
|
|||
}
|
||||
|
||||
// Overrides on the request take priority
|
||||
if (model.ParentRequest.QualityOverride.HasValue)
|
||||
if (model.ParentRequest.QualityOverride.HasValue && model.ParentRequest.QualityOverride.Value > 0)
|
||||
{
|
||||
var qualityOverride = model.ParentRequest.QualityOverride.Value;
|
||||
if (qualityOverride > 0)
|
||||
{
|
||||
qualityToUse = qualityOverride;
|
||||
}
|
||||
}
|
||||
if (model.ParentRequest.RootFolder.HasValue)
|
||||
{
|
||||
var rootfolderOverride = model.ParentRequest.RootFolder.Value;
|
||||
if (rootfolderOverride > 0)
|
||||
{
|
||||
rootFolderPath = await GetSonarrRootPath(rootfolderOverride, s);
|
||||
}
|
||||
qualityToUse = model.ParentRequest.QualityOverride.Value;
|
||||
}
|
||||
|
||||
if (model.ParentRequest.LanguageProfile.HasValue)
|
||||
if (model.ParentRequest.RootFolder.HasValue && model.ParentRequest.RootFolder.Value > 0)
|
||||
{
|
||||
var languageProfile = model.ParentRequest.LanguageProfile.Value;
|
||||
if (languageProfile > 0)
|
||||
{
|
||||
languageProfileId = languageProfile;
|
||||
}
|
||||
rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder.Value, s);
|
||||
}
|
||||
|
||||
if (model.ParentRequest.LanguageProfile.HasValue && model.ParentRequest.LanguageProfile.Value > 0)
|
||||
{
|
||||
languageProfileId = model.ParentRequest.LanguageProfile.Value;
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -424,10 +383,11 @@ namespace Ombi.Core.Senders
|
|||
|
||||
await SonarrApi.MonitorEpisode(epToUnmonitored.Select(x => x.id).ToArray(), false, s.ApiKey, s.FullUri);
|
||||
}
|
||||
// Now update the episodes that need updating
|
||||
await SonarrApi.MonitorEpisode(episodesToUpdate.Where(x => x.seasonNumber == season.SeasonNumber).Select(x => x.id).ToArray(), true, s.ApiKey, s.FullUri);
|
||||
}
|
||||
|
||||
// Now update the episodes that need updating
|
||||
await SonarrApi.MonitorEpisode(episodesToUpdate.Select(x => x.id).ToArray(), true, s.ApiKey, s.FullUri);
|
||||
|
||||
if (!s.AddOnly)
|
||||
{
|
||||
await SearchForRequest(model, sonarrEpList, result, s, episodesToUpdate);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -11,9 +11,9 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="nunit" Version="3.13.3" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -13,8 +13,8 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="EasyCrypto" Version="4.6.0" />
|
||||
<PackageReference Include="LazyCache.AspNetCore" Version="2.4.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
||||
<PackageReference Include="Quartz" Version="3.6.2" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -118,39 +118,39 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NewAlbums" xml:space="preserve">
|
||||
<value>New Albums</value>
|
||||
<value>Novos álbuns</value>
|
||||
</data>
|
||||
<data name="NewMovies" xml:space="preserve">
|
||||
<value>New Movies</value>
|
||||
<value>Novos filmes</value>
|
||||
</data>
|
||||
<data name="NewTV" xml:space="preserve">
|
||||
<value>New TV</value>
|
||||
<value>Novas séries</value>
|
||||
</data>
|
||||
<data name="GenresLabel" xml:space="preserve">
|
||||
<value>Gêneros:</value>
|
||||
</data>
|
||||
<data name="AlbumTypeLabel" xml:space="preserve">
|
||||
<value>Type:</value>
|
||||
<value>Tipo:</value>
|
||||
</data>
|
||||
<data name="SeasonLabel" xml:space="preserve">
|
||||
<value>Temporada:</value>
|
||||
<value>Temporadas:</value>
|
||||
</data>
|
||||
<data name="EpisodesLabel" xml:space="preserve">
|
||||
<value>Episodes:</value>
|
||||
<value>Episódios:</value>
|
||||
</data>
|
||||
<data name="PoweredBy" xml:space="preserve">
|
||||
<value>Powered by</value>
|
||||
<value>Distribuído por</value>
|
||||
</data>
|
||||
<data name="Unsubscribe" xml:space="preserve">
|
||||
<value>Unsubscribe</value>
|
||||
<value>Cancelar subscrição</value>
|
||||
</data>
|
||||
<data name="Album" xml:space="preserve">
|
||||
<value>Album</value>
|
||||
<value>Álbum</value>
|
||||
</data>
|
||||
<data name="Movie" xml:space="preserve">
|
||||
<value>Movie</value>
|
||||
<value>Filmes</value>
|
||||
</data>
|
||||
<data name="TvShow" xml:space="preserve">
|
||||
<value>TV Show</value>
|
||||
<value>Séries</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -12,19 +12,16 @@ namespace Ombi.Notifications.Templates
|
|||
{
|
||||
if (string.IsNullOrEmpty(_templateLocation))
|
||||
{
|
||||
#if DEBUG
|
||||
_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net6.0", "Templates",
|
||||
"BasicTemplate.html");
|
||||
#else
|
||||
_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "Templates","BasicTemplate.html");
|
||||
#endif
|
||||
//_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net6.0", "Templates",
|
||||
// "BasicTemplate.html");
|
||||
_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "Templates", "BasicTemplate.html");
|
||||
}
|
||||
return _templateLocation;
|
||||
}
|
||||
}
|
||||
|
||||
private string _templateLocation;
|
||||
|
||||
|
||||
private const string SubjectKey = "{@SUBJECT}";
|
||||
private const string BodyKey = "{@BODY}";
|
||||
private const string Poster = "{@POSTER}";
|
||||
|
@ -43,9 +40,10 @@ namespace Ombi.Notifications.Templates
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
private string GetPosterContent(string imgsrc, string url) {
|
||||
private string GetPosterContent(string imgsrc, string url)
|
||||
{
|
||||
string posterContent;
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(imgsrc))
|
||||
{
|
||||
posterContent = string.Empty;
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
{
|
||||
public interface INewsletterTemplate
|
||||
{
|
||||
string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink);
|
||||
string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink, string applicationUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Ombi.I18n.Resources;
|
||||
|
@ -13,11 +13,9 @@ namespace Ombi.Notifications.Templates
|
|||
{
|
||||
if (string.IsNullOrEmpty(_templateLocation))
|
||||
{
|
||||
#if DEBUG
|
||||
_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net6.0", "Templates", "NewsletterTemplate.html");
|
||||
#else
|
||||
//_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net6.0", "Templates", "NewsletterTemplate.html");
|
||||
_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "Templates", "NewsletterTemplate.html");
|
||||
#endif
|
||||
|
||||
}
|
||||
return _templateLocation;
|
||||
}
|
||||
|
@ -27,6 +25,7 @@ namespace Ombi.Notifications.Templates
|
|||
|
||||
private const string SubjectKey = "{@SUBJECT}";
|
||||
private const string DateKey = "{@DATENOW}";
|
||||
private const string AppUrl = "{@APPURL}";
|
||||
private const string Logo = "{@LOGO}";
|
||||
private const string TableLocation = "{@RECENTLYADDED}";
|
||||
private const string IntroText = "{@INTRO}";
|
||||
|
@ -35,13 +34,14 @@ namespace Ombi.Notifications.Templates
|
|||
private const string PoweredByText = "{@POWEREDBYTEXT}";
|
||||
|
||||
|
||||
public string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink)
|
||||
public string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink, string applicationUrl)
|
||||
{
|
||||
var sb = new StringBuilder(File.ReadAllText(TemplateLocation));
|
||||
sb.Replace(SubjectKey, subject);
|
||||
sb.Replace(TableLocation, tableHtml);
|
||||
sb.Replace(IntroText, intro);
|
||||
sb.Replace(DateKey, DateTime.Now.ToString("f"));
|
||||
sb.Replace(AppUrl, applicationUrl);
|
||||
sb.Replace(Logo, string.IsNullOrEmpty(logo) ? OmbiLogo : logo);
|
||||
sb.Replace(Unsubscribe, string.IsNullOrEmpty(unsubscribeLink) ? string.Empty : unsubscribeLink);
|
||||
sb.Replace(UnsubscribeText, string.IsNullOrEmpty(unsubscribeLink) ? string.Empty : Texts.Unsubscribe);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -428,7 +428,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif; vertical-align: top;">
|
||||
<img src="{@LOGO}" style="border: none; -ms-interpolation-mode: bicubic; max-width: 100%;">
|
||||
<a href="{@APPURL}"><img src="{@LOGO}" style="border: none; -ms-interpolation-mode: bicubic; max-width: 100%;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
<PackageReference Include="Nunit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<packagereference Include="Microsoft.NET.Test.Sdk" Version="17.6.2"></packagereference>
|
||||
<PackageReference Include="Moq" Version="4.18.2" />
|
||||
<PackageReference Include="Moq.AutoMock" Version="3.4.0" />
|
||||
|
|
|
@ -108,6 +108,7 @@ namespace Ombi.Notifications.Agents
|
|||
{
|
||||
content = model.Message,
|
||||
username = settings.Username ?? "Ombi",
|
||||
avatar_url = settings.Icon.HasValue() ? settings.Icon : string.Empty
|
||||
};
|
||||
|
||||
var fields = new List<DiscordField>();
|
||||
|
@ -157,10 +158,7 @@ namespace Ombi.Notifications.Agents
|
|||
}
|
||||
}
|
||||
|
||||
var author = new DiscordAuthor
|
||||
{
|
||||
iconurl = settings.Icon.HasValue() ? settings.Icon : string.Empty
|
||||
};
|
||||
var author = new DiscordAuthor();
|
||||
|
||||
if (model.Data.TryGetValue("ApplicationUrl", out var appUrl))
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -91,12 +91,12 @@ namespace Ombi.Schedule.Tests
|
|||
new Issues
|
||||
{
|
||||
Status = IssueStatus.Resolved,
|
||||
ResovledDate = DateTime.Now.AddDays(-2)
|
||||
ResovledDate = DateTime.UtcNow.AddDays(-2)
|
||||
},
|
||||
new Issues
|
||||
{
|
||||
Status = IssueStatus.Resolved,
|
||||
ResovledDate = DateTime.Now.AddDays(-4)
|
||||
ResovledDate = DateTime.UtcNow.AddDays(-4)
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
<PackageReference Include="Moq" Version="4.18.2" />
|
||||
<PackageReference Include="Moq.AutoMock" Version="3.4.0" />
|
||||
<PackageReference Include="Nunit" Version="3.13.3" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<packagereference Include="Microsoft.NET.Test.Sdk" Version="17.6.2"></packagereference>
|
||||
|
|
|
@ -174,13 +174,18 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
}
|
||||
if (parent.TheMovieDbId.IsNullOrEmpty())
|
||||
{
|
||||
_logger.LogWarning($"Episode {episode.Name} is not linked to a TMDB series. Skipping.");
|
||||
_logger.LogWarning($"Episode {episode.Name} for Tv Show {parent.Title} Doesn't have a valid TheMovieDbId. Skipping.");
|
||||
return;
|
||||
}
|
||||
if (!int.TryParse(parent.TheMovieDbId, out var parentMovieDb))
|
||||
{
|
||||
_logger.LogWarning($"Episode {episode.Name} for Tv Show {parent.Title} Doesn't have a valid TheMovieDbId. Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
await AddToContent(content, new UserPlayedEpisode()
|
||||
{
|
||||
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
||||
TheMovieDbId = parentMovieDb,
|
||||
SeasonNumber = episode.ParentIndexNumber,
|
||||
EpisodeNumber = episode.IndexNumber,
|
||||
UserId = user.Id
|
||||
|
@ -196,7 +201,7 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
|
||||
await AddToContent(content, new UserPlayedEpisode()
|
||||
{
|
||||
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
||||
TheMovieDbId = parentMovieDb,
|
||||
SeasonNumber = episode.ParentIndexNumber,
|
||||
EpisodeNumber = episodeNumber,
|
||||
UserId = user.Id
|
||||
|
|
|
@ -174,7 +174,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
}
|
||||
|
||||
var url = GenerateUnsubscribeLink(customization.ApplicationUrl, user.Id);
|
||||
var html = email.LoadTemplate(messageContent.Subject, messageContent.Message, body, customization.Logo, url);
|
||||
var html = email.LoadTemplate(messageContent.Subject, messageContent.Message, body, customization.Logo, url, customization.ApplicationUrl ?? string.Empty);
|
||||
|
||||
var bodyBuilder = new BodyBuilder
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
|
||||
var email = new NewsletterTemplate();
|
||||
|
||||
var html = email.LoadTemplate(messageContent.Subject, messageContent.Message, body, customization.Logo, unsubscribeLink);
|
||||
var html = email.LoadTemplate(messageContent.Subject, messageContent.Message, body, customization.Logo, unsubscribeLink, customization.ApplicationUrl ?? string.Empty);
|
||||
|
||||
await _email.Send(
|
||||
new NotificationMessage { Message = html, Subject = messageContent.Subject, To = a.Email },
|
||||
|
|
|
@ -278,6 +278,10 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
await Repo.AddRange(contentToAdd);
|
||||
foreach (var c in contentToAdd)
|
||||
{
|
||||
if (contentProcessed.ContainsKey(c.Id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
contentProcessed.Add(c.Id, c.Key);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup><TargetFramework>net6.0</TargetFramework>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
|
@ -10,7 +11,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="nunit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -11,7 +11,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Quartz" Version="3.6.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
|
16
src/Ombi.Store/Context/Postgres/ExternalPostgresContext.cs
Normal file
16
src/Ombi.Store/Context/Postgres/ExternalPostgresContext.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Ombi.Store.Context.Postgres
|
||||
{
|
||||
public sealed class ExternalPostgresContext : ExternalContext
|
||||
{
|
||||
private static bool _created;
|
||||
public ExternalPostgresContext(DbContextOptions<ExternalPostgresContext> options) : base(options)
|
||||
{
|
||||
if (_created) return;
|
||||
|
||||
_created = true;
|
||||
Database.Migrate();
|
||||
}
|
||||
}
|
||||
}
|
22
src/Ombi.Store/Context/Postgres/OmbiPostgresContext.cs
Normal file
22
src/Ombi.Store/Context/Postgres/OmbiPostgresContext.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Ombi.Store.Context.Postgres
|
||||
{
|
||||
public sealed class OmbiPostgresContext : OmbiContext
|
||||
{
|
||||
private static bool _created;
|
||||
|
||||
public OmbiPostgresContext(DbContextOptions<OmbiPostgresContext> options) : base(options)
|
||||
{
|
||||
if (_created) return;
|
||||
_created = true;
|
||||
|
||||
Database.Migrate();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
17
src/Ombi.Store/Context/Postgres/PostgresModuleInitializer.cs
Normal file
17
src/Ombi.Store/Context/Postgres/PostgresModuleInitializer.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ombi.Store.Context.Postgres;
|
||||
|
||||
public static class PostgresModuleInitializer
|
||||
{
|
||||
#pragma warning disable CA2255
|
||||
// This is required to ensure that Npgsql uses a timestamp behavior that does not require a timezone
|
||||
// Reference: https://stackoverflow.com/a/73586129
|
||||
[ModuleInitializer]
|
||||
#pragma warning restore CA2255
|
||||
public static void Initialize()
|
||||
{
|
||||
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
|
||||
}
|
||||
}
|
16
src/Ombi.Store/Context/Postgres/SettingsPostgresContext.cs
Normal file
16
src/Ombi.Store/Context/Postgres/SettingsPostgresContext.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Ombi.Store.Context.Postgres
|
||||
{
|
||||
public sealed class SettingsPostgresContext : SettingsContext
|
||||
{
|
||||
private static bool _created;
|
||||
public SettingsPostgresContext(DbContextOptions<SettingsPostgresContext> options) : base(options)
|
||||
{
|
||||
if (_created) return;
|
||||
|
||||
_created = true;
|
||||
Database.Migrate();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Ombi.Helpers;
|
||||
|
||||
namespace Ombi.Store.Entities
|
||||
{
|
||||
|
@ -15,6 +14,8 @@ namespace Ombi.Store.Entities
|
|||
public int SonarrQualityProfile { get; set; }
|
||||
public int RadarrRootPath { get; set; }
|
||||
public int RadarrQualityProfile { get; set; }
|
||||
public int Radarr4KRootPath { get; set; }
|
||||
public int Radarr4KQualityProfile { get; set; }
|
||||
|
||||
[ForeignKey(nameof(UserId))]
|
||||
[JsonIgnore]
|
||||
|
|
|
@ -20,5 +20,13 @@ INSERT INTO AspNetRoles(Id, ConcurrencyStamp, Name, NormalizedName)
|
|||
SELECT '{Guid.NewGuid()}','{Guid.NewGuid()}','{role}', '{role.ToUpper()}'
|
||||
WHERE NOT EXISTS(SELECT 1 FROM AspNetRoles WHERE Name = '{role}');");
|
||||
}
|
||||
|
||||
public static void InsertRolePostgres(this MigrationBuilder mb, string role)
|
||||
{
|
||||
mb.Sql($@"
|
||||
INSERT INTO public.""AspNetRoles""(""Id"", ""ConcurrencyStamp"", ""Name"", ""NormalizedName"")
|
||||
SELECT '{Guid.NewGuid()}','{Guid.NewGuid()}','{role}', '{role.ToUpper()}'
|
||||
WHERE NOT EXISTS(SELECT 1 FROM public.""AspNetRoles"" WHERE ""Name"" = '{role}');");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
628
src/Ombi.Store/Migrations/ExternalPostgres/20231212135426_Initial.Designer.cs
generated
Normal file
628
src/Ombi.Store/Migrations/ExternalPostgres/20231212135426_Initial.Designer.cs
generated
Normal file
|
@ -0,0 +1,628 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Ombi.Store.Context.Postgres;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.ExternalPostgres
|
||||
{
|
||||
[DbContext(typeof(ExternalPostgresContext))]
|
||||
[Migration("20231212135426_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.22")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CouchPotatoCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("EmbyId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Quality")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("EmbyContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("EmbyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ParentId");
|
||||
|
||||
b.ToTable("EmbyEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("JellyfinId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Quality")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("JellyfinContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("JellyfinId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ParentId");
|
||||
|
||||
b.ToTable("JellyfinEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.LidarrAlbumCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("ArtistId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ForeignAlbumId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Monitored")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("PercentOfTracks")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("TrackCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("LidarrAlbumCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.LidarrArtistCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ArtistId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ArtistName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ForeignArtistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Monitored")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("LidarrArtistCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("GrandparentKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParentKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GrandparentKey");
|
||||
|
||||
b.ToTable("PlexEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ParentKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PlexContentId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("PlexServerContentId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SeasonKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PlexServerContentId");
|
||||
|
||||
b.ToTable("PlexSeasonsContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Quality")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ReleaseYear")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("RequestId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PlexServerContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistHistory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("TmdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PlexWatchlistHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.RadarrCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("HasFile")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("HasRegular")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("RadarrCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SickRageCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SickRageCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SickRageEpisodeCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SickRageEpisodeCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SonarrCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SonarrCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SonarrEpisodeCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("HasFile")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("MovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SonarrEpisodeCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.UserPlayedEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("UserPlayedEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.UserPlayedMovie", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("UserPlayedMovie");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.EmbyContent", "Series")
|
||||
.WithMany("Episodes")
|
||||
.HasForeignKey("ParentId")
|
||||
.HasPrincipalKey("EmbyId");
|
||||
|
||||
b.Navigation("Series");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.JellyfinContent", "Series")
|
||||
.WithMany("Episodes")
|
||||
.HasForeignKey("ParentId")
|
||||
.HasPrincipalKey("JellyfinId");
|
||||
|
||||
b.Navigation("Series");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.PlexServerContent", "Series")
|
||||
.WithMany("Episodes")
|
||||
.HasForeignKey("GrandparentKey")
|
||||
.HasPrincipalKey("Key");
|
||||
|
||||
b.Navigation("Series");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.PlexServerContent", null)
|
||||
.WithMany("Seasons")
|
||||
.HasForeignKey("PlexServerContentId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
|
||||
{
|
||||
b.Navigation("Episodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
|
||||
{
|
||||
b.Navigation("Episodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
|
||||
{
|
||||
b.Navigation("Episodes");
|
||||
|
||||
b.Navigation("Seasons");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,430 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.ExternalPostgres
|
||||
{
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CouchPotatoCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TheMovieDbId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CouchPotatoCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmbyContent",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ProviderId = table.Column<string>(type: "text", nullable: true),
|
||||
EmbyId = table.Column<string>(type: "text", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
ImdbId = table.Column<string>(type: "text", nullable: true),
|
||||
TvDbId = table.Column<string>(type: "text", nullable: true),
|
||||
TheMovieDbId = table.Column<string>(type: "text", nullable: true),
|
||||
Type = table.Column<int>(type: "integer", nullable: false),
|
||||
Quality = table.Column<string>(type: "text", nullable: true),
|
||||
Has4K = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Url = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmbyContent", x => x.Id);
|
||||
table.UniqueConstraint("AK_EmbyContent_EmbyId", x => x.EmbyId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JellyfinContent",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ProviderId = table.Column<string>(type: "text", nullable: true),
|
||||
JellyfinId = table.Column<string>(type: "text", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
ImdbId = table.Column<string>(type: "text", nullable: true),
|
||||
TvDbId = table.Column<string>(type: "text", nullable: true),
|
||||
TheMovieDbId = table.Column<string>(type: "text", nullable: true),
|
||||
Type = table.Column<int>(type: "integer", nullable: false),
|
||||
Quality = table.Column<string>(type: "text", nullable: true),
|
||||
Has4K = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Url = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JellyfinContent", x => x.Id);
|
||||
table.UniqueConstraint("AK_JellyfinContent_JellyfinId", x => x.JellyfinId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LidarrAlbumCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ArtistId = table.Column<int>(type: "integer", nullable: false),
|
||||
ForeignAlbumId = table.Column<string>(type: "text", nullable: true),
|
||||
TrackCount = table.Column<int>(type: "integer", nullable: false),
|
||||
ReleaseDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Monitored = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
PercentOfTracks = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LidarrAlbumCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LidarrArtistCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ArtistId = table.Column<int>(type: "integer", nullable: false),
|
||||
ArtistName = table.Column<string>(type: "text", nullable: true),
|
||||
ForeignArtistId = table.Column<string>(type: "text", nullable: true),
|
||||
Monitored = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LidarrArtistCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlexServerContent",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ReleaseYear = table.Column<string>(type: "text", nullable: true),
|
||||
Key = table.Column<string>(type: "text", nullable: false),
|
||||
RequestId = table.Column<int>(type: "integer", nullable: true),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
ImdbId = table.Column<string>(type: "text", nullable: true),
|
||||
TvDbId = table.Column<string>(type: "text", nullable: true),
|
||||
TheMovieDbId = table.Column<string>(type: "text", nullable: true),
|
||||
Type = table.Column<int>(type: "integer", nullable: false),
|
||||
Quality = table.Column<string>(type: "text", nullable: true),
|
||||
Has4K = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Url = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlexServerContent", x => x.Id);
|
||||
table.UniqueConstraint("AK_PlexServerContent_Key", x => x.Key);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlexWatchlistHistory",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TmdbId = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlexWatchlistHistory", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RadarrCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TheMovieDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
HasFile = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Has4K = table.Column<bool>(type: "boolean", nullable: false),
|
||||
HasRegular = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RadarrCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SickRageCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TvDbId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SickRageCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SickRageEpisodeCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
TvDbId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SickRageEpisodeCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SonarrCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TvDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
TheMovieDbId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SonarrCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SonarrEpisodeCache",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
TvDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
MovieDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
HasFile = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SonarrEpisodeCache", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "UserPlayedEpisode",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TheMovieDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
UserId = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UserPlayedEpisode", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "UserPlayedMovie",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TheMovieDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
UserId = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UserPlayedMovie", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmbyEpisode",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
EmbyId = table.Column<string>(type: "text", nullable: true),
|
||||
ParentId = table.Column<string>(type: "text", nullable: true),
|
||||
ProviderId = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
TvDbId = table.Column<string>(type: "text", nullable: true),
|
||||
ImdbId = table.Column<string>(type: "text", nullable: true),
|
||||
TheMovieDbId = table.Column<string>(type: "text", nullable: true),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmbyEpisode", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EmbyEpisode_EmbyContent_ParentId",
|
||||
column: x => x.ParentId,
|
||||
principalTable: "EmbyContent",
|
||||
principalColumn: "EmbyId");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JellyfinEpisode",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
JellyfinId = table.Column<string>(type: "text", nullable: true),
|
||||
ParentId = table.Column<string>(type: "text", nullable: true),
|
||||
ProviderId = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
TvDbId = table.Column<string>(type: "text", nullable: true),
|
||||
ImdbId = table.Column<string>(type: "text", nullable: true),
|
||||
TheMovieDbId = table.Column<string>(type: "text", nullable: true),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JellyfinEpisode", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JellyfinEpisode_JellyfinContent_ParentId",
|
||||
column: x => x.ParentId,
|
||||
principalTable: "JellyfinContent",
|
||||
principalColumn: "JellyfinId");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlexEpisode",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Key = table.Column<string>(type: "text", nullable: true),
|
||||
ParentKey = table.Column<string>(type: "text", nullable: true),
|
||||
GrandparentKey = table.Column<string>(type: "text", nullable: true),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlexEpisode", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PlexEpisode_PlexServerContent_GrandparentKey",
|
||||
column: x => x.GrandparentKey,
|
||||
principalTable: "PlexServerContent",
|
||||
principalColumn: "Key");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlexSeasonsContent",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
PlexContentId = table.Column<string>(type: "text", nullable: true),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
SeasonKey = table.Column<string>(type: "text", nullable: true),
|
||||
ParentKey = table.Column<string>(type: "text", nullable: true),
|
||||
PlexServerContentId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlexSeasonsContent", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PlexSeasonsContent_PlexServerContent_PlexServerContentId",
|
||||
column: x => x.PlexServerContentId,
|
||||
principalTable: "PlexServerContent",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EmbyEpisode_ParentId",
|
||||
table: "EmbyEpisode",
|
||||
column: "ParentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JellyfinEpisode_ParentId",
|
||||
table: "JellyfinEpisode",
|
||||
column: "ParentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlexEpisode_GrandparentKey",
|
||||
table: "PlexEpisode",
|
||||
column: "GrandparentKey");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlexSeasonsContent_PlexServerContentId",
|
||||
table: "PlexSeasonsContent",
|
||||
column: "PlexServerContentId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CouchPotatoCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmbyEpisode");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JellyfinEpisode");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "LidarrAlbumCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "LidarrArtistCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlexEpisode");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlexSeasonsContent");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlexWatchlistHistory");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RadarrCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SickRageCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SickRageEpisodeCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SonarrCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SonarrEpisodeCache");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "UserPlayedEpisode");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "UserPlayedMovie");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmbyContent");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JellyfinContent");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlexServerContent");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,626 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Ombi.Store.Context.Postgres;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.ExternalPostgres
|
||||
{
|
||||
[DbContext(typeof(ExternalPostgresContext))]
|
||||
partial class ExternalPostgresContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.22")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CouchPotatoCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("EmbyId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Quality")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("EmbyContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("EmbyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ParentId");
|
||||
|
||||
b.ToTable("EmbyEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("JellyfinId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Quality")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("JellyfinContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("JellyfinId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ParentId");
|
||||
|
||||
b.ToTable("JellyfinEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.LidarrAlbumCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("ArtistId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ForeignAlbumId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Monitored")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("PercentOfTracks")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("TrackCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("LidarrAlbumCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.LidarrArtistCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ArtistId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ArtistName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ForeignArtistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Monitored")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("LidarrArtistCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("GrandparentKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParentKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GrandparentKey");
|
||||
|
||||
b.ToTable("PlexEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ParentKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PlexContentId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("PlexServerContentId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SeasonKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PlexServerContentId");
|
||||
|
||||
b.ToTable("PlexSeasonsContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AddedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ImdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Quality")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ReleaseYear")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("RequestId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TheMovieDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TvDbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PlexServerContent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistHistory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("TmdbId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PlexWatchlistHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.RadarrCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("Has4K")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("HasFile")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("HasRegular")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("RadarrCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SickRageCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SickRageCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SickRageEpisodeCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SickRageEpisodeCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SonarrCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SonarrCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.SonarrEpisodeCache", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("HasFile")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("MovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TvDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SonarrEpisodeCache");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.UserPlayedEpisode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("UserPlayedEpisode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.UserPlayedMovie", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TheMovieDbId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("UserPlayedMovie");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.EmbyContent", "Series")
|
||||
.WithMany("Episodes")
|
||||
.HasForeignKey("ParentId")
|
||||
.HasPrincipalKey("EmbyId");
|
||||
|
||||
b.Navigation("Series");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.JellyfinContent", "Series")
|
||||
.WithMany("Episodes")
|
||||
.HasForeignKey("ParentId")
|
||||
.HasPrincipalKey("JellyfinId");
|
||||
|
||||
b.Navigation("Series");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.PlexServerContent", "Series")
|
||||
.WithMany("Episodes")
|
||||
.HasForeignKey("GrandparentKey")
|
||||
.HasPrincipalKey("Key");
|
||||
|
||||
b.Navigation("Series");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
|
||||
{
|
||||
b.HasOne("Ombi.Store.Entities.PlexServerContent", null)
|
||||
.WithMany("Seasons")
|
||||
.HasForeignKey("PlexServerContentId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
|
||||
{
|
||||
b.Navigation("Episodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
|
||||
{
|
||||
b.Navigation("Episodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
|
||||
{
|
||||
b.Navigation("Episodes");
|
||||
|
||||
b.Navigation("Seasons");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
1308
src/Ombi.Store/Migrations/OmbiMySql/20231118220121_Radarr4kUserQualityProfile.Designer.cs
generated
Normal file
1308
src/Ombi.Store/Migrations/OmbiMySql/20231118220121_Radarr4kUserQualityProfile.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,37 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.OmbiMySql
|
||||
{
|
||||
public partial class Radarr4kUserQualityProfile : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Radarr4KQualityProfile",
|
||||
table: "UserQualityProfiles",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Radarr4KRootPath",
|
||||
table: "UserQualityProfiles",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Radarr4KQualityProfile",
|
||||
table: "UserQualityProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Radarr4KRootPath",
|
||||
table: "UserQualityProfiles");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -923,6 +923,12 @@ namespace Ombi.Store.Migrations.OmbiMySql
|
|||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Radarr4KQualityProfile")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Radarr4KRootPath")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RadarrQualityProfile")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
1359
src/Ombi.Store/Migrations/OmbiPostgres/20231212135239_Initial.Designer.cs
generated
Normal file
1359
src/Ombi.Store/Migrations/OmbiPostgres/20231212135239_Initial.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
934
src/Ombi.Store/Migrations/OmbiPostgres/20231212135239_Initial.cs
Normal file
934
src/Ombi.Store/Migrations/OmbiPostgres/20231212135239_Initial.cs
Normal file
|
@ -0,0 +1,934 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.OmbiPostgres
|
||||
{
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetRoles",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "text", nullable: false),
|
||||
Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
||||
NormalizedName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
||||
ConcurrencyStamp = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUsers",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "text", nullable: false),
|
||||
Alias = table.Column<string>(type: "text", nullable: true),
|
||||
UserType = table.Column<int>(type: "integer", nullable: false),
|
||||
ProviderUserId = table.Column<string>(type: "text", nullable: true),
|
||||
LastLoggedIn = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
Language = table.Column<string>(type: "text", nullable: true),
|
||||
StreamingCountry = table.Column<string>(type: "text", nullable: false),
|
||||
MovieRequestLimit = table.Column<int>(type: "integer", nullable: true),
|
||||
EpisodeRequestLimit = table.Column<int>(type: "integer", nullable: true),
|
||||
MusicRequestLimit = table.Column<int>(type: "integer", nullable: true),
|
||||
MovieRequestLimitType = table.Column<int>(type: "integer", nullable: true),
|
||||
EpisodeRequestLimitType = table.Column<int>(type: "integer", nullable: true),
|
||||
MusicRequestLimitType = table.Column<int>(type: "integer", nullable: true),
|
||||
UserAccessToken = table.Column<string>(type: "text", nullable: true),
|
||||
MediaServerToken = table.Column<string>(type: "text", nullable: true),
|
||||
PasswordHash = table.Column<string>(type: "text", nullable: true),
|
||||
SecurityStamp = table.Column<string>(type: "text", nullable: true),
|
||||
ConcurrencyStamp = table.Column<string>(type: "text", nullable: true),
|
||||
UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
||||
NormalizedUserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
||||
Email = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
||||
NormalizedEmail = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
||||
EmailConfirmed = table.Column<bool>(type: "boolean", nullable: false),
|
||||
PhoneNumber = table.Column<string>(type: "text", nullable: true),
|
||||
PhoneNumberConfirmed = table.Column<bool>(type: "boolean", nullable: false),
|
||||
TwoFactorEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
||||
LockoutEnd = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
LockoutEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
||||
AccessFailedCount = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUsers", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Audit",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
DateTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Description = table.Column<string>(type: "text", nullable: true),
|
||||
AuditType = table.Column<int>(type: "integer", nullable: false),
|
||||
AuditArea = table.Column<int>(type: "integer", nullable: false),
|
||||
User = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Audit", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "IssueCategory",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Value = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IssueCategory", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "NotificationTemplates",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
NotificationType = table.Column<int>(type: "integer", nullable: false),
|
||||
Agent = table.Column<int>(type: "integer", nullable: false),
|
||||
Subject = table.Column<string>(type: "text", nullable: true),
|
||||
Message = table.Column<string>(type: "text", nullable: true),
|
||||
Enabled = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_NotificationTemplates", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlexWatchlistUserError",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
MediaServerToken = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlexWatchlistUserError", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RecentlyAddedLog",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Type = table.Column<int>(type: "integer", nullable: false),
|
||||
ContentType = table.Column<int>(type: "integer", nullable: false),
|
||||
ContentId = table.Column<int>(type: "integer", nullable: false),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: true),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: true),
|
||||
AlbumId = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RecentlyAddedLog", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RequestQueue",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
RequestId = table.Column<int>(type: "integer", nullable: false),
|
||||
Type = table.Column<int>(type: "integer", nullable: false),
|
||||
Dts = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Error = table.Column<string>(type: "text", nullable: true),
|
||||
Completed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
RetryCount = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RequestQueue", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TvRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TvDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
ExternalProviderId = table.Column<int>(type: "integer", nullable: false),
|
||||
ImdbId = table.Column<string>(type: "text", nullable: true),
|
||||
QualityOverride = table.Column<int>(type: "integer", nullable: true),
|
||||
RootFolder = table.Column<int>(type: "integer", nullable: true),
|
||||
LanguageProfile = table.Column<int>(type: "integer", nullable: true),
|
||||
Overview = table.Column<string>(type: "text", nullable: true),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
PosterPath = table.Column<string>(type: "text", nullable: true),
|
||||
Background = table.Column<string>(type: "text", nullable: true),
|
||||
ReleaseDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Status = table.Column<string>(type: "text", nullable: true),
|
||||
TotalSeasons = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TvRequests", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetRoleClaims",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
RoleId = table.Column<string>(type: "text", nullable: false),
|
||||
ClaimType = table.Column<string>(type: "text", nullable: true),
|
||||
ClaimValue = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
|
||||
column: x => x.RoleId,
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AlbumRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ForeignAlbumId = table.Column<string>(type: "text", nullable: true),
|
||||
ForeignArtistId = table.Column<string>(type: "text", nullable: true),
|
||||
Disk = table.Column<string>(type: "text", nullable: true),
|
||||
Cover = table.Column<string>(type: "text", nullable: true),
|
||||
Rating = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
ReleaseDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
ArtistName = table.Column<string>(type: "text", nullable: true),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
Approved = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsApproved = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
RequestedDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Available = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsAvailable = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
RequestedUserId = table.Column<string>(type: "text", nullable: true),
|
||||
Denied = table.Column<bool>(type: "boolean", nullable: true),
|
||||
MarkedAsDenied = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
DeniedReason = table.Column<string>(type: "text", nullable: true),
|
||||
RequestType = table.Column<int>(type: "integer", nullable: false),
|
||||
RequestedByAlias = table.Column<string>(type: "text", nullable: true),
|
||||
Source = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AlbumRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_AlbumRequests_AspNetUsers_RequestedUserId",
|
||||
column: x => x.RequestedUserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserClaims",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<string>(type: "text", nullable: false),
|
||||
ClaimType = table.Column<string>(type: "text", nullable: true),
|
||||
ClaimValue = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserClaims_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserLogins",
|
||||
columns: table => new
|
||||
{
|
||||
LoginProvider = table.Column<string>(type: "text", nullable: false),
|
||||
ProviderKey = table.Column<string>(type: "text", nullable: false),
|
||||
ProviderDisplayName = table.Column<string>(type: "text", nullable: true),
|
||||
UserId = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserLogins_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserRoles",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(type: "text", nullable: false),
|
||||
RoleId = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
|
||||
column: x => x.RoleId,
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserRoles_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserTokens",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(type: "text", nullable: false),
|
||||
LoginProvider = table.Column<string>(type: "text", nullable: false),
|
||||
Name = table.Column<string>(type: "text", nullable: false),
|
||||
Value = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserTokens_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MobileDevices",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Token = table.Column<string>(type: "text", nullable: true),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", 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");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MovieRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
TheMovieDbId = table.Column<int>(type: "integer", nullable: false),
|
||||
IssueId = table.Column<int>(type: "integer", nullable: true),
|
||||
RootPathOverride = table.Column<int>(type: "integer", nullable: false),
|
||||
QualityOverride = table.Column<int>(type: "integer", nullable: false),
|
||||
Has4KRequest = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Approved4K = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsApproved4K = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
RequestedDate4k = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Available4K = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsAvailable4K = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
Denied4K = table.Column<bool>(type: "boolean", nullable: true),
|
||||
MarkedAsDenied4K = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
DeniedReason4K = table.Column<string>(type: "text", nullable: true),
|
||||
LangCode = table.Column<string>(type: "text", nullable: true),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
Approved = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsApproved = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
RequestedDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Available = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsAvailable = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
RequestedUserId = table.Column<string>(type: "text", nullable: true),
|
||||
Denied = table.Column<bool>(type: "boolean", nullable: true),
|
||||
MarkedAsDenied = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
DeniedReason = table.Column<string>(type: "text", nullable: true),
|
||||
RequestType = table.Column<int>(type: "integer", nullable: false),
|
||||
RequestedByAlias = table.Column<string>(type: "text", nullable: true),
|
||||
Source = table.Column<int>(type: "integer", nullable: false),
|
||||
ImdbId = table.Column<string>(type: "text", nullable: true),
|
||||
Overview = table.Column<string>(type: "text", nullable: true),
|
||||
PosterPath = table.Column<string>(type: "text", nullable: true),
|
||||
ReleaseDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
DigitalReleaseDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
Status = table.Column<string>(type: "text", nullable: true),
|
||||
Background = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MovieRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_MovieRequests_AspNetUsers_RequestedUserId",
|
||||
column: x => x.RequestedUserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "NotificationUserId",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
PlayerId = table.Column<string>(type: "text", nullable: true),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
AddedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_NotificationUserId", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_NotificationUserId_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RequestLog",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
RequestType = table.Column<int>(type: "integer", nullable: false),
|
||||
RequestDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
RequestId = table.Column<int>(type: "integer", nullable: false),
|
||||
EpisodeCount = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RequestLog", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RequestLog_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RequestSubscription",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
RequestId = table.Column<int>(type: "integer", nullable: false),
|
||||
RequestType = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RequestSubscription", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RequestSubscription_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Tokens",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Token = table.Column<string>(type: "text", nullable: true),
|
||||
UserId = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Tokens", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Tokens_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "UserNotificationPreferences",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
Agent = table.Column<int>(type: "integer", nullable: false),
|
||||
Enabled = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Value = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UserNotificationPreferences", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_UserNotificationPreferences_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "UserQualityProfiles",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
SonarrQualityProfileAnime = table.Column<int>(type: "integer", nullable: false),
|
||||
SonarrRootPathAnime = table.Column<int>(type: "integer", nullable: false),
|
||||
SonarrRootPath = table.Column<int>(type: "integer", nullable: false),
|
||||
SonarrQualityProfile = table.Column<int>(type: "integer", nullable: false),
|
||||
RadarrRootPath = table.Column<int>(type: "integer", nullable: false),
|
||||
RadarrQualityProfile = table.Column<int>(type: "integer", nullable: false),
|
||||
Radarr4KRootPath = table.Column<int>(type: "integer", nullable: false),
|
||||
Radarr4KQualityProfile = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UserQualityProfiles", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_UserQualityProfiles_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Votes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
RequestId = table.Column<int>(type: "integer", nullable: false),
|
||||
VoteType = table.Column<int>(type: "integer", nullable: false),
|
||||
RequestType = table.Column<int>(type: "integer", nullable: false),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Deleted = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Votes", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Votes_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ChildRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ParentRequestId = table.Column<int>(type: "integer", nullable: false),
|
||||
IssueId = table.Column<int>(type: "integer", nullable: true),
|
||||
SeriesType = table.Column<int>(type: "integer", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
Approved = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsApproved = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
RequestedDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Available = table.Column<bool>(type: "boolean", nullable: false),
|
||||
MarkedAsAvailable = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
RequestedUserId = table.Column<string>(type: "text", nullable: true),
|
||||
Denied = table.Column<bool>(type: "boolean", nullable: true),
|
||||
MarkedAsDenied = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
DeniedReason = table.Column<string>(type: "text", nullable: true),
|
||||
RequestType = table.Column<int>(type: "integer", nullable: false),
|
||||
RequestedByAlias = table.Column<string>(type: "text", nullable: true),
|
||||
Source = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ChildRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ChildRequests_AspNetUsers_RequestedUserId",
|
||||
column: x => x.RequestedUserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_ChildRequests_TvRequests_ParentRequestId",
|
||||
column: x => x.ParentRequestId,
|
||||
principalTable: "TvRequests",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Issues",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
RequestType = table.Column<int>(type: "integer", nullable: false),
|
||||
ProviderId = table.Column<string>(type: "text", nullable: true),
|
||||
RequestId = table.Column<int>(type: "integer", nullable: true),
|
||||
Subject = table.Column<string>(type: "text", nullable: true),
|
||||
Description = table.Column<string>(type: "text", nullable: true),
|
||||
IssueCategoryId = table.Column<int>(type: "integer", nullable: false),
|
||||
Status = table.Column<int>(type: "integer", nullable: false),
|
||||
ResovledDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
CreatedDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
UserReportedId = table.Column<string>(type: "text", nullable: true),
|
||||
IssueId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Issues", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Issues_AspNetUsers_UserReportedId",
|
||||
column: x => x.UserReportedId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Issues_ChildRequests_IssueId",
|
||||
column: x => x.IssueId,
|
||||
principalTable: "ChildRequests",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Issues_IssueCategory_IssueCategoryId",
|
||||
column: x => x.IssueCategoryId,
|
||||
principalTable: "IssueCategory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Issues_MovieRequests_IssueId",
|
||||
column: x => x.IssueId,
|
||||
principalTable: "MovieRequests",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SeasonRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
SeasonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
Overview = table.Column<string>(type: "text", nullable: true),
|
||||
ChildRequestId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SeasonRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SeasonRequests_ChildRequests_ChildRequestId",
|
||||
column: x => x.ChildRequestId,
|
||||
principalTable: "ChildRequests",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "IssueComments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<string>(type: "text", nullable: true),
|
||||
Comment = table.Column<string>(type: "text", nullable: true),
|
||||
IssuesId = table.Column<int>(type: "integer", nullable: true),
|
||||
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IssueComments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_IssueComments_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_IssueComments_Issues_IssuesId",
|
||||
column: x => x.IssuesId,
|
||||
principalTable: "Issues",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EpisodeRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
EpisodeNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
AirDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Url = table.Column<string>(type: "text", nullable: true),
|
||||
Available = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Approved = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Requested = table.Column<bool>(type: "boolean", nullable: false),
|
||||
SeasonId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EpisodeRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EpisodeRequests_SeasonRequests_SeasonId",
|
||||
column: x => x.SeasonId,
|
||||
principalTable: "SeasonRequests",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AlbumRequests_RequestedUserId",
|
||||
table: "AlbumRequests",
|
||||
column: "RequestedUserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetRoleClaims_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "RoleNameIndex",
|
||||
table: "AspNetRoles",
|
||||
column: "NormalizedName",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUserClaims_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUserLogins_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUserRoles_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "EmailIndex",
|
||||
table: "AspNetUsers",
|
||||
column: "NormalizedEmail");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "UserNameIndex",
|
||||
table: "AspNetUsers",
|
||||
column: "NormalizedUserName",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChildRequests_ParentRequestId",
|
||||
table: "ChildRequests",
|
||||
column: "ParentRequestId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChildRequests_RequestedUserId",
|
||||
table: "ChildRequests",
|
||||
column: "RequestedUserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EpisodeRequests_SeasonId",
|
||||
table: "EpisodeRequests",
|
||||
column: "SeasonId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_IssueComments_IssuesId",
|
||||
table: "IssueComments",
|
||||
column: "IssuesId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_IssueComments_UserId",
|
||||
table: "IssueComments",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Issues_IssueCategoryId",
|
||||
table: "Issues",
|
||||
column: "IssueCategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Issues_IssueId",
|
||||
table: "Issues",
|
||||
column: "IssueId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Issues_UserReportedId",
|
||||
table: "Issues",
|
||||
column: "UserReportedId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MobileDevices_UserId",
|
||||
table: "MobileDevices",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MovieRequests_RequestedUserId",
|
||||
table: "MovieRequests",
|
||||
column: "RequestedUserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_NotificationUserId_UserId",
|
||||
table: "NotificationUserId",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RequestLog_UserId",
|
||||
table: "RequestLog",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RequestSubscription_UserId",
|
||||
table: "RequestSubscription",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SeasonRequests_ChildRequestId",
|
||||
table: "SeasonRequests",
|
||||
column: "ChildRequestId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Tokens_UserId",
|
||||
table: "Tokens",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_UserNotificationPreferences_UserId",
|
||||
table: "UserNotificationPreferences",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_UserQualityProfiles_UserId",
|
||||
table: "UserQualityProfiles",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Votes_UserId",
|
||||
table: "Votes",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AlbumRequests");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetRoleClaims");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserClaims");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserLogins");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserRoles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserTokens");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Audit");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EpisodeRequests");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "IssueComments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "MobileDevices");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "NotificationTemplates");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "NotificationUserId");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlexWatchlistUserError");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RecentlyAddedLog");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RequestLog");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RequestQueue");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RequestSubscription");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Tokens");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "UserNotificationPreferences");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "UserQualityProfiles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Votes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetRoles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SeasonRequests");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Issues");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ChildRequests");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "IssueCategory");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "MovieRequests");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TvRequests");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUsers");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
1306
src/Ombi.Store/Migrations/OmbiSqlite/20231118214929_Radarr4kUserQualityProfile.Designer.cs
generated
Normal file
1306
src/Ombi.Store/Migrations/OmbiSqlite/20231118214929_Radarr4kUserQualityProfile.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,37 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.OmbiSqlite
|
||||
{
|
||||
public partial class Radarr4kUserQualityProfile : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Radarr4KQualityProfile",
|
||||
table: "UserQualityProfiles",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Radarr4KRootPath",
|
||||
table: "UserQualityProfiles",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Radarr4KQualityProfile",
|
||||
table: "UserQualityProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Radarr4KRootPath",
|
||||
table: "UserQualityProfiles");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -921,6 +921,12 @@ namespace Ombi.Store.Migrations.OmbiSqlite
|
|||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Radarr4KQualityProfile")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Radarr4KRootPath")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("RadarrQualityProfile")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
|
|
66
src/Ombi.Store/Migrations/SettingsPostgres/20231212135625_Initial.Designer.cs
generated
Normal file
66
src/Ombi.Store/Migrations/SettingsPostgres/20231212135625_Initial.Designer.cs
generated
Normal file
|
@ -0,0 +1,66 @@
|
|||
// <auto-generated />
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Ombi.Store.Context.Postgres;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.SettingsPostgres
|
||||
{
|
||||
[DbContext(typeof(SettingsPostgresContext))]
|
||||
[Migration("20231212135625_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.22")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.ApplicationConfiguration", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("ApplicationConfiguration");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.GlobalSettings", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Content")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SettingsName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("GlobalSettings");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.SettingsPostgres
|
||||
{
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ApplicationConfiguration",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Type = table.Column<int>(type: "integer", nullable: false),
|
||||
Value = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ApplicationConfiguration", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GlobalSettings",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Content = table.Column<string>(type: "text", nullable: true),
|
||||
SettingsName = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GlobalSettings", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ApplicationConfiguration");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "GlobalSettings");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
// <auto-generated />
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Ombi.Store.Context.Postgres;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.SettingsPostgres
|
||||
{
|
||||
[DbContext(typeof(SettingsPostgresContext))]
|
||||
partial class SettingsPostgresContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.22")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.ApplicationConfiguration", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("ApplicationConfiguration");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.GlobalSettings", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Content")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SettingsName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("GlobalSettings");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
@ -12,14 +12,15 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.9">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.5" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.22" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
||||
<PackageReference Include="Polly" Version="7.2.3" />
|
||||
<!--<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="1.1.9" />-->
|
||||
|
@ -40,4 +41,8 @@
|
|||
<LastGenOutput>Sql.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\OmbiPostgres\" />
|
||||
<Folder Include="Migrations\SettingsPostgres\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Configurations>Debug;Release;NonUiBuild</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.5" />
|
||||
<PackageReference Include="Moq" Version="4.18.2" />
|
||||
<PackageReference Include="Moq.AutoMock" Version="3.4.0" />
|
||||
<PackageReference Include="Nunit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.2" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<packagereference Include="Microsoft.NET.Test.Sdk" Version="17.6.2"></packagereference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyName>Ombi.Api.TheMovieDb</AssemblyName>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>win10-x64;win10-x86;osx-x64;ubuntu-x64;debian.8-x64;centos.7-x64;linux-x64;linux-arm;linux-arm64;</RuntimeIdentifiers>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
||||
<FileVersion>3.0.0.0</FileVersion>
|
||||
<Version></Version>
|
||||
|
|
11
src/Ombi.sln
11
src/Ombi.sln
|
@ -64,10 +64,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Radarr", "Ombi.Api
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Discord", "Ombi.Api.Discord\Ombi.Api.Discord.csproj", "{5AF2B6D2-5CC6-49FE-928A-BA27AF52B194}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Updater", "Ombi.Updater\Ombi.Updater.csproj", "{6294A82D-4915-4FC3-B301-8F985716F34C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Update", "Update", "{D11FE57E-1E57-491D-A1D4-01AEF4BE5CB6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Notifications.Tests", "Ombi.Notifications.Tests\Ombi.Notifications.Tests.csproj", "{2C7836E7-B120-40A6-B641-DDAA02FBAE23}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ombi.Api.Service", "Ombi.Api.Service\Ombi.Api.Service.csproj", "{A0892896-F5BD-47E2-823E-DFCE82514EEC}"
|
||||
|
@ -261,12 +257,6 @@ Global
|
|||
{5AF2B6D2-5CC6-49FE-928A-BA27AF52B194}.NonUiBuild|Any CPU.Build.0 = NonUiBuild|Any CPU
|
||||
{5AF2B6D2-5CC6-49FE-928A-BA27AF52B194}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AF2B6D2-5CC6-49FE-928A-BA27AF52B194}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6294A82D-4915-4FC3-B301-8F985716F34C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6294A82D-4915-4FC3-B301-8F985716F34C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6294A82D-4915-4FC3-B301-8F985716F34C}.NonUiBuild|Any CPU.ActiveCfg = NonUiBuild|Any CPU
|
||||
{6294A82D-4915-4FC3-B301-8F985716F34C}.NonUiBuild|Any CPU.Build.0 = NonUiBuild|Any CPU
|
||||
{6294A82D-4915-4FC3-B301-8F985716F34C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6294A82D-4915-4FC3-B301-8F985716F34C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2C7836E7-B120-40A6-B641-DDAA02FBAE23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2C7836E7-B120-40A6-B641-DDAA02FBAE23}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2C7836E7-B120-40A6-B641-DDAA02FBAE23}.NonUiBuild|Any CPU.ActiveCfg = NonUiBuild|Any CPU
|
||||
|
@ -467,7 +457,6 @@ Global
|
|||
{FC6A8F7C-9722-4AE4-960D-277ACB0E81CB} = {6F42AB98-9196-44C4-B888-D5E409F415A1}
|
||||
{94D04C1F-E35A-499C-B0A0-9FADEBDF8336} = {9293CA11-360A-4C20-A674-B9E794431BF5}
|
||||
{5AF2B6D2-5CC6-49FE-928A-BA27AF52B194} = {9293CA11-360A-4C20-A674-B9E794431BF5}
|
||||
{6294A82D-4915-4FC3-B301-8F985716F34C} = {D11FE57E-1E57-491D-A1D4-01AEF4BE5CB6}
|
||||
{2C7836E7-B120-40A6-B641-DDAA02FBAE23} = {6F42AB98-9196-44C4-B888-D5E409F415A1}
|
||||
{A0892896-F5BD-47E2-823E-DFCE82514EEC} = {9293CA11-360A-4C20-A674-B9E794431BF5}
|
||||
{FD947E63-A0D2-4878-8378-2005D5E9AB8A} = {9293CA11-360A-4C20-A674-B9E794431BF5}
|
||||
|
|
18
src/Ombi/ClientApp/.prettierrc.js
Normal file
18
src/Ombi/ClientApp/.prettierrc.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
module.exports = {
|
||||
...require('@exclaimer/prettier-config'),
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.yaml', '*.yml'],
|
||||
options: {
|
||||
tabWidth: 2,
|
||||
singleQuote: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: 'index.html',
|
||||
options: {
|
||||
parser: 'html',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
|
@ -82,22 +82,22 @@
|
|||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "ombi:build"
|
||||
"buildTarget": "ombi:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "ombi:build:production"
|
||||
"buildTarget": "ombi:build:production"
|
||||
},
|
||||
"hmr": {
|
||||
"hmr": true,
|
||||
"browserTarget": "ombi:build:hmr"
|
||||
"buildTarget": "ombi:build:hmr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "ombi:build"
|
||||
"buildTarget": "ombi:build"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
|
|
@ -1,70 +1,71 @@
|
|||
{
|
||||
"name": "ombi",
|
||||
"version": "3.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port 3578 --configuration hmr",
|
||||
"build": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build -c production",
|
||||
"lint": "ng lint",
|
||||
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"chromatic": "chromatic --exit-zero-on-changes",
|
||||
"storybookbuild": "yarn build-storybook"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^15.2.9",
|
||||
"@angular/cdk": "^14.2.7",
|
||||
"@angular/common": "^15.2.9",
|
||||
"@angular/compiler": "^15.2.9",
|
||||
"@angular/core": "^15.2.9",
|
||||
"@angular/forms": "^15.2.9",
|
||||
"@angular/material": "^14.2.7",
|
||||
"@angular/platform-browser": "^15.2.9",
|
||||
"@angular/platform-browser-dynamic": "^15.2.9",
|
||||
"@angular/platform-server": "^15.2.9",
|
||||
"@angular/router": "^15.2.9",
|
||||
"@angularclass/hmr": "^3.0.0",
|
||||
"@auth0/angular-jwt": "^5.0.2",
|
||||
"@fortawesome/fontawesome-free": "^6.4.0",
|
||||
"@microsoft/signalr": "^6.0.20",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@ngx-translate/http-loader": "^7.0.0",
|
||||
"@ngxs/devtools-plugin": "3.8.1",
|
||||
"@ngxs/store": "3.8.1",
|
||||
"@types/jquery": "^3.5.14",
|
||||
"@yellowspot/ng-truncate": "^2.0.0",
|
||||
"angularx-qrcode": "^15.0.0",
|
||||
"bootstrap": "^4.2.1",
|
||||
"core-js": "^2.5.4",
|
||||
"jquery": "3.7.0",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.29.1",
|
||||
"ng2-cookies": "^1.0.12",
|
||||
"ngx-clipboard": "^12.1.0",
|
||||
"ngx-infinite-scroll": "^9.0.0",
|
||||
"ngx-moment": "^3.0.1",
|
||||
"ngx-order-pipe": "^2.2.0",
|
||||
"popper.js": "^1.14.3",
|
||||
"primeicons": "^6.0.1",
|
||||
"primeng": "^15.4.1",
|
||||
"rxjs": "^7.5.4",
|
||||
"ts-md5": "^1.2.7",
|
||||
"zone.js": "~0.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^15.0.2",
|
||||
"@angular/cli": "^15.0.2",
|
||||
"@angular/compiler-cli": "^15.0.4",
|
||||
"@babel/core": "^7.18.9",
|
||||
"@compodoc/compodoc": "^1.1.19",
|
||||
"@storybook/angular": "^6.5.9",
|
||||
"chromatic": "^6.7.1",
|
||||
"typescript": "~4.8.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~5.0.1",
|
||||
"tslint": "^5.12.0"
|
||||
}
|
||||
"name": "ombi",
|
||||
"version": "4.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port 3578 --configuration hmr",
|
||||
"build": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build -c production",
|
||||
"lint": "ng lint",
|
||||
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"chromatic": "chromatic --exit-zero-on-changes",
|
||||
"storybookbuild": "yarn build-storybook"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^17.3.11",
|
||||
"@angular/cdk": "16.2.14",
|
||||
"@angular/common": "^17.3.11",
|
||||
"@angular/compiler": "^17.3.11",
|
||||
"@angular/core": "^17.3.11",
|
||||
"@angular/forms": "^17.3.11",
|
||||
"@angular/material": "^14.2.7",
|
||||
"@angular/platform-browser": "^17.3.11",
|
||||
"@angular/platform-browser-dynamic": "^17.3.11",
|
||||
"@angular/platform-server": "^17.3.11",
|
||||
"@angular/router": "^17.3.11",
|
||||
"@angularclass/hmr": "^3.0.0",
|
||||
"@auth0/angular-jwt": "^5.0.2",
|
||||
"@fortawesome/fontawesome-free": "^6.5.2",
|
||||
"@microsoft/signalr": "^6.0.23",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@ngx-translate/http-loader": "^7.0.0",
|
||||
"@ngxs/devtools-plugin": "3.8.2",
|
||||
"@ngxs/store": "3.8.2",
|
||||
"@types/jquery": "^3.5.23",
|
||||
"@yellowspot/ng-truncate": "^2.0.0",
|
||||
"angularx-qrcode": "^16.0.0",
|
||||
"bootstrap": "^4.2.1",
|
||||
"core-js": "^2.5.4",
|
||||
"date-fns": "3.3.1",
|
||||
"jquery": "3.7.1",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"ng2-cookies": "^1.0.12",
|
||||
"ngx-clipboard": "^16.0.0",
|
||||
"ngx-date-fns": "^11.0.0",
|
||||
"ngx-infinite-scroll": "^17.0.1",
|
||||
"popper.js": "^1.14.3",
|
||||
"primeicons": "^6.0.1",
|
||||
"primeng": "^17.6.0",
|
||||
"rxjs": "^7.5.4",
|
||||
"ts-md5": "^1.2.7",
|
||||
"zone.js": "0.14.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^17.1.3",
|
||||
"@angular/cli": "^17.1.3",
|
||||
"@angular/compiler-cli": "^17.1.3",
|
||||
"@babel/core": "^7.18.9",
|
||||
"@compodoc/compodoc": "^1.1.19",
|
||||
"@storybook/angular": "7.6.14",
|
||||
"@types/node": "^20.11.17",
|
||||
"chromatic": "^6.7.1",
|
||||
"typescript": "5.2.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~5.0.1",
|
||||
"tslint": "^5.12.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
import { Injectable } from "@angular/core";
|
||||
import { Router } from "@angular/router";
|
||||
import { CanActivate } from "@angular/router";
|
||||
|
||||
import { AuthService } from "./auth.service";
|
||||
import { StorageService } from "../shared/storage/storage-service";
|
||||
|
||||
@Injectable()
|
||||
export class AuthGuard implements CanActivate {
|
||||
export class AuthGuard {
|
||||
|
||||
constructor(private auth: AuthService, private router: Router,
|
||||
private store: StorageService) { }
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<p id="detailed-request-requestedby-{{request.mediaId}}">{{'MediaDetails.RequestedBy' | translate}} {{request.username}}</p>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<p id="detailed-request-date-{{request.mediaId}}">{{'MediaDetails.OnDate' | translate}} {{request.requestDate | amFromUtc | amLocal | amUserLocale | amDateFormat: 'l LT'}}</p>
|
||||
<p id="detailed-request-date-{{request.mediaId}}">{{'MediaDetails.OnDate' | translate}} {{request.requestDate | ombiDate: 'Ppp'}}</p>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<p id="detailed-request-status-{{request.mediaId}}">{{'MediaDetails.Status' | translate}} <span class="badge badge-{{getClass(request)}}">{{getStatus(request) | translate}}</span></p>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue