diff --git a/.github/workflows/automation-tests.yml b/.github/workflows/automation-tests.yml
index 5c40edd58..97572ad25 100644
--- a/.github/workflows/automation-tests.yml
+++ b/.github/workflows/automation-tests.yml
@@ -24,7 +24,7 @@ jobs:
with:
node-version: '18'
- - uses: actions/cache@v4
+ - uses: actions/cache@v2
with:
path: |
'**/node_modules'
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 998b8387c..bad75a4f4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,7 +15,7 @@ jobs:
node-version: '18'
- name: NodeModules Cache
- uses: actions/cache@v4
+ uses: actions/cache@v2
with:
path: '**/node_modules'
key: node_modules-${{ hashFiles('**/yarn.lock') }}
@@ -27,7 +27,7 @@ jobs:
run: yarn --cwd ./src/Ombi/ClientApp run build
- name: Publish UI Artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v2
with:
name: angular_dist
path: |
@@ -42,7 +42,7 @@ jobs:
dotnet-version: '8.0.x'
- name: Nuget Cache
- uses: actions/cache@v4
+ uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -84,10 +84,10 @@ jobs:
strategy:
matrix:
include:
- - os: win-x64
+ - os: win10-x64
format: zip
compression: zip
- - os: win-x86
+ - os: win10-x86
format: zip
compression: zip
- os: linux-x64
@@ -106,13 +106,13 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '8.0.x'
+ dotnet-version: '6.0.x'
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Nuget Cache
- uses: actions/cache@v4
+ uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -130,7 +130,7 @@ jobs:
working-directory: src/Ombi
- name: Download Angular
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v2
with:
name: angular_dist
path: ~/src/Ombi/dist
@@ -156,7 +156,7 @@ jobs:
directory: 'src/Ombi/${{ matrix.os }}'
- name: Publish Release
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: |
@@ -170,7 +170,7 @@ jobs:
- name: Download Artifacts
id: download
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v2
with:
path: artifacts
diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml
index d142c46c8..f068794be 100644
--- a/.github/workflows/chromatic.yml
+++ b/.github/workflows/chromatic.yml
@@ -17,7 +17,7 @@
# fetch-depth: 0
# - name: NodeModules Cache
-# uses: actions/cache@v4
+# uses: actions/cache@v2
# with:
# path: '**/node_modules'
# key: node_modules-${{ hashFiles('**/yarn.lock') }}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index b67002361..8c870059c 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -37,7 +37,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v3
+ uses: github/codeql-action/init@v1
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@v3
+ uses: github/codeql-action/autobuild@v1
# ℹ️ 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@v3
+ uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 5a0e0a46d..d0e36555b 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -20,7 +20,7 @@ jobs:
node-version: '18'
- name: NodeModules Cache
- uses: actions/cache@v4
+ uses: actions/cache@v2
with:
path: '**/node_modules'
key: node_modules-${{ hashFiles('**/yarn.lock') }}
@@ -41,7 +41,7 @@ jobs:
dotnet-version: '8.0.x'
- name: Nuget Cache
- uses: actions/cache@v4
+ uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -76,10 +76,10 @@ jobs:
strategy:
matrix:
include:
- - os: win-x64
+ - os: win10-x64
format: zip
compression: zip
- - os: win-x86
+ - os: win10-x86
format: zip
compression: zip
- os: linux-x64
@@ -98,10 +98,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '8.0.x'
+ dotnet-version: '6.0.x'
- name: Nuget Cache
- uses: actions/cache@v4
+ uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 115942b8b..c8d3461d3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,226 +1,4 @@
-## [4.49.3](https://github.com/Ombi-app/Ombi/compare/v4.49.2...v4.49.3) (2025-08-17)
-
-
-### Bug Fixes
-
-* **plex-api:** update Plex Watchlist URL ([11fd7a5](https://github.com/Ombi-app/Ombi/commit/11fd7a5fc853da75974a16bf4fdecd72a836f54b))
-
-
-
-## [4.49.2](https://github.com/Ombi-app/Ombi/compare/v4.49.1...v4.49.2) (2025-07-12)
-
-
-### Performance Improvements
-
-* **discover:** :zap: Improve the loading performance on the discover page ([97d5167](https://github.com/Ombi-app/Ombi/commit/97d5167db6c9f915021f32b96b281d7db3741d7f))
-
-
-
-## [4.49.1](https://github.com/Ombi-app/Ombi/compare/v4.49.0...v4.49.1) (2025-07-12)
-
-
-### Bug Fixes
-
-* **auth:** Fixed an issue where refreshing the page as a power user would stop the application from loading [#5242](https://github.com/Ombi-app/Ombi/issues/5242) ([cee4014](https://github.com/Ombi-app/Ombi/commit/cee40146ee02f7fb79e2019d6fe2f9d5c5dbdfc8))
-
-
-
-# [4.49.0](https://github.com/Ombi-app/Ombi/compare/v4.48.5...v4.49.0) (2025-07-11)
-
-
-### Features
-
-* Added the ability for the Watchlist to automatically refresh the users token. This will reduce the need for the user to log in ([067c029](https://github.com/Ombi-app/Ombi/commit/067c029f42e9fd853d060fdb2093013b15ac14c0))
-
-
-
-## [4.48.5](https://github.com/Ombi-app/Ombi/compare/v4.48.4...v4.48.5) (2025-05-14)
-
-
-### Bug Fixes
-
-* filter out excluded notification agents from user preferences ([c9ab4f4](https://github.com/Ombi-app/Ombi/commit/c9ab4f4f9faa66dbf263da693db1eefcf68beeec)), closes [#5196](https://github.com/Ombi-app/Ombi/issues/5196)
-
-
-
-## [4.48.4](https://github.com/Ombi-app/Ombi/compare/v4.48.3...v4.48.4) (2025-05-14)
-
-
-### Bug Fixes
-
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([dbbfdd9](https://github.com/Ombi-app/Ombi/commit/dbbfdd926f0808f6d16f0b2cd8b5406e6b610c82))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([53a6a09](https://github.com/Ombi-app/Ombi/commit/53a6a092b14b8b8bdbff95d066926d3dbe6951f4))
-* **ui:** correct timezone handling in OmbiDatePipe ([f88c5ad](https://github.com/Ombi-app/Ombi/commit/f88c5ad818fadea7064e7dfbe46f07eae855109a)), closes [#5102](https://github.com/Ombi-app/Ombi/issues/5102)
-
-
-
-## [4.48.3](https://github.com/Ombi-app/Ombi/compare/v4.48.2...v4.48.3) (2025-05-14)
-
-
-### Bug Fixes
-
-* Correct 4K movie request existence check ([ba6e708](https://github.com/Ombi-app/Ombi/commit/ba6e708e189f52f2ff4ebc073fa38a4f53f1061c)), closes [#4798](https://github.com/Ombi-app/Ombi/issues/4798)
-
-
-
-## [4.48.2](https://github.com/Ombi-app/Ombi/compare/v4.48.1...v4.48.2) (2025-05-14)
-
-
-### Bug Fixes
-
-* **radarr:** ensure RequestedUser is loaded when creating tags ([f8658fe](https://github.com/Ombi-app/Ombi/commit/f8658fe6d56488aa5caa68093245cbf021a31810)), closes [#5045](https://github.com/Ombi-app/Ombi/issues/5045)
-
-
-
-## [4.48.1](https://github.com/Ombi-app/Ombi/compare/v4.48.0...v4.48.1) (2025-05-14)
-
-
-
-# [4.48.0](https://github.com/Ombi-app/Ombi/compare/v4.47.3...v4.48.0) (2025-05-14)
-
-
-### Features
-
-* added the watchlist notification ([0dfd453](https://github.com/Ombi-app/Ombi/commit/0dfd4533dba01cb04ea2217c020de8833ddf39c6))
-
-
-
-## [4.47.3](https://github.com/Ombi-app/Ombi/compare/v4.47.2...v4.47.3) (2025-04-13)
-
-
-### Bug Fixes
-
-* [#5223](https://github.com/Ombi-app/Ombi/issues/5223) ([cf0c161](https://github.com/Ombi-app/Ombi/commit/cf0c1614a496b4f7cf19d78e885c3e37dae5cf0f))
-
-
-
-## [4.47.2](https://github.com/Ombi-app/Ombi/compare/v4.47.0...v4.47.2) (2025-03-11)
-
-
-### Bug Fixes
-
-* **user-import:** Do not import users that do not have access to the server [#5064](https://github.com/Ombi-app/Ombi/issues/5064) ([a801cfd](https://github.com/Ombi-app/Ombi/commit/a801cfdb0946cbee3c35b7e917a240f69020f221))
-
-
-
-# [4.47.0](https://github.com/Ombi-app/Ombi/compare/v4.46.8...v4.47.0) (2025-01-03)
-
-
-### Features
-
-* **wizard:** :sparkles: Added the ability to start with a different database ([#5208](https://github.com/Ombi-app/Ombi/issues/5208)) ([cc98fc6](https://github.com/Ombi-app/Ombi/commit/cc98fc6aca27111a8afc3b7b5b8e53207b73fe15))
-
-
-
-## [4.46.8](https://github.com/Ombi-app/Ombi/compare/v4.46.7...v4.46.8) (2025-01-03)
-
-
-### Bug Fixes
-
-* **radarr-settings:** this.normalForm is undefined ([#5207](https://github.com/Ombi-app/Ombi/issues/5207)) ([dc2b958](https://github.com/Ombi-app/Ombi/commit/dc2b958915bf6cb77e093ada843ef6d9f62a3755)), closes [#4994](https://github.com/Ombi-app/Ombi/issues/4994)
-
-
-
-## [4.46.7](https://github.com/Ombi-app/Ombi/compare/v4.46.6...v4.46.7) (2024-12-03)
-
-
-### Bug Fixes
-
-* **requests:** :bug: Power users can now set profiles and root folders when requesting ([138df1e](https://github.com/Ombi-app/Ombi/commit/138df1eb25c709c1939d01d4c9f9ece63f8e0fde))
-
-
-
-## [4.46.6](https://github.com/Ombi-app/Ombi/compare/v4.46.5...v4.46.6) (2024-11-24)
-
-
-
-## [4.46.5](https://github.com/Ombi-app/Ombi/compare/v4.46.4...v4.46.5) (2024-11-23)
-
-
-### Bug Fixes
-
-* **Fixed the UI not applying the correct timezone settings:** :bug: ([029ea79](https://github.com/Ombi-app/Ombi/commit/029ea7919220fbc506898733caeb4370053051a7))
-
-
-
-## [4.46.4](https://github.com/Ombi-app/Ombi/compare/v4.46.3...v4.46.4) (2024-09-09)
-
-
-
-## [4.46.3](https://github.com/Ombi-app/Ombi/compare/v4.46.2...v4.46.3) (2024-09-07)
-
-
-### Bug Fixes
-
-* **radarr-4k:** :bug: Fixed an issue where the overrides wouldn't work for 4k Requests ([0fb29a0](https://github.com/Ombi-app/Ombi/commit/0fb29a0b16b1fc87f71df1a589f6141324cf2f1b))
-
-
-
-## [4.46.2](https://github.com/Ombi-app/Ombi/compare/v4.46.1...v4.46.2) (2024-09-03)
-
-
-### Bug Fixes
-
-* **radarr:** :bug: Enable validation on the radarr settings page ([0af3511](https://github.com/Ombi-app/Ombi/commit/0af3511e819d24e0f4edf6f33931e61bba743224))
-
-
-
-## [4.46.1](https://github.com/Ombi-app/Ombi/compare/v4.46.0...v4.46.1) (2024-08-27)
-
-
-### Bug Fixes
-
-* src/Ombi.Notifications/Ombi.Notifications.csproj to reduce vulnerabilities ([#5167](https://github.com/Ombi-app/Ombi/issues/5167)) ([e1f2a84](https://github.com/Ombi-app/Ombi/commit/e1f2a848065d79c8bba9eafff4f1f5db4a994b53))
-
-
-
-# [4.46.0](https://github.com/Ombi-app/Ombi/compare/v4.45.1...v4.46.0) (2024-08-20)
-
-
-### Bug Fixes
-
-* **discover:** Improved rendering on the discover page ([ea00d6c](https://github.com/Ombi-app/Ombi/commit/ea00d6c12f4441da243287d0fbc706d66c0afd82))
-* src/Ombi.Store/Ombi.Store.csproj to reduce vulnerabilities ([#5160](https://github.com/Ombi-app/Ombi/issues/5160)) ([9c21074](https://github.com/Ombi-app/Ombi/commit/9c2107418939ee92e50c59765481f30efac12eff))
-
-
-### Features
-
-* upgrade @ngx-translate/core from 14.0.0 to 15.0.0 ([#5158](https://github.com/Ombi-app/Ombi/issues/5158)) ([48d3dec](https://github.com/Ombi-app/Ombi/commit/48d3dec26d36002a9d613432fb7f9232d8801cba))
-* upgrade @ngx-translate/http-loader from 7.0.0 to 8.0.0 ([#5159](https://github.com/Ombi-app/Ombi/issues/5159)) ([3bd98c1](https://github.com/Ombi-app/Ombi/commit/3bd98c1d711786bff66f1528dcdddcafe256abd2))
-
-
-
-## [4.45.1](https://github.com/Ombi-app/Ombi/compare/v4.45.0...v4.45.1) (2024-08-20)
-
-
-### Bug Fixes
-
-* **plex:** Fixed some errors around the scanner that was causing the scan to fail ([d9787dc](https://github.com/Ombi-app/Ombi/commit/d9787dc32aace808d196f6f87456ef45de3d7bbf))
-
-
-
-# [4.45.0](https://github.com/Ombi-app/Ombi/compare/v4.44.1...v4.45.0) (2024-08-07)
-
-
-
-# [4.44.0](https://github.com/Ombi-app/Ombi/compare/v4.43.22...v4.44.0) (2024-07-11)
-
-
-### Features
-
-* Adding postgres support to ombi (beta) ([#5050](https://github.com/Ombi-app/Ombi/issues/5050)) ([f8c6102](https://github.com/Ombi-app/Ombi/commit/f8c61027bf53d657d7955a98b69d7ab90b66a75a))
-
-
-
-## [4.43.22](https://github.com/Ombi-app/Ombi/compare/v4.43.21...v4.43.22) (2024-07-08)
-
-
-
-## [4.43.21](https://github.com/Ombi-app/Ombi/compare/v4.43.20...v4.43.21) (2024-06-26)
-
-
-
-## [4.43.20](https://github.com/Ombi-app/Ombi/compare/v4.43.16...v4.43.20) (2024-05-14)
+## [4.43.17](https://github.com/Ombi-app/Ombi/compare/v4.43.16...v4.43.17) (2024-05-14)
### Bug Fixes
@@ -311,7 +89,7 @@
-## [4.43.6](https://github.com/Ombi-app/Ombi/compare/v4.43.5...v4.43.6) (2023-11-01)
+## [4.43.6](https://github.com/Ombi-app/Ombi/compare/v4.43.4...v4.43.6) (2023-11-01)
### Bug Fixes
@@ -1203,257 +981,15 @@
-## [4.44.1](https://github.com/Ombi-app/Ombi/compare/v4.44.0...v4.44.1) (2024-07-22)
+## [4.39.1](https://github.com/Ombi-app/Ombi/compare/v4.39.0...v4.39.1) (2023-05-18)
-## [4.43.5](https://github.com/Ombi-app/Ombi/compare/v4.43.4...v4.43.5) (2023-08-24)
+## [4.35.11](https://github.com/Ombi-app/Ombi/compare/v4.38.2...v4.35.11) (2023-05-17)
-# [4.44.0](https://github.com/Ombi-app/Ombi/compare/v4.43.22...v4.44.0) (2024-07-11)
-
-
-### Features
-
-* Adding postgres support to ombi (beta) ([#5050](https://github.com/Ombi-app/Ombi/issues/5050)) ([f8c6102](https://github.com/Ombi-app/Ombi/commit/f8c61027bf53d657d7955a98b69d7ab90b66a75a))
-
-
-
-## [4.43.22](https://github.com/Ombi-app/Ombi/compare/v4.43.21...v4.43.22) (2024-07-08)
-
-
-
-## [4.43.21](https://github.com/Ombi-app/Ombi/compare/v4.43.20...v4.43.21) (2024-06-26)
-
-
-
-## [4.43.20](https://github.com/Ombi-app/Ombi/compare/v4.43.16...v4.43.20) (2024-05-14)
-
-
-### Bug Fixes
-
-* upgrade multiple dependencies with Snyk ([#5104](https://github.com/Ombi-app/Ombi/issues/5104)) [skip ci] ([a1083f6](https://github.com/Ombi-app/Ombi/commit/a1083f67c73c968b9ff0a0feebe5a9aac6a7c7c9))
-
-
-
-## [4.43.16](https://github.com/Ombi-app/Ombi/compare/v4.43.15...v4.43.16) (2024-04-01)
-
-
-
-## [4.43.15](https://github.com/Ombi-app/Ombi/compare/v4.43.14...v4.43.15) (2024-03-30)
-
-
-### Bug Fixes
-
-* fixed emails not being able to load the template ([6b49d9b](https://github.com/Ombi-app/Ombi/commit/6b49d9bc7108a0b663ca05de19dbf4841c9c43c1))
-
-
-
-## [4.43.14](https://github.com/Ombi-app/Ombi/compare/v4.43.13...v4.43.14) (2024-03-06)
-
-
-### Performance Improvements
-
-* ⚡ Improve render performance on the discover, movie and tv pages ([#5084](https://github.com/Ombi-app/Ombi/issues/5084)) ([71c86a8](https://github.com/Ombi-app/Ombi/commit/71c86a8db9e63bf0ab779f9a8b5d62a42c246392))
-
-
-
-## [4.43.13](https://github.com/Ombi-app/Ombi/compare/v4.43.12...v4.43.13) (2024-03-05)
-
-
-
-## [4.43.12](https://github.com/Ombi-app/Ombi/compare/v4.43.11...v4.43.12) (2024-03-05)
-
-
-### Bug Fixes
-
-* src/Ombi/ClientApp/package.json & src/Ombi/ClientApp/yarn.lock to reduce vulnerabilities ([#5040](https://github.com/Ombi-app/Ombi/issues/5040)) [skip ci] ([955a742](https://github.com/Ombi-app/Ombi/commit/955a742fae1d0a3983c59cf77eb1a2d222f18b48))
-* src/Ombi/ClientApp/package.json & src/Ombi/ClientApp/yarn.lock to reduce vulnerabilities ([#5072](https://github.com/Ombi-app/Ombi/issues/5072)) [skip ci] ([af6a986](https://github.com/Ombi-app/Ombi/commit/af6a9867719deb7b651a6a78352a8ce0df7a0cf0))
-* src/Ombi/Ombi.csproj to reduce vulnerabilities ([#5066](https://github.com/Ombi-app/Ombi/issues/5066)) [skip ci] ([71df058](https://github.com/Ombi-app/Ombi/commit/71df05886512b8589f193a5cda0166c694438fc0))
-* upgrade @fortawesome/fontawesome-free from 6.4.2 to 6.5.0 ([#5053](https://github.com/Ombi-app/Ombi/issues/5053)) [skip ci] ([5017e38](https://github.com/Ombi-app/Ombi/commit/5017e38f87e32821adb744935fffcb2d76927e2c))
-* upgrade @types/jquery from 3.5.27 to 3.5.28 ([#5049](https://github.com/Ombi-app/Ombi/issues/5049)) [skip ci] ([2c8fe80](https://github.com/Ombi-app/Ombi/commit/2c8fe8087aea227e7425e82392ad9ccb3f8261b4))
-* upgrade moment from 2.29.4 to 2.30.1 ([#5075](https://github.com/Ombi-app/Ombi/issues/5075)) [skip ci] ([460fa39](https://github.com/Ombi-app/Ombi/commit/460fa39bb95c73bafcd65fcc394fecca04d3ac49))
-* upgrade multiple dependencies with Snyk ([#5073](https://github.com/Ombi-app/Ombi/issues/5073)) [skip ci] ([a27b459](https://github.com/Ombi-app/Ombi/commit/a27b4592471c58fca9ad5193b979171fa7c5e66d))
-
-
-
-## [4.43.11](https://github.com/Ombi-app/Ombi/compare/v4.43.10...v4.43.11) (2024-01-11)
-
-
-### Bug Fixes
-
-* **emby:** Add more logging on the PlaySync to check for Tv Shows without a valid TMDB ([08eb13b](https://github.com/Ombi-app/Ombi/commit/08eb13b788582d576a0e1befdb8e84ef7ff0d2f3))
-
-
-
-## [4.43.10](https://github.com/Ombi-app/Ombi/compare/v4.43.9...v4.43.10) (2023-11-20)
-
-
-### Bug Fixes
-
-* **radarr-4k:** 🐛 Fixed an issue when using Radarr 4k with user set quality profiles. There are now user quality profiles for 4k profile [#5025](https://github.com/Ombi-app/Ombi/issues/5025) ([62b9a1f](https://github.com/Ombi-app/Ombi/commit/62b9a1f65fc4ee5f1eaf9dfabf37742a9007433e))
-
-
-
-## [4.43.9](https://github.com/Ombi-app/Ombi/compare/v4.43.8...v4.43.9) (2023-11-18)
-
-
-### Bug Fixes
-
-* **sonarr:** 🐛 Correctly monitor episodes ([57e7830](https://github.com/Ombi-app/Ombi/commit/57e7830f8e54b65ce3c1f0b122cbcc517d1af926))
-
-
-
-## [4.43.8](https://github.com/Ombi-app/Ombi/compare/v4.43.7...v4.43.8) (2023-11-09)
-
-
-
-## [4.43.7](https://github.com/Ombi-app/Ombi/compare/v4.43.6...v4.43.7) (2023-11-09)
-
-
-### Bug Fixes
-
-* upgrade @microsoft/signalr from 6.0.22 to 6.0.23 ([#5032](https://github.com/Ombi-app/Ombi/issues/5032)) [skip ci] ([11edac9](https://github.com/Ombi-app/Ombi/commit/11edac961b0b828658be83a9c4e67079345d3b0b))
-* upgrade @types/jquery from 3.5.22 to 3.5.23 ([#5034](https://github.com/Ombi-app/Ombi/issues/5034)) [skip ci] ([9e28879](https://github.com/Ombi-app/Ombi/commit/9e28879fc1a479e1bd77ca003e3e748fec27f081))
-
-
-
-## [4.43.6](https://github.com/Ombi-app/Ombi/compare/v4.43.5...v4.43.6) (2023-11-01)
-
-
-### Bug Fixes
-
-* **discord:** 🐛 Fixed an issue where the Icon in the discord notifications wouldn't apply ([32da949](https://github.com/Ombi-app/Ombi/commit/32da949a9547f68c57eb4338f749228b7de167c2))
-* src/Ombi/ClientApp/package.json & src/Ombi/ClientApp/yarn.lock to reduce vulnerabilities ([#5010](https://github.com/Ombi-app/Ombi/issues/5010)) [skip ci] ([9c2e1b4](https://github.com/Ombi-app/Ombi/commit/9c2e1b435305d51cc9ab7f5d6932ccd3fa723e6c))
-* upgrade @fortawesome/fontawesome-free from 6.4.0 to 6.4.2 ([#5005](https://github.com/Ombi-app/Ombi/issues/5005)) [skip ci] ([f703ff2](https://github.com/Ombi-app/Ombi/commit/f703ff255cf389a60bdece824214d38f57f03f90))
-* upgrade @microsoft/signalr from 6.0.18 to 6.0.20 ([#4999](https://github.com/Ombi-app/Ombi/issues/4999)) [skip ci] ([563a044](https://github.com/Ombi-app/Ombi/commit/563a0443ea09ff71c5aa740173b4f3c5627cb543))
-* upgrade @microsoft/signalr from 6.0.21 to 6.0.22 ([#5020](https://github.com/Ombi-app/Ombi/issues/5020)) ([1261a44](https://github.com/Ombi-app/Ombi/commit/1261a446e7ffa4d7540623f76ecc9d7e643ca4ce))
-* upgrade @types/jquery from 3.5.16 to 3.5.17 ([#5011](https://github.com/Ombi-app/Ombi/issues/5011)) [skip ci] ([40ee175](https://github.com/Ombi-app/Ombi/commit/40ee175ccd6e53b1254833163954b6a1be0d5251))
-* upgrade @types/jquery from 3.5.18 to 3.5.19 ([#5022](https://github.com/Ombi-app/Ombi/issues/5022)) ([291425e](https://github.com/Ombi-app/Ombi/commit/291425e6091d90ac07010ff65cc3a53309965546))
-* upgrade cypress-real-events from 1.10.0 to 1.10.1 ([#5014](https://github.com/Ombi-app/Ombi/issues/5014)) ([ed06c22](https://github.com/Ombi-app/Ombi/commit/ed06c22fb26fb605b857f3f8e1b26b2dbab15710))
-* upgrade cypress-real-events from 1.8.1 to 1.9.1 ([#5000](https://github.com/Ombi-app/Ombi/issues/5000)) [skip ci] ([19e0a88](https://github.com/Ombi-app/Ombi/commit/19e0a886ced344bfe6284f3916fba12826b7de08))
-* upgrade jquery from 3.7.0 to 3.7.1 ([#5015](https://github.com/Ombi-app/Ombi/issues/5015)) ([7bc915c](https://github.com/Ombi-app/Ombi/commit/7bc915cc14ed27ad0f35142279f9362e5b7b27b8))
-* upgrade multiple dependencies with Snyk ([#5030](https://github.com/Ombi-app/Ombi/issues/5030)) ([7e1e254](https://github.com/Ombi-app/Ombi/commit/7e1e254cfe6c84c1f143388f436d63efd4686e55))
-* upgrade zone.js from 0.13.1 to 0.13.2 ([#5019](https://github.com/Ombi-app/Ombi/issues/5019)) ([c5c8dda](https://github.com/Ombi-app/Ombi/commit/c5c8dda7e4f744fa47841efba9f0e8fee9ef67c6))
-
-
-
-## [4.43.4](https://github.com/Ombi-app/Ombi/compare/v4.43.3...v4.43.4) (2023-07-28)
-
-
-### Bug Fixes
-
-* **user-importer:** Fixed not importing all correct users [#4989](https://github.com/Ombi-app/Ombi/issues/4989) ([34c32f8](https://github.com/Ombi-app/Ombi/commit/34c32f8338705ea3f790d95b91c9ada21a41b9f2))
-
-
-
-## [4.43.3](https://github.com/Ombi-app/Ombi/compare/v4.43.2...v4.43.3) (2023-07-28)
-
-
-### Bug Fixes
-
-* switch back to the old plex friends API [#4989](https://github.com/Ombi-app/Ombi/issues/4989) ([c8ad12e](https://github.com/Ombi-app/Ombi/commit/c8ad12eb5f53889609d1793ae907afd33ba6ef38))
-
-
-
-## [4.43.2](https://github.com/Ombi-app/Ombi/compare/v4.43.1...v4.43.2) (2023-07-19)
-
-
-### Bug Fixes
-
-* **plex-api:** Switch over to the new API to avoid deprecation & save… ([#4986](https://github.com/Ombi-app/Ombi/issues/4986)) ([2f2d35e](https://github.com/Ombi-app/Ombi/commit/2f2d35ec867a8e5488e368db294bd37bcf92d843))
-* Remove old trending source ([#4987](https://github.com/Ombi-app/Ombi/issues/4987)) ([aacaa3e](https://github.com/Ombi-app/Ombi/commit/aacaa3e140b43f5d196da612f785cc4451717752))
-
-
-
-## [4.43.1](https://github.com/Ombi-app/Ombi/compare/v4.43.0...v4.43.1) (2023-07-16)
-
-
-### Bug Fixes
-
-* **user-importer:** don't delete admins in the cleanup ([895b9bf](https://github.com/Ombi-app/Ombi/commit/895b9bf6a060a678d4b0cca8083aa96c38e47b95))
-
-
-
-# [4.43.0](https://github.com/Ombi-app/Ombi/compare/v4.42.3...v4.43.0) (2023-07-14)
-
-
-### Features
-
-* Add Auto Approve 4K role ([#4982](https://github.com/Ombi-app/Ombi/issues/4982)) ([#4983](https://github.com/Ombi-app/Ombi/issues/4983)) ([ac05495](https://github.com/Ombi-app/Ombi/commit/ac054954254b9d77a42e057f1065570c7fdc1093)), closes [#4957](https://github.com/Ombi-app/Ombi/issues/4957)
-
-
-
-## [4.42.3](https://github.com/Ombi-app/Ombi/compare/v4.42.2...v4.42.3) (2023-07-13)
-
-
-### Bug Fixes
-
-* **user-importer:** Do not delete the Plex Admin as part of the user Importer cleanup [#4870](https://github.com/Ombi-app/Ombi/issues/4870) ([#4981](https://github.com/Ombi-app/Ombi/issues/4981)) ([4e80e7b](https://github.com/Ombi-app/Ombi/commit/4e80e7b7c3239a46a645ab6d1054993734ad4dd6))
-
-
-
-## [4.42.2](https://github.com/Ombi-app/Ombi/compare/v4.42.1...v4.42.2) (2023-07-03)
-
-
-### Bug Fixes
-
-* Remove Angular TSLint ([#4973](https://github.com/Ombi-app/Ombi/issues/4973)) ([93969b5](https://github.com/Ombi-app/Ombi/commit/93969b5a2d82f442299bee418fae43cb590d7743))
-* upgrade jquery from 3.6.1 to 3.7.0 ([#4974](https://github.com/Ombi-app/Ombi/issues/4974)) ([f2552ef](https://github.com/Ombi-app/Ombi/commit/f2552ef6ede011080a8d5499e11930c4d41d04c2))
-* upgrade multiple dependencies with Snyk ([#4961](https://github.com/Ombi-app/Ombi/issues/4961)) ([3c3edf6](https://github.com/Ombi-app/Ombi/commit/3c3edf6273fa98c420989ebcebfee52b2545e402))
-* upgrade zone.js from 0.11.8 to 0.13.0 ([#4975](https://github.com/Ombi-app/Ombi/issues/4975)) ([37f6564](https://github.com/Ombi-app/Ombi/commit/37f65648a2f8742020b0954acec4168aee048942))
-
-
-
-## [4.42.1](https://github.com/Ombi-app/Ombi/compare/v4.42.0...v4.42.1) (2023-06-20)
-
-
-### Bug Fixes
-
-* More automation tests mainly around the Plex Settings page ([#4821](https://github.com/Ombi-app/Ombi/issues/4821)) ([21bfc5a](https://github.com/Ombi-app/Ombi/commit/21bfc5a45adf6da6a80854e19494a8ffdc9c0761))
-* src/Ombi.Notifications/Ombi.Notifications.csproj to reduce vulnerabilities ([#4969](https://github.com/Ombi-app/Ombi/issues/4969)) [skip ci] ([8584ad4](https://github.com/Ombi-app/Ombi/commit/8584ad46053c51f5da40b24f3efd1b9e5a031ddd))
-* upgrade @fortawesome/fontawesome-free from 6.1.2 to 6.4.0 ([#4965](https://github.com/Ombi-app/Ombi/issues/4965)) [skip ci] ([84454e5](https://github.com/Ombi-app/Ombi/commit/84454e53c00c808e8a393c7750bdc418a7593e91))
-* upgrade @microsoft/signalr from 6.0.11 to 6.0.16 ([#4964](https://github.com/Ombi-app/Ombi/issues/4964)) [skip ci] ([a0201e3](https://github.com/Ombi-app/Ombi/commit/a0201e3f585dc52f717e33c46ede35a4eccac736))
-* upgrade cypress-real-events from 1.7.4 to 1.8.1 ([#4968](https://github.com/Ombi-app/Ombi/issues/4968)) [skip ci] ([8a24b56](https://github.com/Ombi-app/Ombi/commit/8a24b56299c3bc98bf0d719ba448972aaa7f7461))
-* upgrade multiple dependencies with Snyk ([#4963](https://github.com/Ombi-app/Ombi/issues/4963)) [skip ci] ([6025c5e](https://github.com/Ombi-app/Ombi/commit/6025c5ed757438d3a5d79bd36fd789ef0297ce70))
-* upgrade primeng from 15.0.0-rc.1 to 15.4.1 ([#4962](https://github.com/Ombi-app/Ombi/issues/4962)) [skip ci] ([23a4fed](https://github.com/Ombi-app/Ombi/commit/23a4fede69898a25b342aed78a8cda553c1fd18d))
-
-
-
-# [4.42.0](https://github.com/Ombi-app/Ombi/compare/v4.41.1...v4.42.0) (2023-06-02)
-
-
-### Bug Fixes
-
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([#4926](https://github.com/Ombi-app/Ombi/issues/4926)) ([151efe1](https://github.com/Ombi-app/Ombi/commit/151efe19d0012b85f317c175da5ab4802ea14e20))
-
-
-### Features
-
-* **emby:** Show watched status for TV requests ([1f37de0](https://github.com/Ombi-app/Ombi/commit/1f37de08888812b6d130d92bb664a89e89149105))
-
-
-
-## [4.41.1](https://github.com/Ombi-app/Ombi/compare/v4.41.0...v4.41.1) (2023-05-27)
-
-
-
-# [4.41.0](https://github.com/Ombi-app/Ombi/compare/v4.40.0...v4.41.0) (2023-05-27)
-
-
-### Bug Fixes
-
-* Fix various styling issues ([#4935](https://github.com/Ombi-app/Ombi/issues/4935)) ([90b934a](https://github.com/Ombi-app/Ombi/commit/90b934a36996c0f489096f3641350a1c0d3b7c89))
-
-
-### Features
-
-* **emby:** Show end-user external IP address to Emby when logging in as an Emby user ([#4949](https://github.com/Ombi-app/Ombi/issues/4949)) ([79cef7e](https://github.com/Ombi-app/Ombi/commit/79cef7e0f8643e36536a9ea84dd1a07c232403a9)), closes [#4947](https://github.com/Ombi-app/Ombi/issues/4947)
-
-
-
-# [4.40.0](https://github.com/Ombi-app/Ombi/compare/v4.39.1...v4.40.0) (2023-05-18)
+## [4.35.10](https://github.com/Ombi-app/Ombi/compare/v4.35.9...v4.35.10) (2023-02-25)
@@ -2211,3 +1747,132 @@
+## [4.35.11](https://github.com/Ombi-app/Ombi/compare/v4.38.2...v4.35.11) (2023-05-17)
+
+
+
+## [4.35.10](https://github.com/Ombi-app/Ombi/compare/v4.35.9...v4.35.10) (2023-02-25)
+
+
+
+## [4.38.2](https://github.com/Ombi-app/Ombi/compare/v4.38.1...v4.38.2) (2023-05-17)
+
+
+
+## [4.38.1](https://github.com/Ombi-app/Ombi/compare/v4.38.0...v4.38.1) (2023-05-09)
+
+
+### Bug Fixes
+
+* **API:** Allow RequestOnBehalf rights if requested from the API ([#4919](https://github.com/Ombi-app/Ombi/issues/4919)) ([bb6dedd](https://github.com/Ombi-app/Ombi/commit/bb6deddfaecb3d6c7c3c6970414444b619bb9106))
+* **notificaitons:** Add the RequestedByAlias field to the Notification Message ([7e9c8be](https://github.com/Ombi-app/Ombi/commit/7e9c8bec6b02bb4e11f8db50394e493d4dd07723))
+
+
+
+# [4.38.0](https://github.com/Ombi-app/Ombi/compare/v4.37.3...v4.38.0) (2023-05-07)
+
+
+### Bug Fixes
+
+* remove sort header ([969bc7b](https://github.com/Ombi-app/Ombi/commit/969bc7bb25ea900ab9199509b079b36843e5bd6f))
+
+
+### Features
+
+* **emby:** Show watched status for Movie requests ([9cfb10b](https://github.com/Ombi-app/Ombi/commit/9cfb10bb1ee69067a6f47bd2c8a72d4e6834350e))
+
+
+
+## [4.37.3](https://github.com/Ombi-app/Ombi/compare/v4.37.2...v4.37.3) (2023-05-07)
+
+
+### Bug Fixes
+
+* Show the ApiAlias in the requests-list ([9ff624c](https://github.com/Ombi-app/Ombi/commit/9ff624ce4646815b239fbb8327117947f0a90e4b))
+
+
+
+## [4.37.2](https://github.com/Ombi-app/Ombi/compare/v4.37.1...v4.37.2) (2023-05-03)
+
+
+### Bug Fixes
+
+* **jellyfin:** Fixed an issue where the sync could stop working. Removed unused properties so the deseralization no longer fails ([0e5e0ad](https://github.com/Ombi-app/Ombi/commit/0e5e0adf862701d0f672beff14ec0aa75e4b5220))
+
+
+
+## [4.37.1](https://github.com/Ombi-app/Ombi/compare/v4.37.0...v4.37.1) (2023-05-02)
+
+
+### Bug Fixes
+
+* Cron Validation ([#4842](https://github.com/Ombi-app/Ombi/issues/4842)) ([97cc42f](https://github.com/Ombi-app/Ombi/commit/97cc42ffa8672e7d0d0996b5fbda7f7fe699da2d))
+* **discover:** :children_crossing: Improved the new Genre buttons, it now includes TV results ([b087d60](https://github.com/Ombi-app/Ombi/commit/b087d606ff36565208e564f8856903f2a4098db5))
+* **lidarr:** Change monitor to Existing to properly add artist [#3597](https://github.com/Ombi-app/Ombi/issues/3597) ([506f607](https://github.com/Ombi-app/Ombi/commit/506f60773bf1031d0be51ccd34289b855a04ea40)), closes [/github.com/Lidarr/Lidarr/issues/3597#issuecomment-1530804055](https://github.com//github.com/Lidarr/Lidarr/issues/3597/issues/issuecomment-1530804055)
+
+
+
+# [4.37.0](https://github.com/Ombi-app/Ombi/compare/v4.36.1...v4.37.0) (2023-04-24)
+
+
+### Features
+
+* Search by genre ([1837419](https://github.com/Ombi-app/Ombi/commit/18374198f9f2462ba85c5781b0fcc05892728b21))
+
+
+
+## [4.36.1](https://github.com/Ombi-app/Ombi/compare/v4.36.0...v4.36.1) (2023-04-20)
+
+
+### Bug Fixes
+
+* **healthchecks:** Removed redundant ping check ([1751305](https://github.com/Ombi-app/Ombi/commit/1751305064176d2c0135f867773ccc46b03915ec))
+
+
+
+# [4.36.0](https://github.com/Ombi-app/Ombi/compare/v4.35.19...v4.36.0) (2023-04-20)
+
+
+### Features
+
+* **discover:** Add deny option to recently requested ([#4907](https://github.com/Ombi-app/Ombi/issues/4907)) ([78f340e](https://github.com/Ombi-app/Ombi/commit/78f340ee5f309c55690497170897533801957668))
+
+
+
+## [4.35.19](https://github.com/Ombi-app/Ombi/compare/v4.35.18...v4.35.19) (2023-04-20)
+
+
+### Bug Fixes
+
+* **radarr:** Fixed an issue where the radarr sync would break ([de4baad](https://github.com/Ombi-app/Ombi/commit/de4baade9f87248d77106ff1a313a498870f4fb3))
+
+
+
+## [4.35.18](https://github.com/Ombi-app/Ombi/compare/v4.35.17...v4.35.18) (2023-04-15)
+
+
+### Bug Fixes
+
+* **#4906:** :bug: Fixed an issue with power users and permissions ([80884bc](https://github.com/Ombi-app/Ombi/commit/80884bcd725c329867c278ad235cd4096cd4fe7a))
+
+
+
+## [4.35.17](https://github.com/Ombi-app/Ombi/compare/v4.35.16...v4.35.17) (2023-04-15)
+
+
+### Bug Fixes
+
+* **discover:** Fix denied requests displayed as approved ([#4901](https://github.com/Ombi-app/Ombi/issues/4901)) ([1e87f20](https://github.com/Ombi-app/Ombi/commit/1e87f2010491b0f3fdda70d2b19d9afd94438df7))
+* Fix denied movie shown as 'processing request' in details view ([#4900](https://github.com/Ombi-app/Ombi/issues/4900)) ([0069bfd](https://github.com/Ombi-app/Ombi/commit/0069bfdf54e0785bad45c832ca052f19fd4b940b))
+
+
+
+## [4.35.16](https://github.com/Ombi-app/Ombi/compare/v4.35.15...v4.35.16) (2023-04-13)
+
+
+### Bug Fixes
+
+* Support duplicates in Emby/JF collections ([#4902](https://github.com/Ombi-app/Ombi/issues/4902)) ([141f96d](https://github.com/Ombi-app/Ombi/commit/141f96da5e45d5b3fa5f496806b102e473da6607))
+
+
+
diff --git a/README.md b/README.md
index 8fb37b8f8..a8d056cd9 100644
--- a/README.md
+++ b/README.md
@@ -122,10 +122,10 @@ Here are some of the features Ombi has:
-
-
+
+
- Amy Jeanes
+ Matt Jeanes
|
@@ -301,8 +301,8 @@ Here are some of the features Ombi has:
|
-
-
+
+
Michael Reber
@@ -407,14 +407,21 @@ Here are some of the features Ombi has:
Andrew Metzger
|
+
+
+
+
+ Torkil
+
+ |
+
Tom McClellan
- |
-
+
@@ -449,15 +456,15 @@ Here are some of the features Ombi has:
Sean Callinan
- |
+
+
Samuel Bartík
- |
-
+
@@ -492,15 +499,15 @@ Here are some of the features Ombi has:
Micky
- |
+
+
Maxence Lecanu
- |
-
+
@@ -515,20 +522,6 @@ Here are some of the features Ombi has:
Marley
|
-
-
-
-
- Madeleine Schönemann
-
- |
-
-
-
-
- Lucane
-
- |
@@ -542,15 +535,15 @@ Here are some of the features Ombi has:
Mike
- |
-
+
Tdorsey
- |
+
+
@@ -585,15 +578,15 @@ Here are some of the features Ombi has:
Maartenheebink
- |
-
+
M4tta
- |
+
+
@@ -628,15 +621,15 @@ Here are some of the features Ombi has:
Blake Drumm
- |
-
+
Tim OBrien
- |
+
+
@@ -652,17 +645,17 @@ Here are some of the features Ombi has:
|
-
-
+
+
- Torkil
+ Madeleine Schönemann
|
-
-
+
+
- Lea
+ Eli
|
@@ -671,15 +664,15 @@ Here are some of the features Ombi has:
Devin Buhl
- |
-
+
David Torosyan
- |
+
+
@@ -687,13 +680,6 @@ Here are some of the features Ombi has:
David
|
-
-
-
-
- David Benson
-
- |
@@ -714,8 +700,7 @@ Here are some of the features Ombi has:
Christopher Demicoli
- |
-
+
@@ -729,7 +714,8 @@ Here are some of the features Ombi has:
Calvin
- |
+
+
@@ -752,19 +738,11 @@ Here are some of the features Ombi has:
|
-
-
+
+
Aljosa Asanovic
- |
-
-
-
-
-
- Alexandre Picavet
-
|
@@ -779,7 +757,8 @@ Here are some of the features Ombi has:
Alexander Russell
- |
+
+
@@ -787,6 +766,20 @@ Here are some of the features Ombi has:
Abe Kline
|
+
+
+
+
+ Lucane
+
+ |
+
+
+
+
+ Lea
+
+ |
@@ -800,15 +793,15 @@ Here are some of the features Ombi has:
Kris Klosterman
- |
-
+
Jono Cairns
- |
+
+
@@ -816,13 +809,6 @@ Here are some of the features Ombi has:
Jon Bloom
|
-
-
-
-
- Joel Samson
-
- |
@@ -843,8 +829,7 @@ Here are some of the features Ombi has:
James White
- |
-
+
@@ -858,7 +843,8 @@ Here are some of the features Ombi has:
Imgbot
- |
+
+
@@ -886,28 +872,13 @@ Here are some of the features Ombi has:
Grygon
- |
-
+
Fish2
- |
-
-
-
-
- Eli
-
- |
-
-
-
-
- Drew
-
|
diff --git a/src/.idea/.idea.Ombi/.idea/contentModel.xml b/src/.idea/.idea.Ombi/.idea/contentModel.xml
new file mode 100644
index 000000000..ffc2d3ce6
--- /dev/null
+++ b/src/.idea/.idea.Ombi/.idea/contentModel.xml
@@ -0,0 +1,2309 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/.idea.Ombi/.idea/dbnavigator.xml b/src/.idea/.idea.Ombi/.idea/dbnavigator.xml
deleted file mode 100644
index 4e210d20a..000000000
--- a/src/.idea/.idea.Ombi/.idea/dbnavigator.xml
+++ /dev/null
@@ -1,440 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/.idea/.idea.Ombi/.idea/indexLayout.xml b/src/.idea/.idea.Ombi/.idea/indexLayout.xml
index 7b08163ce..27ba142e9 100644
--- a/src/.idea/.idea.Ombi/.idea/indexLayout.xml
+++ b/src/.idea/.idea.Ombi/.idea/indexLayout.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/src/.idea/.idea.Ombi/.idea/modules.xml b/src/.idea/.idea.Ombi/.idea/modules.xml
new file mode 100644
index 000000000..4d6d71637
--- /dev/null
+++ b/src/.idea/.idea.Ombi/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/.idea.Ombi/.idea/projectSettingsUpdater.xml b/src/.idea/.idea.Ombi/.idea/projectSettingsUpdater.xml
deleted file mode 100644
index 64af657f5..000000000
--- a/src/.idea/.idea.Ombi/.idea/projectSettingsUpdater.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/.idea/.idea.Ombi/.idea/workspace.xml b/src/.idea/.idea.Ombi/.idea/workspace.xml
index d008ba9a7..30951a63b 100644
--- a/src/.idea/.idea.Ombi/.idea/workspace.xml
+++ b/src/.idea/.idea.Ombi/.idea/workspace.xml
@@ -1,20 +1,25 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
@@ -232,75 +237,27 @@
- {
- "lastFilter": {
- "state": "OPEN",
- "assignee": "tidusjar"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
- {
- "selectedUrlAndAccountId": {
- "url": "https://github.com/ombi-app/ombi",
- "accountId": "22dd09fe-fb9e-48a4-bfcc-3c152edf3f25"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -318,17 +275,12 @@
- {
- "customColor": "",
- "associatedIndex": 0
-}
-
@@ -391,26 +343,27 @@
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -423,7 +376,7 @@
-
+
@@ -438,7 +391,7 @@
-
+
@@ -453,7 +406,7 @@
-
+
@@ -468,7 +421,7 @@
-
+
@@ -483,11 +436,10 @@
-
+
-
@@ -496,9 +448,6 @@
1563957157468
-
-
-
@@ -544,11 +493,7 @@
-
-
-
-
-
+
@@ -560,7 +505,7 @@
file://$PROJECT_DIR$/Ombi/Controllers/V1/TokenController.cs
48
-
+
@@ -573,12 +518,12 @@
file://$PROJECT_DIR$/Ombi.Core/Engine/V2/MultiSearchEngine.cs
59
-
+
-
+
-
+
@@ -586,12 +531,12 @@
file://$PROJECT_DIR$/Ombi.Core/Engine/V2/MultiSearchEngine.cs
49
-
+
-
+
-
+
@@ -599,55 +544,16 @@
file://$PROJECT_DIR$/Ombi.Api.MusicBrainz/MusicBrainzApi.cs
30
-
+
-
+
-
+
-
- file://$PROJECT_DIR$/Ombi.Schedule/Jobs/Plex/PlexWatchlistImport.cs
- 110
-
-
-
-
-
-
-
-
-
-
-
- file://$PROJECT_DIR$/Ombi.Schedule/Jobs/Plex/PlexWatchlistImport.cs
- 77
-
-
-
-
-
-
-
-
-
-
-
- file://$PROJECT_DIR$/Ombi.Schedule/Jobs/Plex/PlexWatchlistImport.cs
- 100
-
-
-
-
-
-
-
-
-
-
diff --git a/src/.idea/.idea.Ombi/riderModule.iml b/src/.idea/.idea.Ombi/riderModule.iml
new file mode 100644
index 000000000..d716cec6d
--- /dev/null
+++ b/src/.idea/.idea.Ombi/riderModule.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.vscode/tasks.json b/src/.vscode/tasks.json
index ad83d25c8..ad868d2dc 100644
--- a/src/.vscode/tasks.json
+++ b/src/.vscode/tasks.json
@@ -1,31 +1,22 @@
{
- "version": "2.0.0",
+ "version": "0.1.0",
"command": "dotnet",
+ "isShellCommand": true,
"args": [],
"tasks": [
{
- "label": "build",
- "type": "shell",
- "command": "dotnet",
+ "taskName": "build",
"args": [
- "build",
"${workspaceRoot}/Ombi/Ombi.csproj"
],
- "problemMatcher": "$msCompile",
- "group": {
- "_id": "build",
- "isDefault": false
- }
+ "isBuildCommand": true,
+ "problemMatcher": "$msCompile"
},
{
- "label": "lint",
- "type": "shell",
+ "taskName": "lint",
"command": "npm",
- "args": [
- "run",
- "lint"
- ],
- "problemMatcher": []
+ "isShellCommand": true,
+ "args": ["run", "lint"]
}
]
}
\ No newline at end of file
diff --git a/src/Ombi.Api.Plex/IPlexApi.cs b/src/Ombi.Api.Plex/IPlexApi.cs
index be6a61c16..6632da875 100644
--- a/src/Ombi.Api.Plex/IPlexApi.cs
+++ b/src/Ombi.Api.Plex/IPlexApi.cs
@@ -29,6 +29,5 @@ namespace Ombi.Api.Plex
Task AddUser(string emailAddress, string serverId, string authToken, int[] libs);
Task GetWatchlist(string plexToken, CancellationToken cancellationToken);
Task GetWatchlistMetadata(string ratingKey, string plexToken, CancellationToken cancellationToken);
- Task Ping(string authToken, CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/Ombi.Api.Plex/Models/Friends/PlexFriends.cs b/src/Ombi.Api.Plex/Models/Friends/PlexFriends.cs
index c0442da03..1e597d916 100644
--- a/src/Ombi.Api.Plex/Models/Friends/PlexFriends.cs
+++ b/src/Ombi.Api.Plex/Models/Friends/PlexFriends.cs
@@ -22,18 +22,6 @@ namespace Ombi.Api.Plex.Models.Friends
///
[XmlAttribute(AttributeName = "home")]
public bool HomeUser { get; set; }
-
- [XmlElement(ElementName = "Server")]
- public PlexUserServer[] Server { get; set; }
- }
-
- public class PlexUserServer
- {
- [XmlAttribute(AttributeName = "id")]
- public string Id { get; set; }
-
- [XmlAttribute(AttributeName = "serverId")]
- public string ServerId { get; set; }
}
[XmlRoot(ElementName = "MediaContainer")]
diff --git a/src/Ombi.Api.Plex/PlexApi.cs b/src/Ombi.Api.Plex/PlexApi.cs
index 8babba05d..cc0d13aaa 100644
--- a/src/Ombi.Api.Plex/PlexApi.cs
+++ b/src/Ombi.Api.Plex/PlexApi.cs
@@ -68,7 +68,7 @@ namespace Ombi.Api.Plex
private const string FriendsUri = "https://plex.tv/api/users";
private const string GetAccountUri = "https://plex.tv/users/account.json";
private const string ServerUri = "https://plex.tv/pms/servers.xml";
- private const string WatchlistUri = "https://discover.provider.plex.tv/";
+ private const string WatchlistUri = "https://metadata.provider.plex.tv/";
///
/// Sign into the Plex API
@@ -320,30 +320,6 @@ namespace Ombi.Api.Plex
return result;
}
- ///
- /// Pings the Plex API to validate if a token is still valid
- ///
- /// The authentication token to validate
- /// Cancellation token
- /// True if the token is valid, false otherwise
- public async Task Ping(string authToken, CancellationToken cancellationToken = default)
- {
- try
- {
- var request = new Request("api/v2/ping", "https://plex.tv/", HttpMethod.Get);
- await AddHeaders(request, authToken);
-
- // We don't need to parse the response, just check if the request succeeds
- await Api.Request(request, cancellationToken);
- return true;
- }
- catch
- {
- // If the request fails (401, 403, etc.), the token is invalid
- return false;
- }
- }
-
///
/// Adds the required headers and also the authorization header
diff --git a/src/Ombi.Core.Tests/Engine/MovieRequestLimitsTests.cs b/src/Ombi.Core.Tests/Engine/MovieRequestLimitsTests.cs
index 538aca7a4..5bb4c69cb 100644
--- a/src/Ombi.Core.Tests/Engine/MovieRequestLimitsTests.cs
+++ b/src/Ombi.Core.Tests/Engine/MovieRequestLimitsTests.cs
@@ -300,13 +300,13 @@ namespace Ombi.Core.Tests.Engine
{
UserId = "id1",
RequestType = RequestType.Movie,
- RequestDate = today.AddMinutes(-1),
+ RequestDate = today.AddHours(-1),
},
new RequestLog
{
UserId = "id1",
RequestType = RequestType.Movie,
- RequestDate = today.AddMinutes(-2),
+ RequestDate = today.AddHours(-2),
},
};
var repoMock = _mocker.GetMock>();
diff --git a/src/Ombi.Core.Tests/Engine/MusicRequestLimitTests.cs b/src/Ombi.Core.Tests/Engine/MusicRequestLimitTests.cs
index 544a76a55..477ab7502 100644
--- a/src/Ombi.Core.Tests/Engine/MusicRequestLimitTests.cs
+++ b/src/Ombi.Core.Tests/Engine/MusicRequestLimitTests.cs
@@ -298,13 +298,13 @@ namespace Ombi.Core.Tests.Engine
{
UserId = "id1",
RequestType = RequestType.Album,
- RequestDate = today.AddMinutes(-1),
+ RequestDate = today.AddHours(-1),
},
new RequestLog
{
UserId = "id1",
RequestType = RequestType.Album,
- RequestDate = today.AddMinutes(-2),
+ RequestDate = today.AddHours(-2),
},
};
var repoMock = _mocker.GetMock>();
diff --git a/src/Ombi.Core.Tests/Engine/TvRequestLimitsTests.cs b/src/Ombi.Core.Tests/Engine/TvRequestLimitsTests.cs
index 5cfd322f4..201251960 100644
--- a/src/Ombi.Core.Tests/Engine/TvRequestLimitsTests.cs
+++ b/src/Ombi.Core.Tests/Engine/TvRequestLimitsTests.cs
@@ -304,7 +304,7 @@ namespace Ombi.Core.Tests.Engine
{
UserId = "id1",
RequestType = RequestType.TvShow,
- RequestDate = today.AddMinutes(-1),
+ RequestDate = today.AddHours(-1),
EpisodeCount = 1,
},
new RequestLog
@@ -312,7 +312,7 @@ namespace Ombi.Core.Tests.Engine
UserId = "id1",
RequestType = RequestType.TvShow,
EpisodeCount = 1,
- RequestDate = today.AddMinutes(-2),
+ RequestDate = today.AddHours(-2),
},
};
var repoMock = _mocker.GetMock>();
@@ -345,7 +345,7 @@ namespace Ombi.Core.Tests.Engine
{
UserId = "id1",
RequestType = RequestType.TvShow,
- RequestDate = today.AddMinutes(-1),
+ RequestDate = today.AddHours(-1),
EpisodeCount = 5,
},
new RequestLog
@@ -353,7 +353,7 @@ namespace Ombi.Core.Tests.Engine
UserId = "id1",
RequestType = RequestType.TvShow,
EpisodeCount = 4,
- RequestDate = today.AddMinutes(-2),
+ RequestDate = today.AddHours(-2),
},
};
var repoMock = _mocker.GetMock>();
diff --git a/src/Ombi.Core/Authentication/PlexTokenKeepAliveService.cs b/src/Ombi.Core/Authentication/PlexTokenKeepAliveService.cs
deleted file mode 100644
index d29da4a5a..000000000
--- a/src/Ombi.Core/Authentication/PlexTokenKeepAliveService.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.Extensions.Logging;
-using Ombi.Api.Plex;
-
-namespace Ombi.Core.Authentication
-{
- public interface IPlexTokenKeepAliveService
- {
- Task KeepTokenAliveAsync(string token, CancellationToken cancellationToken);
- }
-
- public class PlexTokenKeepAliveService : IPlexTokenKeepAliveService
- {
- private readonly IPlexApi _plexApi;
- private readonly ILogger _logger;
-
- public PlexTokenKeepAliveService(IPlexApi plexApi, ILogger logger)
- {
- _plexApi = plexApi;
- _logger = logger;
- }
-
- public async Task KeepTokenAliveAsync(string token, CancellationToken cancellationToken)
- {
- try
- {
- if (string.IsNullOrEmpty(token))
- {
- _logger.LogWarning("Token is null or empty");
- return false;
- }
-
- // Use the Ping method to validate the token
- var isValid = await _plexApi.Ping(token, cancellationToken);
-
- if (!isValid)
- {
- _logger.LogWarning("Token validation failed - token may be expired or invalid");
- }
-
- return isValid;
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, "Error occurred while keeping token alive");
- return false;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/Ombi.Core/Engine/MovieRequestEngine.cs b/src/Ombi.Core/Engine/MovieRequestEngine.cs
index 82a6bce21..4d3cd2cf9 100644
--- a/src/Ombi.Core/Engine/MovieRequestEngine.cs
+++ b/src/Ombi.Core/Engine/MovieRequestEngine.cs
@@ -598,13 +598,13 @@ namespace Ombi.Core.Engine
public async Task ApproveMovieById(int requestId, bool is4K)
{
- var request = await MovieRepository.GetWithUser().FirstOrDefaultAsync(x => x.Id == requestId);
+ var request = await MovieRepository.Find(requestId);
return await ApproveMovie(request, is4K);
}
public async Task DenyMovieById(int modelId, string denyReason, bool is4K)
{
- var request = await MovieRepository.GetWithUser().FirstOrDefaultAsync(x => x.Id == modelId);
+ var request = await MovieRepository.Find(modelId);
if (request == null)
{
return new RequestEngineResult
@@ -790,7 +790,7 @@ namespace Ombi.Core.Engine
public async Task ReProcessRequest(int requestId, bool is4K, CancellationToken cancellationToken)
{
- var request = await MovieRepository.GetWithUser().FirstOrDefaultAsync(x => x.Id == requestId);
+ var request = await MovieRepository.Find(requestId);
if (request == null)
{
return new RequestEngineResult
@@ -805,7 +805,7 @@ namespace Ombi.Core.Engine
public async Task MarkUnavailable(int modelId, bool is4K)
{
- var request = await MovieRepository.GetWithUser().FirstOrDefaultAsync(x => x.Id == modelId);
+ var request = await MovieRepository.Find(modelId);
if (request == null)
{
return new RequestEngineResult
@@ -834,7 +834,7 @@ namespace Ombi.Core.Engine
public async Task MarkAvailable(int modelId, bool is4K)
{
- var request = await MovieRepository.GetWithUser().FirstOrDefaultAsync(x => x.Id == modelId);
+ var request = await MovieRepository.Find(modelId);
if (request == null)
{
return new RequestEngineResult
diff --git a/src/Ombi.Core/Helpers/DatabaseConfigurationSetup.cs b/src/Ombi.Core/Helpers/DatabaseConfigurationSetup.cs
deleted file mode 100644
index 2f1933184..000000000
--- a/src/Ombi.Core/Helpers/DatabaseConfigurationSetup.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using System.Text;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Storage;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal;
-using Ombi.Core.Models;
-using Polly;
-using Pomelo.EntityFrameworkCore.MySql.Storage.Internal;
-
-namespace Ombi.Core.Helpers;
-
-public static class DatabaseConfigurationSetup
-{
- public static void ConfigurePostgres(DbContextOptionsBuilder options, PerDatabaseConfiguration config)
- {
- options.UseNpgsql(config.ConnectionString, b =>
- {
- b.EnableRetryOnFailure();
- }).ReplaceService();
- }
-
- public static void ConfigureMySql(DbContextOptionsBuilder options, PerDatabaseConfiguration config)
- {
- if (string.IsNullOrEmpty(config.ConnectionString))
- {
- throw new ArgumentNullException("ConnectionString for the MySql/Mariadb database is empty");
- }
-
- options.UseMySql(config.ConnectionString, GetServerVersion(config.ConnectionString), b =>
- {
- //b.CharSetBehavior(Pomelo.EntityFrameworkCore.MySql.Infrastructure.CharSetBehavior.NeverAppend); // ##ISSUE, link to migrations?
- b.EnableRetryOnFailure();
- });
- }
-
- private static ServerVersion GetServerVersion(string connectionString)
- {
- // Workaround Windows bug, that can lead to the following exception:
- //
- // MySqlConnector.MySqlException (0x80004005): SSL Authentication Error
- // ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
- // ---> System.ComponentModel.Win32Exception (0x8009030F): The message or signature supplied for verification has been altered
- //
- // See https://github.com/dotnet/runtime/issues/17005#issuecomment-305848835
- //
- // Also workaround for the fact, that ServerVersion.AutoDetect() does not use any retrying strategy.
- ServerVersion serverVersion = null;
-#pragma warning disable EF1001
- var retryPolicy = Policy.Handle(exception => MySqlTransientExceptionDetector.ShouldRetryOn(exception))
-#pragma warning restore EF1001
- .WaitAndRetry(3, (count, context) => TimeSpan.FromMilliseconds(count * 250));
-
- serverVersion = retryPolicy.Execute(() => serverVersion = ServerVersion.AutoDetect(connectionString));
-
- return serverVersion;
- }
- public class NpgsqlCaseInsensitiveSqlGenerationHelper : NpgsqlSqlGenerationHelper
- {
- const string EFMigrationsHisory = "__EFMigrationsHistory";
- public NpgsqlCaseInsensitiveSqlGenerationHelper(RelationalSqlGenerationHelperDependencies dependencies)
- : base(dependencies) { }
- public override string DelimitIdentifier(string identifier) =>
- base.DelimitIdentifier(identifier == EFMigrationsHisory ? identifier : identifier.ToLower());
- public override void DelimitIdentifier(StringBuilder builder, string identifier)
- => base.DelimitIdentifier(builder, identifier == EFMigrationsHisory ? identifier : identifier.ToLower());
- }
-}
\ No newline at end of file
diff --git a/src/Ombi.Core/Helpers/FileSystem.cs b/src/Ombi.Core/Helpers/FileSystem.cs
deleted file mode 100644
index 97b9da0bf..000000000
--- a/src/Ombi.Core/Helpers/FileSystem.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Ombi.Core.Helpers;
-
-public class FileSystem : IFileSystem
-{
- public bool FileExists(string path)
- {
- return System.IO.File.Exists(path);
- }
- // Implement other file system operations as needed
-}
\ No newline at end of file
diff --git a/src/Ombi.Core/Helpers/IFileSystem.cs b/src/Ombi.Core/Helpers/IFileSystem.cs
deleted file mode 100644
index da2c9bba5..000000000
--- a/src/Ombi.Core/Helpers/IFileSystem.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Ombi.Core.Helpers;
-
-public interface IFileSystem
-{
- bool FileExists(string path);
- // Add other file system operations as needed
-}
\ No newline at end of file
diff --git a/src/Ombi.Core/Models/DatabaseConfiguration.cs b/src/Ombi.Core/Models/DatabaseConfiguration.cs
deleted file mode 100644
index 550800108..000000000
--- a/src/Ombi.Core/Models/DatabaseConfiguration.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.IO;
-
-namespace Ombi.Core.Models;
-
-public class DatabaseConfiguration
-{
- public const string SqliteDatabase = "Sqlite";
-
- public DatabaseConfiguration()
- {
-
- }
-
- public DatabaseConfiguration(string defaultSqlitePath)
- {
- OmbiDatabase = new PerDatabaseConfiguration(SqliteDatabase, $"Data Source={Path.Combine(defaultSqlitePath, "Ombi.db")}");
- SettingsDatabase = new PerDatabaseConfiguration(SqliteDatabase, $"Data Source={Path.Combine(defaultSqlitePath, "OmbiSettings.db")}");
- ExternalDatabase = new PerDatabaseConfiguration(SqliteDatabase, $"Data Source={Path.Combine(defaultSqlitePath, "OmbiExternal.db")}");
- }
- public PerDatabaseConfiguration OmbiDatabase { get; set; }
- public PerDatabaseConfiguration SettingsDatabase { get; set; }
- public PerDatabaseConfiguration ExternalDatabase { get; set; }
-}
-
-public class PerDatabaseConfiguration
-{
- public PerDatabaseConfiguration(string type, string connectionString)
- {
- Type = type;
- ConnectionString = connectionString;
- }
-
- // Used in Deserialization
- public PerDatabaseConfiguration()
- {
-
- }
- public string Type { get; set; }
- public string ConnectionString { get; set; }
-}
\ No newline at end of file
diff --git a/src/Ombi.Core/Senders/MovieSender.cs b/src/Ombi.Core/Senders/MovieSender.cs
index a7ae4a6e7..26da3465c 100644
--- a/src/Ombi.Core/Senders/MovieSender.cs
+++ b/src/Ombi.Core/Senders/MovieSender.cs
@@ -182,10 +182,7 @@ namespace Ombi.Core.Senders
if (settings.SendUserTags)
{
var userTag = await GetOrCreateTag(model, settings);
- if (userTag != null)
- {
- tags.Add(userTag.id);
- }
+ tags.Add(userTag.id);
}
// Overrides on the request take priority
@@ -201,9 +198,7 @@ namespace Ombi.Core.Senders
List movies;
// Check if the movie already exists? Since it could be unmonitored
- // Get the appropriate Radarr instance settings for existence check
- var existenceCheckSettings = is4k ? await _radarr4KSettings.GetSettingsAsync() : settings;
- movies = await _radarrV3Api.GetMovies(existenceCheckSettings.ApiKey, existenceCheckSettings.FullUri);
+ movies = await _radarrV3Api.GetMovies(settings.ApiKey, settings.FullUri);
var existingMovie = movies.FirstOrDefault(x => x.tmdbId == model.TheMovieDbId);
if (existingMovie == null)
@@ -251,12 +246,6 @@ namespace Ombi.Core.Senders
private async Task GetOrCreateTag(MovieRequests model, RadarrSettings s)
{
- if (model.RequestedUser == null)
- {
- _log.LogWarning("Cannot create tag - RequestedUser is null for movie request {MovieTitle}", model.Title);
- return null;
- }
-
var tagName = model.RequestedUser.UserName;
// Does tag exist?
diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs
index 1928ecea9..247ce8b6e 100644
--- a/src/Ombi.Core/Senders/TvSender.cs
+++ b/src/Ombi.Core/Senders/TvSender.cs
@@ -133,14 +133,7 @@ namespace Ombi.Core.Senders
string seriesType;
int? tagToUse = null;
- Logger.LogInformation("Starting SendToSonarr for series {Title} (TvDbId: {TvDbId})", model.ParentRequest.Title, model.ParentRequest.TvDbId);
- Logger.LogInformation("Series type: {SeriesType}", model.SeriesType);
-
var profiles = await UserQualityProfiles.GetAll().FirstOrDefaultAsync(x => x.UserId == model.RequestedUserId);
- if (profiles != null)
- {
- Logger.LogInformation("Found user quality profile for user {UserId}", model.RequestedUserId);
- }
if (model.SeriesType == SeriesType.Anime)
{
@@ -148,10 +141,8 @@ namespace Ombi.Core.Senders
// For some reason, if we haven't got one use the first root folder in Sonarr
if (!int.TryParse(s.RootPathAnime, out int animePath))
{
- Logger.LogWarning("Failed to parse RootPathAnime: {RootPathAnime}, falling back to main root path", s.RootPathAnime);
animePath = int.Parse(s.RootPath); // Set it to the main root folder if we have no anime folder.
}
- Logger.LogInformation("Using anime path ID: {AnimePath}", animePath);
rootFolderPath = await GetSonarrRootPath(animePath, s);
languageProfileId = s.LanguageProfileAnime > 0 ? s.LanguageProfileAnime : s.LanguageProfile;
@@ -163,7 +154,6 @@ namespace Ombi.Core.Senders
{
if (profiles.SonarrRootPathAnime > 0)
{
- Logger.LogInformation("Using user's anime root path override: {RootPath}", profiles.SonarrRootPathAnime);
rootFolderPath = await GetSonarrRootPath(profiles.SonarrRootPathAnime, s);
}
if (profiles.SonarrQualityProfileAnime > 0)
@@ -179,13 +169,11 @@ namespace Ombi.Core.Senders
int.TryParse(s.QualityProfile, out qualityToUse);
// Get the root path from the rootfolder selected.
// For some reason, if we haven't got one use the first root folder in Sonarr
- Logger.LogInformation("Using standard path ID: {RootPath}", s.RootPath);
rootFolderPath = await GetSonarrRootPath(int.Parse(s.RootPath), s);
if (profiles != null)
{
if (profiles.SonarrRootPath > 0)
{
- Logger.LogInformation("Using user's standard root path override: {RootPath}", profiles.SonarrRootPath);
rootFolderPath = await GetSonarrRootPath(profiles.SonarrRootPath, s);
}
if (profiles.SonarrQualityProfile > 0)
@@ -205,7 +193,6 @@ namespace Ombi.Core.Senders
if (model.ParentRequest.RootFolder.HasValue && model.ParentRequest.RootFolder.Value > 0)
{
- Logger.LogInformation("Using request root folder override: {RootFolder}", model.ParentRequest.RootFolder.Value);
rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder.Value, s);
}
@@ -214,8 +201,6 @@ namespace Ombi.Core.Senders
languageProfileId = model.ParentRequest.LanguageProfile.Value;
}
- Logger.LogInformation("Final root folder path: {RootFolderPath}", rootFolderPath);
-
try
{
if (tagToUse.HasValue)
@@ -535,36 +520,17 @@ namespace Ombi.Core.Senders
private async Task GetSonarrRootPath(int pathId, SonarrSettings sonarrSettings)
{
- Logger.LogInformation("Getting Sonarr root path for ID: {PathId}", pathId);
var rootFoldersResult = await SonarrApi.GetRootFolders(sonarrSettings.ApiKey, sonarrSettings.FullUri);
-
- if (rootFoldersResult == null || !rootFoldersResult.Any())
- {
- Logger.LogError("No root folders returned from Sonarr API");
- return string.Empty;
- }
-
- Logger.LogInformation("Found {Count} root folders in Sonarr", rootFoldersResult.Count());
- foreach (var folder in rootFoldersResult)
- {
- Logger.LogDebug("Root folder - ID: {Id}, Path: {Path}", folder.id, folder.path);
- }
if (pathId == 0)
{
- var defaultPath = rootFoldersResult.FirstOrDefault()?.path;
- Logger.LogInformation("Using first root folder as default: {Path}", defaultPath);
- return defaultPath;
+ return rootFoldersResult.FirstOrDefault().path;
}
- var matchingFolder = rootFoldersResult.FirstOrDefault(r => r.id == pathId);
- if (matchingFolder != null)
+ foreach (var r in rootFoldersResult?.Where(r => r.id == pathId))
{
- Logger.LogInformation("Found matching root folder for ID {PathId}: {Path}", pathId, matchingFolder.path);
- return matchingFolder.path;
+ return r.path;
}
-
- Logger.LogError("No matching root folder found for ID: {PathId}", pathId);
return string.Empty;
}
}
diff --git a/src/Ombi.Core/Services/DatabaseConfigurationService.cs b/src/Ombi.Core/Services/DatabaseConfigurationService.cs
deleted file mode 100644
index 750499b19..000000000
--- a/src/Ombi.Core/Services/DatabaseConfigurationService.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System;
-using System.IO;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.Extensions.Logging;
-using Newtonsoft.Json;
-using Ombi.Core.Helpers;
-using Ombi.Core.Models;
-using Ombi.Helpers;
-
-namespace Ombi.Core.Services;
-
-public class DatabaseConfigurationService : IDatabaseConfigurationService
-{
-
- private readonly ILogger _logger;
- private readonly IFileSystem _fileSystem;
-
- public DatabaseConfigurationService(
- ILogger logger,
- IFileSystem fileSystem)
- {
- _logger = logger;
- _fileSystem = fileSystem;
- }
-
- public async Task ConfigureDatabase(string databaseType, string connectionString, CancellationToken token)
- {
- var i = StartupSingleton.Instance;
- if (string.IsNullOrEmpty(i.StoragePath))
- {
- i.StoragePath = string.Empty;
- }
-
- var databaseFileLocation = Path.Combine(i.StoragePath, "database.json");
- if (_fileSystem.FileExists(databaseFileLocation))
- {
- var error = $"The database file at '{databaseFileLocation}' already exists";
- _logger.LogError(error);
- return false;
- }
-
- var configuration = new DatabaseConfiguration
- {
- ExternalDatabase = new PerDatabaseConfiguration(databaseType, connectionString),
- OmbiDatabase = new PerDatabaseConfiguration(databaseType, connectionString),
- SettingsDatabase = new PerDatabaseConfiguration(databaseType, connectionString)
- };
-
- var json = JsonConvert.SerializeObject(configuration, Formatting.Indented);
-
- _logger.LogInformation("Writing database configuration to file");
-
- try
- {
- await File.WriteAllTextAsync(databaseFileLocation, json, token);
- }
- catch (Exception e)
- {
- _logger.LogError(e, "Failed to write database configuration to file");
- return false;
- }
-
- _logger.LogInformation("Database configuration written to file");
-
-
- return true;
- }
-}
\ No newline at end of file
diff --git a/src/Ombi.Core/Services/IDatabaseConfigurationService.cs b/src/Ombi.Core/Services/IDatabaseConfigurationService.cs
deleted file mode 100644
index 3530bf913..000000000
--- a/src/Ombi.Core/Services/IDatabaseConfigurationService.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Ombi.Core.Services;
-
-public interface IDatabaseConfigurationService
-{
- const string MySqlDatabase = "MySQL";
- const string PostgresDatabase = "Postgres";
- Task ConfigureDatabase(string databaseType, string connectionString, CancellationToken token);
-}
\ No newline at end of file
diff --git a/src/Ombi.DependencyInjection/IocExtensions.cs b/src/Ombi.DependencyInjection/IocExtensions.cs
index 027717bbe..8a5509963 100644
--- a/src/Ombi.DependencyInjection/IocExtensions.cs
+++ b/src/Ombi.DependencyInjection/IocExtensions.cs
@@ -107,7 +107,6 @@ namespace Ombi.DependencyInjection
services.AddTransient();
services.AddTransient();
services.AddTransient();
- services.AddTransient();
services.AddTransient();
services.AddTransient();
services.AddTransient();
@@ -237,8 +236,6 @@ namespace Ombi.DependencyInjection
services.AddScoped();
services.AddTransient();
services.AddTransient();
- services.AddSingleton();
- services.AddSingleton();
}
public static void RegisterJobs(this IServiceCollection services)
diff --git a/src/Ombi.Helpers/NotificationType.cs b/src/Ombi.Helpers/NotificationType.cs
index 274813531..bd6bd6f87 100644
--- a/src/Ombi.Helpers/NotificationType.cs
+++ b/src/Ombi.Helpers/NotificationType.cs
@@ -14,7 +14,6 @@
IssueResolved = 9,
IssueComment = 10,
Newsletter = 11,
- PartiallyAvailable = 12,
- PlexWatchlistTokenExpired = 13
+ PartiallyAvailable = 12
}
}
diff --git a/src/Ombi.Notifications/Ombi.Notifications.csproj b/src/Ombi.Notifications/Ombi.Notifications.csproj
index 169599d3e..f022a838c 100644
--- a/src/Ombi.Notifications/Ombi.Notifications.csproj
+++ b/src/Ombi.Notifications/Ombi.Notifications.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/src/Ombi.Schedule.Tests/IssuesPurgeTests.cs b/src/Ombi.Schedule.Tests/IssuesPurgeTests.cs
index 8d37524e9..dbba08d21 100644
--- a/src/Ombi.Schedule.Tests/IssuesPurgeTests.cs
+++ b/src/Ombi.Schedule.Tests/IssuesPurgeTests.cs
@@ -91,12 +91,12 @@ namespace Ombi.Schedule.Tests
new Issues
{
Status = IssueStatus.Resolved,
- ResovledDate = DateTime.UtcNow.AddDays(-2)
+ ResovledDate = DateTime.Now.AddDays(-2)
},
new Issues
{
Status = IssueStatus.Resolved,
- ResovledDate = DateTime.UtcNow.AddDays(-4)
+ ResovledDate = DateTime.Now.AddDays(-4)
}
};
diff --git a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj
index 0ca27a075..97c999497 100644
--- a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj
+++ b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj
@@ -2,9 +2,6 @@
net8.0
-
- false
-
Debug;Release;NonUiBuild
@@ -16,7 +13,7 @@
-
+
diff --git a/src/Ombi.Schedule.Tests/PlexUserImporterTests.cs b/src/Ombi.Schedule.Tests/PlexUserImporterTests.cs
index f03d0e7e8..022190bd2 100644
--- a/src/Ombi.Schedule.Tests/PlexUserImporterTests.cs
+++ b/src/Ombi.Schedule.Tests/PlexUserImporterTests.cs
@@ -182,6 +182,8 @@ namespace Ombi.Schedule.Tests
_mocker.Verify(x => x.UpdateAsync(It.IsAny()), Times.Never);
}
+
+
[Test]
public async Task Import_Doesnt_Import_Banned_Users()
{
@@ -245,15 +247,7 @@ namespace Ombi.Schedule.Tests
Id = "id",
Title = "title",
Username = "username",
- HomeUser = true,
- Server = new PlexUserServer[]
- {
- new PlexUserServer
- {
- Id = "1",
- ServerId = "123"
- }
- }
+ HomeUser = true
}
}
});
@@ -263,6 +257,7 @@ namespace Ombi.Schedule.Tests
_mocker.Setup>(x => x.AddToRoleAsync(It.Is(x => x.UserName == "plex"), OmbiRoles.RequestMovie))
.ReturnsAsync(IdentityResult.Success);
+
await _subject.Execute(null);
_mocker.Verify(x => x.CreateAsync(It.IsAny()), Times.Once);
@@ -311,15 +306,7 @@ namespace Ombi.Schedule.Tests
{
Email = "email",
Id = "id",
- Username = "plex",
- Server = new PlexUserServer[]
- {
- new PlexUserServer
- {
- Id = "1",
- ServerId = "123"
- }
- }
+ Username = "plex"
}
}
});
@@ -344,9 +331,9 @@ namespace Ombi.Schedule.Tests
ImportPlexAdmin = false,
ImportPlexUsers = true,
DefaultRoles = new List
- {
- OmbiRoles.RequestMovie
- }
+ {
+ OmbiRoles.RequestMovie
+ }
});
_mocker.Setup>(x => x.GetUsers(It.IsAny())).ReturnsAsync(new PlexUsers
{
@@ -356,15 +343,7 @@ namespace Ombi.Schedule.Tests
{
Email = "email",
Id = "PLEX_ID",
- Username = "user",
- Server = new PlexUserServer[]
- {
- new PlexUserServer
- {
- Id = "1",
- ServerId = "123"
- }
- }
+ Username = "user"
}
}
});
@@ -461,98 +440,5 @@ namespace Ombi.Schedule.Tests
_mocker.Verify(x => x.DeleteUser(It.Is(x => x.ProviderUserId == "ADMIN_ID" && x.Email == "ADMIN@ADMIN.CO" && x.UserName == "Admin")), Times.Never);
}
-
- [Test]
- public async Task Import_Skips_Users_Without_Server_Access()
- {
- _mocker.Setup, Task>(x => x.GetSettingsAsync())
- .ReturnsAsync(new UserManagementSettings { ImportPlexAdmin = false, ImportPlexUsers = true });
- _mocker.Setup>(x => x.GetUsers(It.IsAny())).ReturnsAsync(new PlexUsers
- {
- User = new UserFriends[]
- {
- new UserFriends
- {
- Email = "email",
- Id = "NoServer",
- Title = "title",
- Username = "username",
- Server = null
- }
- }
- });
-
- await _subject.Execute(null);
-
- _mocker.Verify(x => x.CreateAsync(It.IsAny()), Times.Never);
- }
-
- [Test]
- public async Task Import_Skips_Users_With_Empty_Server_Array()
- {
- _mocker.Setup, Task>(x => x.GetSettingsAsync())
- .ReturnsAsync(new UserManagementSettings { ImportPlexAdmin = false, ImportPlexUsers = true });
- _mocker.Setup>(x => x.GetUsers(It.IsAny())).ReturnsAsync(new PlexUsers
- {
- User = new UserFriends[]
- {
- new UserFriends
- {
- Email = "email",
- Id = "EmptyServer",
- Title = "title",
- Username = "username",
- Server = new PlexUserServer[0]
- }
- }
- });
-
- await _subject.Execute(null);
-
- _mocker.Verify(x => x.CreateAsync(It.IsAny()), Times.Never);
- }
-
- [Test]
- public async Task Import_Creates_User_With_Server_Access()
- {
- _mocker.Setup, Task>(x => x.GetSettingsAsync())
- .ReturnsAsync(new UserManagementSettings { ImportPlexAdmin = false, ImportPlexUsers = true });
- _mocker.Setup>(x => x.GetUsers(It.IsAny())).ReturnsAsync(new PlexUsers
- {
- User = new UserFriends[]
- {
- new UserFriends
- {
- Email = "email",
- Id = "HasServer",
- Title = "title",
- Username = "username",
- Server = new PlexUserServer[]
- {
- new PlexUserServer
- {
- Id = "1",
- ServerId = "123"
- }
- }
- }
- }
- });
-
- _mocker.Setup>(x => x.CreateAsync(It.Is(x =>
- x.UserName == "username" &&
- x.Email == "email" &&
- x.ProviderUserId == "HasServer" &&
- x.UserType == UserType.PlexUser)))
- .ReturnsAsync(IdentityResult.Success);
-
- await _subject.Execute(null);
-
- _mocker.Verify(x => x.CreateAsync(It.Is(x =>
- x.UserName == "username" &&
- x.Email == "email" &&
- x.ProviderUserId == "HasServer" &&
- x.UserType == UserType.PlexUser)), Times.Once);
- }
}
}
diff --git a/src/Ombi.Schedule.Tests/PlexWatchlistImportTests.cs b/src/Ombi.Schedule.Tests/PlexWatchlistImportTests.cs
index 87a1d5e28..c1550e52c 100644
--- a/src/Ombi.Schedule.Tests/PlexWatchlistImportTests.cs
+++ b/src/Ombi.Schedule.Tests/PlexWatchlistImportTests.cs
@@ -20,11 +20,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using Ombi.Notifications.Models;
-using Ombi.Core.Notifications;
-using Ombi.Helpers;
-using Ombi.Core;
-using Ombi.Core.Authentication;
namespace Ombi.Schedule.Tests
{
@@ -40,15 +35,12 @@ namespace Ombi.Schedule.Tests
public void Setup()
{
_mocker = new AutoMocker();
- var um = MockHelper.MockUserManager(new List { new OmbiUser { Id = "abc", Email = "email@email.com", UserType = UserType.PlexUser, MediaServerToken = "token1", UserName = "abc", NormalizedUserName = "ABC" } });
+ var um = MockHelper.MockUserManager(new List { new OmbiUser { Id = "abc", UserType = UserType.PlexUser, MediaServerToken = "token1", UserName = "abc", NormalizedUserName = "ABC" } });
_mocker.Use(um);
_context = _mocker.GetMock();
_context.Setup(x => x.CancellationToken).Returns(CancellationToken.None);
- // Mock the keep-alive service to return true by default
- _mocker.Use(Mock.Of(s => s.KeepTokenAliveAsync(It.IsAny(), It.IsAny()) == Task.FromResult(true)));
_subject = _mocker.CreateInstance();
_mocker.Setup, IQueryable>(x => x.GetAll()).Returns(new List().AsQueryable().BuildMock());
- _mocker.Setup(x => x.Notify(It.IsAny()));
}
[Test]
@@ -690,6 +682,7 @@ namespace Ombi.Schedule.Tests
[Test]
public async Task MovieRequestFromWatchList_AlreadyImported()
{
+
_mocker.Setup, Task>(x => x.GetSettingsAsync()).ReturnsAsync(new PlexSettings { Enable = true, EnableWatchlistImport = true });
_mocker.Setup>(x => x.GetWatchlist(It.IsAny(), It.IsAny())).ReturnsAsync(new PlexWatchlistContainer
{
@@ -726,7 +719,7 @@ namespace Ombi.Schedule.Tests
}
});
- _mocker.Setup, IQueryable>(x => x.GetAll()).Returns(new List { new PlexWatchlistHistory { Id = 1, TmdbId = "123", UserId = "abc" } }.AsQueryable());
+ _mocker.Setup, IQueryable>(x => x.GetAll()).Returns(new List { new PlexWatchlistHistory { Id = 1, TmdbId = "123" } }.AsQueryable());
await _subject.Execute(_context.Object);
_mocker.Verify(x => x.RequestMovie(It.IsAny()), Times.Never);
_mocker.Verify(x => x.GetWatchlistMetadata("abc", It.IsAny(), It.IsAny()), Times.Once);
@@ -785,99 +778,5 @@ namespace Ombi.Schedule.Tests
_mocker.Verify>(x => x.GetAll(), Times.Once);
_mocker.Verify>(x => x.Add(It.IsAny()), Times.Once);
}
-
- [Test]
- public async Task AuthenticationError_NotificationsEnabled_WithEmail_SendsNotification()
- {
- _mocker.Setup, Task>(x => x.GetSettingsAsync())
- .ReturnsAsync(new PlexSettings { Enable = true, EnableWatchlistImport = true, NotifyOnWatchlistTokenExpiration = true });
- _mocker.Setup>(x => x.GetWatchlist(It.IsAny(), It.IsAny()))
- .ReturnsAsync(new PlexWatchlistContainer { AuthError = true });
-
- // Act
- await _subject.Execute(_context.Object);
-
- // Assert
- _mocker.Verify(x => x.Notify(It.Is(n =>
- n.NotificationType == NotificationType.PlexWatchlistTokenExpired &&
- n.Recipient == "email@email.com" &&
- n.Substitutes["UserName"] == "abc"
- )), Times.Once);
- }
-
- [Test]
- public async Task AuthenticationError_NotificationsDisabled_WithEmail_DoesNotSendNotification()
- {
- _mocker.Setup, Task>(x => x.GetSettingsAsync())
- .ReturnsAsync(new PlexSettings { Enable = true, EnableWatchlistImport = true, NotifyOnWatchlistTokenExpiration = false });
- _mocker.Setup>(x => x.GetWatchlist(It.IsAny(), It.IsAny()))
- .ReturnsAsync(new PlexWatchlistContainer { AuthError = true });
-
- // Act
- await _subject.Execute(_context.Object);
-
- // Assert
- _mocker.Verify(x => x.Notify(It.IsAny()), Times.Never);
- }
-
- [Test]
- public async Task AuthenticationError_NotificationsEnabled_NoEmail_DoesNotSendNotification()
- {
- // Arrange
- var user = new OmbiUser { Id = "abc", UserType = UserType.PlexUser, MediaServerToken = "token1", UserName = "abc", NormalizedUserName = "ABC" };
- var um = MockHelper.MockUserManager(new List { user });
- _mocker.Use(um);
-
- _mocker.Setup, Task>(x => x.GetSettingsAsync())
- .ReturnsAsync(new PlexSettings { Enable = true, EnableWatchlistImport = true, NotifyOnWatchlistTokenExpiration = true });
- _mocker.Setup>(x => x.GetWatchlist(It.IsAny(), It.IsAny()))
- .ReturnsAsync(new PlexWatchlistContainer { AuthError = true });
-
- _subject = _mocker.CreateInstance();
-
- // Act
- await _subject.Execute(_context.Object);
-
- // Assert
- _mocker.Verify(x => x.Notify(It.IsAny()), Times.Never);
- }
-
- [Test]
- public async Task SkipsUserIfTokenKeepAliveFails()
- {
- // Arrange: Set up the keep-alive service to return false (token invalid/expired)
- var keepAliveMock = new Mock();
- keepAliveMock.Setup(x => x.KeepTokenAliveAsync(It.IsAny(), It.IsAny())).ReturnsAsync(false);
- _mocker.Use(keepAliveMock.Object);
- _subject = _mocker.CreateInstance();
- _mocker.Setup, Task>(x => x.GetSettingsAsync()).ReturnsAsync(new PlexSettings { Enable = true, EnableWatchlistImport = true });
- // Act
- await _subject.Execute(_context.Object);
- // Assert: Should not attempt to import watchlist if keep-alive fails
- keepAliveMock.Verify(x => x.KeepTokenAliveAsync(It.IsAny(), It.IsAny()), Times.Once);
- _mocker.Verify(x => x.GetWatchlist(It.IsAny(), It.IsAny()), Times.Never);
- _mocker.Verify(x => x.Notify(It.IsAny()), Times.Never); // or Times.Once if notification is expected
- }
- [Test]
- public async Task CallsKeepAliveForEachPlexUser()
- {
- // Arrange: Multiple Plex users
- var users = new List
- {
- new OmbiUser { Id = "abc1", UserType = UserType.PlexUser, MediaServerToken = "abc1", UserName = "abc1", NormalizedUserName = "ABC1" },
- new OmbiUser { Id = "abc2", UserType = UserType.PlexUser, MediaServerToken = "abc2", UserName = "abc2", NormalizedUserName = "ABC2" },
- };
- var um = MockHelper.MockUserManager(users);
- _mocker.Use(um);
- var keepAliveMock = new Mock();
- keepAliveMock.Setup(x => x.KeepTokenAliveAsync(It.IsAny(), It.IsAny())).ReturnsAsync(true);
- _mocker.Use(keepAliveMock.Object);
- _subject = _mocker.CreateInstance();
- _mocker.Setup, Task>(x => x.GetSettingsAsync()).ReturnsAsync(new PlexSettings { Enable = true, EnableWatchlistImport = true });
- // Act
- await _subject.Execute(_context.Object);
- // Assert: KeepAlive should be called for each user
- keepAliveMock.Verify(x => x.KeepTokenAliveAsync(It.IsAny(), It.IsAny()), Times.Exactly(users.Count));
- }
}
}
diff --git a/src/Ombi.Schedule.Tests/Properties/launchSettings.json b/src/Ombi.Schedule.Tests/Properties/launchSettings.json
new file mode 100644
index 000000000..57de33708
--- /dev/null
+++ b/src/Ombi.Schedule.Tests/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:62604/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Ombi.Schedule.Tests": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:62605/"
+ }
+ }
+}
diff --git a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs
index adf6bddca..d7c05d71e 100644
--- a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs
+++ b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs
@@ -7,7 +7,6 @@ using Microsoft.Extensions.Logging;
using Ombi.Api.Emby;
using Ombi.Api.Jellyfin;
using Ombi.Api.Plex;
-using Ombi.Api.Plex.Models;
using Ombi.Api.TheMovieDb;
using Ombi.Api.TheMovieDb.Models;
using Ombi.Api.TvMaze;
@@ -287,18 +286,7 @@ namespace Ombi.Schedule.Jobs.Ombi
continue;
}
var servers = settings.Servers[0];
- PlexMetadata metaData = null;
-
- try
- {
- metaData = await _plexApi.GetMetadata(servers.PlexAuthToken, settings.Servers[0].FullUri, movie.Key);
- }
- catch (Exception e)
- {
- _log.LogError($"Could not find the metadata for title: '{movie.Title}', skipping");
- _log.LogDebug(e, $"Could not find the metadata for title: '{movie.Title}', skipping");
- continue;
- }
+ var metaData = await _plexApi.GetMetadata(servers.PlexAuthToken, settings.Servers[0].FullUri, movie.Key);
var guids = new List();
var meta = metaData.MediaContainer.Metadata.FirstOrDefault();
diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs
index 596a6202a..365110d9c 100644
--- a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs
+++ b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs
@@ -304,13 +304,6 @@ namespace Ombi.Schedule.Jobs.Plex
var existing = await Repo.GetFirstContentByCustom(x => x.Title == movie.title
&& x.ReleaseYear == movie.year.ToString()
&& x.Type == MediaType.Movie);
-
-
- if (existing == null)
- {
- // Let's just check the key
- existing = await Repo.GetByKey(movie.ratingKey);
- }
if (existing != null)
{
// We need to see if this is a different quality,
@@ -347,7 +340,13 @@ namespace Ombi.Schedule.Jobs.Plex
Logger.LogDebug($"We already have movie {movie.title}");
continue;
- }
+ }
+
+ //var hasSameKey = await Repo.GetByKey(movie.ratingKey);
+ //if (hasSameKey != null)
+ //{
+ // await Repo.Delete(hasSameKey);
+ //}
Logger.LogDebug("Adding movie {0}", movie.title);
var guids = new List();
diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs b/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs
index bf89e8fa0..6c90dd20f 100644
--- a/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs
+++ b/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs
@@ -120,13 +120,6 @@ namespace Ombi.Schedule.Jobs.Plex
foreach (var plexUser in users.User)
{
- // Skip users without server access
- if (plexUser.Server == null || !plexUser.Server.Any())
- {
- _log.LogInformation($"Skipping user {plexUser.Username ?? plexUser.Id} as they have no server access");
- continue;
- }
-
// Check if we should import this user
if (userManagementSettings.BannedPlexUserIds.Contains(plexUser.Id))
{
diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexWatchlistImport.cs b/src/Ombi.Schedule/Jobs/Plex/PlexWatchlistImport.cs
index 3de332879..85a926376 100644
--- a/src/Ombi.Schedule/Jobs/Plex/PlexWatchlistImport.cs
+++ b/src/Ombi.Schedule/Jobs/Plex/PlexWatchlistImport.cs
@@ -22,11 +22,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using Ombi.Notifications.Models;
-using Ombi.Core.Notifications;
-using Microsoft.AspNetCore.Identity;
-using Ombi.Store.Repository.Requests;
-using Ombi.Core;
namespace Ombi.Schedule.Jobs.Plex
{
@@ -42,13 +37,11 @@ namespace Ombi.Schedule.Jobs.Plex
private readonly IExternalRepository _watchlistRepo;
private readonly IRepository _userError;
private readonly IMovieDbApi _movieDbApi;
- private readonly INotificationHelper _notificationHelper;
- private readonly IPlexTokenKeepAliveService _tokenKeepAliveService;
public PlexWatchlistImport(IPlexApi plexApi, ISettingsService settings, OmbiUserManager ombiUserManager,
IMovieRequestEngine movieRequestEngine, ITvRequestEngine tvRequestEngine, INotificationHubService notificationHubService,
ILogger logger, IExternalRepository watchlistRepo, IRepository userError,
- IMovieDbApi movieDbApi, INotificationHelper notificationHelper, IPlexTokenKeepAliveService tokenKeepAliveService)
+ IMovieDbApi movieDbApi)
{
_plexApi = plexApi;
_settings = settings;
@@ -60,8 +53,6 @@ namespace Ombi.Schedule.Jobs.Plex
_watchlistRepo = watchlistRepo;
_userError = userError;
_movieDbApi = movieDbApi;
- _notificationHelper = notificationHelper;
- _tokenKeepAliveService = tokenKeepAliveService;
}
public async Task Execute(IJobExecutionContext context)
@@ -99,36 +90,6 @@ namespace Ombi.Schedule.Jobs.Plex
}
_logger.LogDebug($"Starting Watchlist Import for {user.UserName} with token {user.MediaServerToken}");
-
- // Keep the token alive before attempting watchlist import
- var keepAliveSuccess = await _tokenKeepAliveService.KeepTokenAliveAsync(user.MediaServerToken, context?.CancellationToken ?? CancellationToken.None);
- if (!keepAliveSuccess)
- {
- _logger.LogWarning($"Token for user '{user.UserName}' is invalid or expired (keep-alive failed). Recording error and skipping.");
- await _userError.Add(new PlexWatchlistUserError
- {
- UserId = user.Id,
- MediaServerToken = user.MediaServerToken,
- });
-
- // Send notification to user about token expiration
- if (settings.NotifyOnWatchlistTokenExpiration && !string.IsNullOrEmpty(user.Email))
- {
- var notificationModel = new NotificationOptions
- {
- NotificationType = NotificationType.PlexWatchlistTokenExpired,
- Recipient = user.Email,
- DateTime = DateTime.Now,
- Substitutes = new Dictionary
- {
- { "UserName", user.UserName }
- }
- };
- await _notificationHelper.Notify(notificationModel);
- }
- continue;
- }
-
var watchlist = await _plexApi.GetWatchlist(user.MediaServerToken, context?.CancellationToken ?? CancellationToken.None);
if (watchlist?.AuthError ?? false)
{
@@ -138,22 +99,6 @@ namespace Ombi.Schedule.Jobs.Plex
UserId = user.Id,
MediaServerToken = user.MediaServerToken,
});
-
- // Send notification to user about token expiration
- if (settings.NotifyOnWatchlistTokenExpiration && !string.IsNullOrEmpty(user.Email))
- {
- var notificationModel = new NotificationOptions
- {
- NotificationType = NotificationType.PlexWatchlistTokenExpired,
- Recipient = user.Email,
- DateTime = DateTime.Now,
- Substitutes = new Dictionary
- {
- { "UserName", user.UserName }
- }
- };
- await _notificationHelper.Notify(notificationModel);
- }
continue;
}
if (watchlist == null || !(watchlist.MediaContainer?.Metadata?.Any() ?? false))
@@ -183,7 +128,7 @@ namespace Ombi.Schedule.Jobs.Plex
}
// Check to see if we have already imported this item
- var alreadyImported = _watchlistRepo.GetAll().Any(x => x.TmdbId == providerIds.TheMovieDb && x.UserId == user.Id);
+ var alreadyImported = _watchlistRepo.GetAll().Any(x => x.TmdbId == providerIds.TheMovieDb);
if (alreadyImported)
{
_logger.LogDebug($"{item.title} already imported via Plex WatchList, skipping");
@@ -257,14 +202,14 @@ namespace Ombi.Schedule.Jobs.Plex
if (response.ErrorCode == ErrorCode.AlreadyRequested)
{
_logger.LogDebug($"Movie already requested for user '{user.UserName}'");
- await AddToHistory(theMovieDbId, user.Id);
+ await AddToHistory(theMovieDbId);
return;
}
_logger.LogInformation($"Error adding title from PlexWatchlist for user '{user.UserName}'. Message: '{response.ErrorMessage}'");
}
else
{
- await AddToHistory(theMovieDbId, user.Id);
+ await AddToHistory(theMovieDbId);
_logger.LogInformation($"Added title from PlexWatchlist for user '{user.UserName}'. {response.Message}");
}
@@ -285,26 +230,24 @@ namespace Ombi.Schedule.Jobs.Plex
if (response.ErrorCode == ErrorCode.AlreadyRequested)
{
_logger.LogDebug($"Show already requested for user '{user.UserName}'");
- await AddToHistory(theMovieDbId, user.Id);
+ await AddToHistory(theMovieDbId);
return;
}
_logger.LogInformation($"Error adding title from PlexWatchlist for user '{user.UserName}'. Message: '{response.ErrorMessage}'");
}
else
{
- await AddToHistory(theMovieDbId, user.Id);
+ await AddToHistory(theMovieDbId);
_logger.LogInformation($"Added title from PlexWatchlist for user '{user.UserName}'. {response.Message}");
}
}
- private async Task AddToHistory(int theMovieDbId, string userId)
+ private async Task AddToHistory(int theMovieDbId)
{
// Add to the watchlist history
var history = new PlexWatchlistHistory
{
- TmdbId = theMovieDbId.ToString(),
- AddedAt = DateTime.UtcNow,
- UserId = userId
+ TmdbId = theMovieDbId.ToString()
};
await _watchlistRepo.Add(history);
}
diff --git a/src/Ombi.Settings/Settings/Models/External/PlexSettings.cs b/src/Ombi.Settings/Settings/Models/External/PlexSettings.cs
index 649f1d0c7..6edfe0351 100644
--- a/src/Ombi.Settings/Settings/Models/External/PlexSettings.cs
+++ b/src/Ombi.Settings/Settings/Models/External/PlexSettings.cs
@@ -9,7 +9,6 @@ namespace Ombi.Core.Settings.Models.External
public bool Enable { get; set; }
public bool EnableWatchlistImport { get; set; }
public bool MonitorAll { get; set; }
- public bool NotifyOnWatchlistTokenExpiration { get; set; }
///
/// This is the ClientId for OAuth
///
diff --git a/src/Ombi.Store/Context/OmbiContext.cs b/src/Ombi.Store/Context/OmbiContext.cs
index d3540965f..eea83a03d 100644
--- a/src/Ombi.Store/Context/OmbiContext.cs
+++ b/src/Ombi.Store/Context/OmbiContext.cs
@@ -217,16 +217,6 @@ namespace Ombi.Store.Context
Enabled = true,
};
break;
- case NotificationType.PlexWatchlistTokenExpired:
- notificationToAdd = new NotificationTemplates
- {
- NotificationType = notificationType,
- Message = "Hello {UserName}! Your Plex watchlist token has expired. Please re-authenticate with Ombi to continue using the watchlist feature.",
- Subject = "Plex Watchlist Token Expired",
- Agent = agent,
- Enabled = true,
- };
- break;
default:
throw new ArgumentOutOfRangeException();
}
diff --git a/src/Ombi.Store/Context/Postgres/ExternalPostgresContext.cs b/src/Ombi.Store/Context/Postgres/ExternalPostgresContext.cs
deleted file mode 100644
index 1b106604b..000000000
--- a/src/Ombi.Store/Context/Postgres/ExternalPostgresContext.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace Ombi.Store.Context.Postgres
-{
- public sealed class ExternalPostgresContext : ExternalContext
- {
- private static bool _created;
- public ExternalPostgresContext(DbContextOptions options) : base(options)
- {
- if (_created) return;
-
- _created = true;
- Database.Migrate();
- }
- }
-}
\ No newline at end of file
diff --git a/src/Ombi.Store/Context/Postgres/OmbiPostgresContext.cs b/src/Ombi.Store/Context/Postgres/OmbiPostgresContext.cs
deleted file mode 100644
index a2b44180f..000000000
--- a/src/Ombi.Store/Context/Postgres/OmbiPostgresContext.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace Ombi.Store.Context.Postgres
-{
- public sealed class OmbiPostgresContext : OmbiContext
- {
- private static bool _created;
-
- public OmbiPostgresContext(DbContextOptions options) : base(options)
- {
- if (_created) return;
- _created = true;
-
- Database.Migrate();
- }
-
- public override void Dispose()
- {
- base.Dispose();
- }
- }
-}
\ No newline at end of file
diff --git a/src/Ombi.Store/Context/Postgres/PostgresModuleInitializer.cs b/src/Ombi.Store/Context/Postgres/PostgresModuleInitializer.cs
deleted file mode 100644
index 8fdab7cf3..000000000
--- a/src/Ombi.Store/Context/Postgres/PostgresModuleInitializer.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-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);
- }
-}
\ No newline at end of file
diff --git a/src/Ombi.Store/Context/Postgres/SettingsPostgresContext.cs b/src/Ombi.Store/Context/Postgres/SettingsPostgresContext.cs
deleted file mode 100644
index d8f343e46..000000000
--- a/src/Ombi.Store/Context/Postgres/SettingsPostgresContext.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace Ombi.Store.Context.Postgres
-{
- public sealed class SettingsPostgresContext : SettingsContext
- {
- private static bool _created;
- public SettingsPostgresContext(DbContextOptions options) : base(options)
- {
- if (_created) return;
-
- _created = true;
- Database.Migrate();
- }
- }
-}
\ No newline at end of file
diff --git a/src/Ombi.Store/Entities/PlexWatchlistHistory.cs b/src/Ombi.Store/Entities/PlexWatchlistHistory.cs
index 992e8ed9e..e6aee29b4 100644
--- a/src/Ombi.Store/Entities/PlexWatchlistHistory.cs
+++ b/src/Ombi.Store/Entities/PlexWatchlistHistory.cs
@@ -1,5 +1,4 @@
-using System;
-using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations.Schema;
namespace Ombi.Store.Entities
{
@@ -7,7 +6,5 @@ namespace Ombi.Store.Entities
public class PlexWatchlistHistory : Entity
{
public string TmdbId { get; set; }
- public string UserId { get; set; }
- public DateTime AddedAt { get; set; }
}
}
diff --git a/src/Ombi.Store/Entities/Requests/MovieRequests.cs b/src/Ombi.Store/Entities/Requests/MovieRequests.cs
index dbcb63c69..3c3c75893 100644
--- a/src/Ombi.Store/Entities/Requests/MovieRequests.cs
+++ b/src/Ombi.Store/Entities/Requests/MovieRequests.cs
@@ -44,21 +44,6 @@ namespace Ombi.Store.Entities.Requests
public DateTime MarkedAsDenied4K { get; set; }
public string DeniedReason4K { get; set; }
- [NotMapped]
- public RequestCombination RequestCombination
- {
- get
- {
- if (Has4KRequest && RequestedDate != default)
- {
- return RequestCombination.Both;
- }
- if (Has4KRequest) { return RequestCombination.FourK; }
-
- return RequestCombination.Normal;
- }
- }
-
///
/// Only Use for setting the Language Code, Use the LanguageCode property for reading
diff --git a/src/Ombi.Store/Entities/Requests/RequestCombination.cs b/src/Ombi.Store/Entities/Requests/RequestCombination.cs
deleted file mode 100644
index 048d35c19..000000000
--- a/src/Ombi.Store/Entities/Requests/RequestCombination.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Ombi.Store.Entities.Requests
-{
- public enum RequestCombination
- {
- Normal,
- FourK,
- Both
- }
-}
diff --git a/src/Ombi.Store/Migration.md b/src/Ombi.Store/Migration.md
index ca8e65180..6225229a3 100644
--- a/src/Ombi.Store/Migration.md
+++ b/src/Ombi.Store/Migration.md
@@ -27,48 +27,3 @@ If running migrations for any db provider other than Sqlite, then ensure the dat
cd src/Ombi.Store
dotnet ef migrations add --context --startup-project ../Ombi/Ombi.csproj
```
-
-
- docker run -d \
- --name some-postgres \
- -e POSTGRES_PASSWORD=ombi \
- -e POSTGRES_USER=ombi \
- -e POSTGRES_DB=ombi \
- postgres
-
-### MySql example
-```
-{
- "OmbiDatabase": {
- "Type": "MySQL",
- "ConnectionString": "Server=192.168.68.118;Port=3306;Database=ombiNew;User=ombi"
- },
- "SettingsDatabase": {
- "Type": "MySQL",
- "ConnectionString": "Server=192.168.68.118;Port=3306;Database=ombiNew;User=ombi"
- },
- "ExternalDatabase": {
- "Type": "MySQL",
- "ConnectionString": "Server=192.168.68.118;Port=3306;Database=ombiNew;User=ombi"
- }
-}
-```
-
-
-### Postgres Example
-```
-{
- "OmbiDatabase": {
- "Type": "Postgres",
- "ConnectionString": "Host=localhost;Port=5432;Database=ombi;Username=ombi;Password=ombi"
- },
- "SettingsDatabase": {
- "Type": "Postgres",
- "ConnectionString": "Host=localhost;Port=5432;Database=ombi;Username=ombi;Password=ombi"
- },
- "ExternalDatabase": {
- "Type": "Postgres",
- "ConnectionString": "Host=localhost;Port=5432;Database=ombi;Username=ombi;Password=ombi"
- }
-}
-```
\ No newline at end of file
diff --git a/src/Ombi.Store/MigrationHelper.cs b/src/Ombi.Store/MigrationHelper.cs
index 88136d4c1..58b6d6b68 100644
--- a/src/Ombi.Store/MigrationHelper.cs
+++ b/src/Ombi.Store/MigrationHelper.cs
@@ -20,13 +20,5 @@ 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}');");
- }
}
}
diff --git a/src/Ombi.Store/Migrations/ExternalMySql/20240909082427_WatchListUserId.Designer.cs b/src/Ombi.Store/Migrations/ExternalMySql/20240909082427_WatchListUserId.Designer.cs
deleted file mode 100644
index 1856d03e2..000000000
--- a/src/Ombi.Store/Migrations/ExternalMySql/20240909082427_WatchListUserId.Designer.cs
+++ /dev/null
@@ -1,635 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Ombi.Store.Context.MySql;
-
-#nullable disable
-
-namespace Ombi.Store.Migrations.ExternalMySql
-{
- [DbContext(typeof(ExternalMySqlContext))]
- [Migration("20240909082427_WatchListUserId")]
- partial class WatchListUserId
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.5")
- .HasAnnotation("Relational:MaxIdentifierLength", 64);
-
- MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
-
- modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("TheMovieDbId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("CouchPotatoCache");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("AddedAt")
- .HasColumnType("datetime(6)");
-
- b.Property("EmbyId")
- .IsRequired()
- .HasColumnType("varchar(255)");
-
- b.Property("Has4K")
- .HasColumnType("tinyint(1)");
-
- b.Property("ImdbId")
- .HasColumnType("longtext");
-
- b.Property("ProviderId")
- .HasColumnType("longtext");
-
- b.Property("Quality")
- .HasColumnType("longtext");
-
- b.Property("TheMovieDbId")
- .HasColumnType("longtext");
-
- b.Property("Title")
- .HasColumnType("longtext");
-
- b.Property("TvDbId")
- .HasColumnType("longtext");
-
- b.Property("Type")
- .HasColumnType("int");
-
- b.Property("Url")
- .HasColumnType("longtext");
-
- b.HasKey("Id");
-
- b.ToTable("EmbyContent");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("AddedAt")
- .HasColumnType("datetime(6)");
-
- b.Property("EmbyId")
- .HasColumnType("longtext");
-
- b.Property("EpisodeNumber")
- .HasColumnType("int");
-
- b.Property("ImdbId")
- .HasColumnType("longtext");
-
- b.Property("ParentId")
- .HasColumnType("varchar(255)");
-
- b.Property("ProviderId")
- .HasColumnType("longtext");
-
- b.Property("SeasonNumber")
- .HasColumnType("int");
-
- b.Property("TheMovieDbId")
- .HasColumnType("longtext");
-
- b.Property("Title")
- .HasColumnType("longtext");
-
- b.Property("TvDbId")
- .HasColumnType("longtext");
-
- b.HasKey("Id");
-
- b.HasIndex("ParentId");
-
- b.ToTable("EmbyEpisode");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("AddedAt")
- .HasColumnType("datetime(6)");
-
- b.Property("Has4K")
- .HasColumnType("tinyint(1)");
-
- b.Property("ImdbId")
- .HasColumnType("longtext");
-
- b.Property("JellyfinId")
- .IsRequired()
- .HasColumnType("varchar(255)");
-
- b.Property("ProviderId")
- .HasColumnType("longtext");
-
- b.Property("Quality")
- .HasColumnType("longtext");
-
- b.Property("TheMovieDbId")
- .HasColumnType("longtext");
-
- b.Property("Title")
- .HasColumnType("longtext");
-
- b.Property("TvDbId")
- .HasColumnType("longtext");
-
- b.Property("Type")
- .HasColumnType("int");
-
- b.Property("Url")
- .HasColumnType("longtext");
-
- b.HasKey("Id");
-
- b.ToTable("JellyfinContent");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("AddedAt")
- .HasColumnType("datetime(6)");
-
- b.Property("EpisodeNumber")
- .HasColumnType("int");
-
- b.Property("ImdbId")
- .HasColumnType("longtext");
-
- b.Property("JellyfinId")
- .HasColumnType("longtext");
-
- b.Property("ParentId")
- .HasColumnType("varchar(255)");
-
- b.Property("ProviderId")
- .HasColumnType("longtext");
-
- b.Property("SeasonNumber")
- .HasColumnType("int");
-
- b.Property("TheMovieDbId")
- .HasColumnType("longtext");
-
- b.Property("Title")
- .HasColumnType("longtext");
-
- b.Property("TvDbId")
- .HasColumnType("longtext");
-
- b.HasKey("Id");
-
- b.HasIndex("ParentId");
-
- b.ToTable("JellyfinEpisode");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.LidarrAlbumCache", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("AddedAt")
- .HasColumnType("datetime(6)");
-
- b.Property("ArtistId")
- .HasColumnType("int");
-
- b.Property("ForeignAlbumId")
- .HasColumnType("longtext");
-
- b.Property("Monitored")
- .HasColumnType("tinyint(1)");
-
- b.Property("PercentOfTracks")
- .HasColumnType("decimal(65,30)");
-
- b.Property("ReleaseDate")
- .HasColumnType("datetime(6)");
-
- b.Property("Title")
- .HasColumnType("longtext");
-
- b.Property("TrackCount")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("LidarrAlbumCache");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.LidarrArtistCache", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("ArtistId")
- .HasColumnType("int");
-
- b.Property("ArtistName")
- .HasColumnType("longtext");
-
- b.Property("ForeignArtistId")
- .HasColumnType("longtext");
-
- b.Property("Monitored")
- .HasColumnType("tinyint(1)");
-
- b.HasKey("Id");
-
- b.ToTable("LidarrArtistCache");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
-
- b.Property("EpisodeNumber")
- .HasColumnType("int");
-
- b.Property("GrandparentKey")
- .HasColumnType("varchar(255)");
-
- b.Property("Key")
- .HasColumnType("longtext");
-
- b.Property("ParentKey")
- .HasColumnType("longtext");
-
- b.Property("SeasonNumber")
- .HasColumnType("int");
-
- b.Property("Title")
- .HasColumnType("longtext");
-
- b.HasKey("Id");
-
- b.HasIndex("GrandparentKey");
-
- b.ToTable("PlexEpisode");
- });
-
- modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property