diff --git a/CHANGELOG.md b/CHANGELOG.md
index a04f84d86..863e0ccbc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,345 +1,375 @@
-## [4.35.11](https://github.com/Ombi-app/Ombi/compare/v4.35.10...v4.35.11) (2023-05-17)
+# [4.39.0](https://github.com/Ombi-app/Ombi/compare/v4.38.2...v4.39.0) (2023-05-17)
+### Bug Fixes
-## [4.35.10](https://github.com/Ombi-app/Ombi/compare/v4.22.5...v4.35.10) (2023-02-25)
+* **emby:** Fix Emby played sync running a full sync during recently added sync ([#4932](https://github.com/Ombi-app/Ombi/issues/4932)) ([9424586](https://github.com/Ombi-app/Ombi/commit/9424586e9c1b622b6475aeb8ee3cf4a8f346da6e))
+### Features
-## [4.22.5](https://github.com/Ombi-app/Ombi/compare/v4.16.12...v4.22.5) (2022-08-05)
+* Hide watched status when request is not available ([#4934](https://github.com/Ombi-app/Ombi/issues/4934)) ([82c7f1c](https://github.com/Ombi-app/Ombi/commit/82c7f1c44fd7c87d57cc2b0c34a10fcda7628f4e))
-## [4.16.12](https://github.com/Ombi-app/Ombi/compare/v4.16.11...v4.16.12) (2022-04-19)
+## [4.38.2](https://github.com/Ombi-app/Ombi/compare/v4.38.1...v4.38.2) (2023-05-17)
-## [4.16.11](https://github.com/Ombi-app/Ombi/compare/v4.16.10...v4.16.11) (2022-04-14)
+## [4.38.1](https://github.com/Ombi-app/Ombi/compare/v4.38.0...v4.38.1) (2023-05-09)
### Bug Fixes
-* Set the default job for the watchlist import to hourly instead of daily ([75906af](https://github.com/Ombi-app/Ombi/commit/75906af0adee3e3c68d825c3aaa8f7b918461b1f))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([0e8a64b](https://github.com/Ombi-app/Ombi/commit/0e8a64b8ca00d210fbe843ac2c3f6af218d80cbc))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([7b0ad61](https://github.com/Ombi-app/Ombi/commit/7b0ad61bfcff3986b33180dc64022cba7ea8eefb))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([4fc2c1f](https://github.com/Ombi-app/Ombi/commit/4fc2c1f24534085a783a3d5791f5533b68272153))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([76ab733](https://github.com/Ombi-app/Ombi/commit/76ab733b91791e4d93d184f3c7d0779c6a388695))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([06e4cef](https://github.com/Ombi-app/Ombi/commit/06e4cefa7b4e55b860da9a64f461f6ec8fa17367))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([c12d89d](https://github.com/Ombi-app/Ombi/commit/c12d89d6781a337520977ad285f8d08c93f434dd))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([bc0c2f6](https://github.com/Ombi-app/Ombi/commit/bc0c2f622e34fb5a2711039d9ed7aad34f982b15))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([e4b00e6](https://github.com/Ombi-app/Ombi/commit/e4b00e6b3468bd9389eeb02fc6ad7daf27abc3b3))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([d1998d3](https://github.com/Ombi-app/Ombi/commit/d1998d326f999a38586d0a351a20c5448df95842))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([bee4ccb](https://github.com/Ombi-app/Ombi/commit/bee4ccb804594e7385b1fbdc9fe2ef5c42e0d21f))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([80233ed](https://github.com/Ombi-app/Ombi/commit/80233ed560cc976e83570d0655c3472f20171fb3))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([8a78adc](https://github.com/Ombi-app/Ombi/commit/8a78adc9bb62f277f2b213dcb3847ed6d0089fcb))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([d04c60a](https://github.com/Ombi-app/Ombi/commit/d04c60aa5909b47ba6bffa6f66b03079cbd43521))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([92a785e](https://github.com/Ombi-app/Ombi/commit/92a785e736fa4b72a45270da2d0f4661df433078))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([634982d](https://github.com/Ombi-app/Ombi/commit/634982df2661cefab5ea9f5163fe04a005cc0171))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([b404baa](https://github.com/Ombi-app/Ombi/commit/b404baad6d0aeaa1561701e0db8db4e78613a364))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([d14f11e](https://github.com/Ombi-app/Ombi/commit/d14f11e0eb20ab0a68e765ee77968b3b3e54e995))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([7cf64f9](https://github.com/Ombi-app/Ombi/commit/7cf64f909d78908edaabeffb8a39a7d02e73fe7e))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([0c9e1ec](https://github.com/Ombi-app/Ombi/commit/0c9e1ec090827080cc8f7393e5e91456ff37d691))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([3b0b730](https://github.com/Ombi-app/Ombi/commit/3b0b730cb02efe24f6d4026e5fdb20d37e495119))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([6ed1a03](https://github.com/Ombi-app/Ombi/commit/6ed1a03b7ff4077f09ea9e13394b18b0d138f4c3))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([2941acd](https://github.com/Ombi-app/Ombi/commit/2941acd3b2ec74a5e6aeea275ab5a39d2653f37f))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([c075a1a](https://github.com/Ombi-app/Ombi/commit/c075a1a66784d975eaf60f2dfbbcbe048f2f63d7))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([76bd81c](https://github.com/Ombi-app/Ombi/commit/76bd81c3ca55a98c6ec944a838dc01294a6193a6))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([0d38275](https://github.com/Ombi-app/Ombi/commit/0d3827507e002bcf58f673e97ffcc3bd25dcf337))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([5c99601](https://github.com/Ombi-app/Ombi/commit/5c99601b07aec1a65d0186a4c4327440811e64c6))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([01546a0](https://github.com/Ombi-app/Ombi/commit/01546a0f7f86379528b486463246ef9bdfb9033e))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([d7fea78](https://github.com/Ombi-app/Ombi/commit/d7fea7843aaaab7ddff8dc31ca6d2a9117471dcc))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([1a6b95d](https://github.com/Ombi-app/Ombi/commit/1a6b95d45c220310213b8d811272a63f0f6ff42b))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([fa10174](https://github.com/Ombi-app/Ombi/commit/fa1017422c4efd4b0897871bd3c671151774d7c3))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([0c31e62](https://github.com/Ombi-app/Ombi/commit/0c31e628df376aac6d56ae67c7c705a9a4a7c080))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([6399643](https://github.com/Ombi-app/Ombi/commit/63996437a02fe10ffae6822ffa15369bec0a6b36))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([5826e2d](https://github.com/Ombi-app/Ombi/commit/5826e2d9a1c3f1210a87fa270dc0c81bac32944a))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([d434514](https://github.com/Ombi-app/Ombi/commit/d43451405be489254d7cdc7755d5f516a1e495a5))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([0b9596d](https://github.com/Ombi-app/Ombi/commit/0b9596d807178f5e071113ec0347868ec7f0960b))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([8c4c0b2](https://github.com/Ombi-app/Ombi/commit/8c4c0b262978c1303767af360d802c4b4c2b4d24))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([289ab77](https://github.com/Ombi-app/Ombi/commit/289ab77b0e04aae235b6f6cebc86e0a8d1f0cf2b))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([30e3417](https://github.com/Ombi-app/Ombi/commit/30e3417285a4eed18d429d7776f0e74096e834c0))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([6c0a5da](https://github.com/Ombi-app/Ombi/commit/6c0a5dadd4b8f37760252eb0fe7f88908f55506d))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([d5bf969](https://github.com/Ombi-app/Ombi/commit/d5bf9692ce1fc0ccfe7beca6dd200c78be177bdc))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([8a9e7ea](https://github.com/Ombi-app/Ombi/commit/8a9e7ea588aefbcd73ed82625887e3614e1703ea))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([01047a3](https://github.com/Ombi-app/Ombi/commit/01047a3fd67153f3ff16f860d2c7b50213e8d9b2))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([698a23f](https://github.com/Ombi-app/Ombi/commit/698a23fb83f323cdd1dd57cb49803079d44214a7))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([24eb842](https://github.com/Ombi-app/Ombi/commit/24eb842fc4424f7bcc3ec2949d7f5472492e96f6))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([ac8b16a](https://github.com/Ombi-app/Ombi/commit/ac8b16a3051ad71dbd54a8973c7dd847b564a515))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([f428ce6](https://github.com/Ombi-app/Ombi/commit/f428ce6a700c081437703839bc84d2f2b1138bcc))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([94b16df](https://github.com/Ombi-app/Ombi/commit/94b16dfe09bf1d2cd6286777d74eb5d4496abbbb))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([4881775](https://github.com/Ombi-app/Ombi/commit/4881775eda69a8f136ce0d8fbbf970e3d0406dc9))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([8297db9](https://github.com/Ombi-app/Ombi/commit/8297db91e85da308bde6fb09ad78347dee063630))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([d1152ab](https://github.com/Ombi-app/Ombi/commit/d1152ab7674243daa528c524c0cdc87d81ad49c9))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([eb2788b](https://github.com/Ombi-app/Ombi/commit/eb2788b761b55c487a59a049427ca08f6c10e836))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([21a794c](https://github.com/Ombi-app/Ombi/commit/21a794cbc0a5fa735ca0347c8f7f1ac04a487fbc))
-
-
-
-## [4.10.2](https://github.com/Ombi-app/Ombi/compare/v4.10.1...v4.10.2) (2022-01-22)
-
-
-
-## [4.16.10](https://github.com/Ombi-app/Ombi/compare/v4.16.9...v4.16.10) (2022-04-13)
-
-
-
-## [4.16.9](https://github.com/Ombi-app/Ombi/compare/v4.16.8...v4.16.9) (2022-04-13)
+* **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
-* **plex-watchlist:** Only request the latest season when importing from the watchlist ([77a47ff](https://github.com/Ombi-app/Ombi/commit/77a47ff157c6c5feafe3f2a29a3fcba8df4fdfef))
+* remove sort header ([969bc7b](https://github.com/Ombi-app/Ombi/commit/969bc7bb25ea900ab9199509b079b36843e5bd6f))
+### Features
-## [4.16.8](https://github.com/Ombi-app/Ombi/compare/v4.16.7...v4.16.8) (2022-04-13)
+* **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
-* **availability:** Fixed an issue where we wouldn't mark a available 4k movie as available (when 4K request feature is disabled) ([b492699](https://github.com/Ombi-app/Ombi/commit/b49269961d4830a530e3054976a47f519524948b))
+* Show the ApiAlias in the requests-list ([9ff624c](https://github.com/Ombi-app/Ombi/commit/9ff624ce4646815b239fbb8327117947f0a90e4b))
-## [4.16.7](https://github.com/Ombi-app/Ombi/compare/v4.16.6...v4.16.7) (2022-04-12)
+## [4.37.2](https://github.com/Ombi-app/Ombi/compare/v4.37.1...v4.37.2) (2023-05-03)
+### Bug Fixes
-## [4.16.6](https://github.com/Ombi-app/Ombi/compare/v4.16.5...v4.16.6) (2022-04-11)
+* **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.16.5](https://github.com/Ombi-app/Ombi/compare/v4.16.4...v4.16.5) (2022-04-08)
+## [4.37.1](https://github.com/Ombi-app/Ombi/compare/v4.37.0...v4.37.1) (2023-05-02)
### Bug Fixes
-* **watchlist:** actually fixed it this time... ([d962a32](https://github.com/Ombi-app/Ombi/commit/d962a3211eca29520662ddce962676e3aea17ec5))
+* 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.16.4](https://github.com/Ombi-app/Ombi/compare/v4.16.3...v4.16.4) (2022-04-08)
+# [4.37.0](https://github.com/Ombi-app/Ombi/compare/v4.36.1...v4.37.0) (2023-04-24)
+### Features
-## [4.16.3](https://github.com/Ombi-app/Ombi/compare/v4.16.2...v4.16.3) (2022-04-08)
+* 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
-* **plex-watchlist:** :bug: Fixed the issue where the watchlist didn't work for users logging in via OAuth ([6398f6a](https://github.com/Ombi-app/Ombi/commit/6398f6a4f7755281ebeac537e3ff623df5cfa0f3))
+* **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.16.2](https://github.com/Ombi-app/Ombi/compare/v4.16.1...v4.16.2) (2022-04-07)
+## [4.35.19](https://github.com/Ombi-app/Ombi/compare/v4.35.18...v4.35.19) (2023-04-20)
### Bug Fixes
-* **wizard:** Fixed an issue when using Plex OAuth it could fail setting up ([b743cf4](https://github.com/Ombi-app/Ombi/commit/b743cf4fafa7341ad1b163276f006d7ab0e9dcff))
+* **radarr:** Fixed an issue where the radarr sync would break ([de4baad](https://github.com/Ombi-app/Ombi/commit/de4baade9f87248d77106ff1a313a498870f4fb3))
-## [4.16.1](https://github.com/Ombi-app/Ombi/compare/v4.16.0...v4.16.1) (2022-04-07)
+## [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)
-# [4.16.0](https://github.com/Ombi-app/Ombi/compare/v4.15.6...v4.16.0) (2022-04-07)
+
+### 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.15.6](https://github.com/Ombi-app/Ombi/compare/v4.15.5...v4.15.6) (2022-04-07)
+## [4.35.16](https://github.com/Ombi-app/Ombi/compare/v4.35.15...v4.35.16) (2023-04-13)
### Bug Fixes
-* **radarr:** Fixed an issue where we couldn't sync radarr content [#4577](https://github.com/Ombi-app/Ombi/issues/4577) ([a5355a3](https://github.com/Ombi-app/Ombi/commit/a5355a3023e6900c4dd1b0da4722d7596c03907f))
+* Support duplicates in Emby/JF collections ([#4902](https://github.com/Ombi-app/Ombi/issues/4902)) ([141f96d](https://github.com/Ombi-app/Ombi/commit/141f96da5e45d5b3fa5f496806b102e473da6607))
+
+
+## [4.35.15](https://github.com/Ombi-app/Ombi/compare/v4.35.14...v4.35.15) (2023-04-06)
-## [4.15.5](https://github.com/Ombi-app/Ombi/compare/v4.15.4...v4.15.5) (2022-04-06)
+### Bug Fixes
+
+* **sonarr:** :bug: Stop the sonarr version endpoint from breaking when Sonarr is down [#4895](https://github.com/Ombi-app/Ombi/issues/4895) ([7bb8bec](https://github.com/Ombi-app/Ombi/commit/7bb8becfb140ef6012356752a71d53b5b404e482))
-## [4.15.4](https://github.com/Ombi-app/Ombi/compare/v4.15.3...v4.15.4) (2022-03-29)
+## [4.35.14](https://github.com/Ombi-app/Ombi/compare/v4.35.13...v4.35.14) (2023-04-06)
+### Bug Fixes
-## [4.15.3](https://github.com/Ombi-app/Ombi/compare/v4.15.2...v4.15.3) (2022-03-24)
+* Some minor tweaks to the movie info panel ([#4883](https://github.com/Ombi-app/Ombi/issues/4883)) ([1244487](https://github.com/Ombi-app/Ombi/commit/12444871df2f7602200f73971fce962f06b4a80b))
-## [4.15.2](https://github.com/Ombi-app/Ombi/compare/v4.15.1...v4.15.2) (2022-03-23)
+## [4.35.13](https://github.com/Ombi-app/Ombi/compare/v4.35.12...v4.35.13) (2023-03-28)
### Bug Fixes
-* **metadata:** improved the metadata job to also lookup the media in Plex to see if it has any more uptodate metadata ([83d1a15](https://github.com/Ombi-app/Ombi/commit/83d1a15cc9d0ee91be73bd91c4672cf1bcf2728a))
+* **sonarr:** :bug: Added some more error handling and information around testing sonarr ([bd2c2d3](https://github.com/Ombi-app/Ombi/commit/bd2c2d3901e239393010fd582b207f1571fb4b7e)), closes [#4877](https://github.com/Ombi-app/Ombi/issues/4877)
-## [4.15.1](https://github.com/Ombi-app/Ombi/compare/v4.15.0...v4.15.1) (2022-03-18)
+## [4.35.12](https://github.com/Ombi-app/Ombi/compare/v4.35.9...v4.35.12) (2023-03-25)
### Bug Fixes
-* **mediaserver:** fixed an issue where we were not detecting available content correctly [#4542](https://github.com/Ombi-app/Ombi/issues/4542) ([9cdd6f4](https://github.com/Ombi-app/Ombi/commit/9cdd6f41cdab8825a984905c089611409c53c753))
+* **sonarr:** :bug: Improved the error handling in the sonarr settings page in the UI ([fcd78fe](https://github.com/Ombi-app/Ombi/commit/fcd78fee619d10ec7d78e8c8ec6c3ac4b0a361a1)), closes [#4877](https://github.com/Ombi-app/Ombi/issues/4877)
+
+
+## [4.35.9](https://github.com/Ombi-app/Ombi/compare/v4.35.8...v4.35.9) (2023-02-24)
-# [4.15.0](https://github.com/Ombi-app/Ombi/compare/v4.14.4...v4.15.0) (2022-03-17)
+
+## [4.22.5](https://github.com/Ombi-app/Ombi/compare/v4.22.4...v4.22.5) (2022-08-05)
+
+
+
+## [4.35.8](https://github.com/Ombi-app/Ombi/compare/v4.35.7...v4.35.8) (2023-02-17)
### Bug Fixes
-* **jellyfin:** :bug: Fixed an issue where Jellyfin content was showing the Play on Emby button ([18b167d](https://github.com/Ombi-app/Ombi/commit/18b167d16a3d682b5060ee36dedbbb069bef09de)), closes [#4542](https://github.com/Ombi-app/Ombi/issues/4542)
+* **plex-oauth:** 🐛 Fixed an issue where using OAuth you could log in as a Ombi Local user [#4835](https://github.com/Ombi-app/Ombi/issues/4835) ([4098da3](https://github.com/Ombi-app/Ombi/commit/4098da305aaea9dae9a552644268a4fed7204cfe))
-## [4.14.4](https://github.com/Ombi-app/Ombi/compare/v4.14.3...v4.14.4) (2022-03-10)
+## [4.35.7](https://github.com/Ombi-app/Ombi/compare/v4.35.6...v4.35.7) (2023-02-10)
### Bug Fixes
-* :bug: Fixed the Request On Behalf autocomplete not filtering correctly ([a8ba2f3](https://github.com/Ombi-app/Ombi/commit/a8ba2f3544a1c01c57f217c4036a277ab0e67a09)), closes [#4539](https://github.com/Ombi-app/Ombi/issues/4539)
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([356c742](https://github.com/Ombi-app/Ombi/commit/356c7424e0ce8c1c5063b04bc6ed9b809f214d65))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([6fcaecf](https://github.com/Ombi-app/Ombi/commit/6fcaecf80b766f2d43ac7082d74364238e1638b7))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([132f4d4](https://github.com/Ombi-app/Ombi/commit/132f4d4e609b7fb7e37f38ee2f395926e2911abe))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([f292006](https://github.com/Ombi-app/Ombi/commit/f292006a08894a8d0ba899c8c6e9fe863e558dda))
+* **wizard:** :bug: Stop access to the wizard when you have already setup ombi ([#4866](https://github.com/Ombi-app/Ombi/issues/4866)) ([353de98](https://github.com/Ombi-app/Ombi/commit/353de981a462e1753288d225ec4644a44a62d2bc))
-## [4.14.3](https://github.com/Ombi-app/Ombi/compare/v4.14.2...v4.14.3) (2022-03-06)
+## [4.35.6](https://github.com/Ombi-app/Ombi/compare/v4.35.5...v4.35.6) (2023-01-31)
### Bug Fixes
-* **availability:** :bug: Fixed an issue where with 4k content, we could repeat notifications ([f9ebc1c](https://github.com/Ombi-app/Ombi/commit/f9ebc1cc2e13c7cd335121cd86295b10eda529ba))
+* Fixed the issue where the login page is still present after logging in with oauth ([aca4ee3](https://github.com/Ombi-app/Ombi/commit/aca4ee37915a28200e5233be3dc711ccc4a5aee9))
-## [4.14.2](https://github.com/Ombi-app/Ombi/compare/v4.14.1...v4.14.2) (2022-03-05)
+## [4.35.5](https://github.com/Ombi-app/Ombi/compare/v4.35.4...v4.35.5) (2023-01-24)
### Bug Fixes
-* **Sonarr:** :bug: Fixed an issue where some seasons were not being monitored correctly in sonarr ([60cfd41](https://github.com/Ombi-app/Ombi/commit/60cfd41f68e9006555c1a419dcff1aaa24b3e09f)), closes [#4506](https://github.com/Ombi-app/Ombi/issues/4506)
+* **radarr-settings:** 🐛 Fixed a typo ([4a50a00](https://github.com/Ombi-app/Ombi/commit/4a50a00d4729d99f4359874b9af4dbc58a0c220b))
-## [4.14.1](https://github.com/Ombi-app/Ombi/compare/v4.14.0...v4.14.1) (2022-03-03)
+## [4.35.4](https://github.com/Ombi-app/Ombi/compare/v4.35.3...v4.35.4) (2023-01-22)
+### Bug Fixes
-# [4.14.0](https://github.com/Ombi-app/Ombi/compare/v4.13.2...v4.14.0) (2022-03-02)
+* **discover:** :bug: Fixed the default poster not taking into account the base url in some scenarios [#4845](https://github.com/Ombi-app/Ombi/issues/4845) ([8eda250](https://github.com/Ombi-app/Ombi/commit/8eda250367953183daec03ccb5cdf9fe94275b27))
+* **Hide music from navbar and request list when not enabled:** :bug: ([5123a76](https://github.com/Ombi-app/Ombi/commit/5123a76954e9f81d58c05e31afc7a29aec19cb7a))
-## [4.13.2](https://github.com/Ombi-app/Ombi/compare/v4.13.1...v4.13.2) (2022-03-01)
+## [4.35.3](https://github.com/Ombi-app/Ombi/compare/v4.35.2...v4.35.3) (2023-01-13)
### Bug Fixes
-* **requests:** :bug: Fixed an issue where you couldn't approve movies from the request list ([1611ef9](https://github.com/Ombi-app/Ombi/commit/1611ef9198befbb7a4db50a4f0953e50f29a788f))
+* **#4847:** Invalid Discord request fixed, also fixed an issue where App Only users would not show as logged in on the user management page ([#4848](https://github.com/Ombi-app/Ombi/issues/4848)) ([f229d88](https://github.com/Ombi-app/Ombi/commit/f229d88bd744bc5253b5d3db69ae5ef22d014230))
-## [4.13.1](https://github.com/Ombi-app/Ombi/compare/v4.13.0...v4.13.1) (2022-03-01)
+## [4.35.2](https://github.com/Ombi-app/Ombi/compare/v4.35.1...v4.35.2) (2023-01-08)
### Bug Fixes
-* **details:** :bug: Fixed the missing Play on Media server button for 4k content [#4529](https://github.com/Ombi-app/Ombi/issues/4529) ([68600f3](https://github.com/Ombi-app/Ombi/commit/68600f3b45376e12dd2ef263d81ca4040c84cbca))
-* **discover:** :bug: Fixed the issue where there was an option on the discover to request 4k shows (that's not supported currently) ([dcfd688](https://github.com/Ombi-app/Ombi/commit/dcfd688c8d2337e55fa9c6c33b7c3e80fc560cda))
-* **requests:** :bug: Fixed the issue where we could no longer approve TV Requests from the requests list ([19fe4e3](https://github.com/Ombi-app/Ombi/commit/19fe4e342efe5578c26ab8ba7ee2f2e64bbc9418))
-* **translations:** 🌐 New translations from Crowdin [skip ci] ([#4526](https://github.com/Ombi-app/Ombi/issues/4526)) ([7e9f54f](https://github.com/Ombi-app/Ombi/commit/7e9f54fc80a09c938184e6be40ce5f49ce9673ef))
+* **database:** Just some tweaks, shouldn't notice any difference, maybe a less error in the log ([67fb992](https://github.com/Ombi-app/Ombi/commit/67fb9921c0c025025286eb6c0a9d09fd01b18465))
-# [4.13.0](https://github.com/Ombi-app/Ombi/compare/v4.12.7...v4.13.0) (2022-02-25)
+## [4.35.1](https://github.com/Ombi-app/Ombi/compare/v4.35.0...v4.35.1) (2023-01-06)
### Bug Fixes
-* **4k:** Hide 'Has 4K Request' column list if 4k feature is disabled ([#4521](https://github.com/Ombi-app/Ombi/issues/4521)) ([a9a6067](https://github.com/Ombi-app/Ombi/commit/a9a60678e74d22fa7ba34051a2645db86b600b4a))
-* **issues:** Fix label ID in chatbox page ([#4520](https://github.com/Ombi-app/Ombi/issues/4520)) ([76882ad](https://github.com/Ombi-app/Ombi/commit/76882adf231f92e1cdd396239933c13467c112b3))
-* **localisation:** Localize request types in notifications ([#4516](https://github.com/Ombi-app/Ombi/issues/4516)) ([e09435d](https://github.com/Ombi-app/Ombi/commit/e09435da455b12fc429f129372de31e0654da797))
-* **notifications:** Remove generic admin email in favour of admins' email ([#4519](https://github.com/Ombi-app/Ombi/issues/4519)) ([b90fc5f](https://github.com/Ombi-app/Ombi/commit/b90fc5fea771a83e6cf576c71a307066efd59ea4))
-* **tv:** Display TV show as requested if all episodes are requested ([#4518](https://github.com/Ombi-app/Ombi/issues/4518)) ([2ed8c48](https://github.com/Ombi-app/Ombi/commit/2ed8c48d128a69f0d144c5d332286dbf3b0bdf28))
+* **plex-watchlist:** Index out of bounds error ([8cd556e](https://github.com/Ombi-app/Ombi/commit/8cd556e268931596b9c1d1ae0ce533bfaaf330f4))
+
+
+
+# [4.35.0](https://github.com/Ombi-app/Ombi/compare/v4.34.1...v4.35.0) (2023-01-04)
### Features
-* **email-notifications:** Add a link to Ombi details page in email notifications ([#4517](https://github.com/Ombi-app/Ombi/issues/4517)) ([a3e97b3](https://github.com/Ombi-app/Ombi/commit/a3e97b31e2298d95e7deebd71268095b8ed5e9dc))
-* **media-details:** Add Trakt to social icons ([#4522](https://github.com/Ombi-app/Ombi/issues/4522)) ([d6ae79c](https://github.com/Ombi-app/Ombi/commit/d6ae79ce9eddbd5b7b888ab1b9f7e342d9d9ff9e))
+* Add the option for header authentication to create users ([#4841](https://github.com/Ombi-app/Ombi/issues/4841)) ([e6c9ce5](https://github.com/Ombi-app/Ombi/commit/e6c9ce5ad0056608ecda8273fb8124ed292e2942))
+
+
+
+## [4.34.1](https://github.com/Ombi-app/Ombi/compare/v4.34.0...v4.34.1) (2023-01-04)
+
+
+### Bug Fixes
+
+* **plex-watchlist:** Lookup the ID from different sources when Plex doesn't contain the metadata ([#4843](https://github.com/Ombi-app/Ombi/issues/4843)) ([a2cc23b](https://github.com/Ombi-app/Ombi/commit/a2cc23b351c4a568c44e6c855f94db9f71ad084a))
-## [4.12.7](https://github.com/Ombi-app/Ombi/compare/v4.12.6...v4.12.7) (2022-02-23)
+# [4.34.0](https://github.com/Ombi-app/Ombi/compare/v4.33.1...v4.34.0) (2023-01-04)
+### Features
+
+* Radarr tags ([#4815](https://github.com/Ombi-app/Ombi/issues/4815)) ([6fa5064](https://github.com/Ombi-app/Ombi/commit/6fa506491fe867cdeef9df79991ae49319d71c3d))
+
-## [4.12.6](https://github.com/Ombi-app/Ombi/compare/v4.12.5...v4.12.6) (2022-02-22)
+
+## [4.33.1](https://github.com/Ombi-app/Ombi/compare/v4.33.0...v4.33.1) (2022-12-22)
### Bug Fixes
-* **emby/jellyfin:** :bug: Fixed another issue where we were not correctly displaying the correct status' for movies ([5c0556e](https://github.com/Ombi-app/Ombi/commit/5c0556e6f44b8997a611f3a4d8e9e4e05d08bd13))
-* **mediaserver:** fixed some more issues in the media server sync and availability checks ([f3ea979](https://github.com/Ombi-app/Ombi/commit/f3ea979b8bd77842780ce8e6928b16237dd779cf))
+* **plex:** Added the watchlist request whole show back into the settings ([10701c4](https://github.com/Ombi-app/Ombi/commit/10701c4a0b6190eebb75c5d8b18224f3d0bc8502))
+
+
+
+# [4.33.0](https://github.com/Ombi-app/Ombi/compare/v4.32.3...v4.33.0) (2022-12-01)
+
+
+### Features
+
+* Angular 15 and Dependency upgrades ([#4818](https://github.com/Ombi-app/Ombi/issues/4818)) ([4816acf](https://github.com/Ombi-app/Ombi/commit/4816acf6f94443d23ebef6091d4cfcbca580f9ca))
-## [4.12.5](https://github.com/Ombi-app/Ombi/compare/v4.12.4...v4.12.5) (2022-02-21)
+## [4.32.3](https://github.com/Ombi-app/Ombi/compare/v4.32.2...v4.32.3) (2022-11-24)
### Bug Fixes
-* **emby:** :bug: Fixed the emby content sync [#4513](https://github.com/Ombi-app/Ombi/issues/4513) ([2927504](https://github.com/Ombi-app/Ombi/commit/2927504f0e0b4e7251e69b44e0e30c7ec9519980))
-* **emby:** :bug: Fixed the emby content sync [#4513](https://github.com/Ombi-app/Ombi/issues/4513) ([bd441cb](https://github.com/Ombi-app/Ombi/commit/bd441cb54fd77d6befb03fae321dc36c29f0de2e))
+* **sonarr:** V4 actually works this time around ([f62e70f](https://github.com/Ombi-app/Ombi/commit/f62e70fc493c7971da5e4508ce10522f5df0bbf7))
-## [4.12.4](https://github.com/Ombi-app/Ombi/compare/v4.12.3...v4.12.4) (2022-02-17)
+## [4.32.2](https://github.com/Ombi-app/Ombi/compare/v4.32.1...v4.32.2) (2022-11-23)
+### Bug Fixes
-## [4.12.3](https://github.com/Ombi-app/Ombi/compare/v4.12.2...v4.12.3) (2022-02-16)
+* **sonarr:** :bug: Sonarr V4 should work now ([#4810](https://github.com/Ombi-app/Ombi/issues/4810)) ([37655af](https://github.com/Ombi-app/Ombi/commit/37655aff9d3d133b42f5664bc9445d6571e966d6))
-## [4.12.2](https://github.com/Ombi-app/Ombi/compare/v4.12.1...v4.12.2) (2022-02-16)
+## [4.32.1](https://github.com/Ombi-app/Ombi/compare/v4.32.0...v4.32.1) (2022-11-21)
### Bug Fixes
-* **requests:** :bug: Fixed the approve 4k option on the requests list not working as expected ([c0189da](https://github.com/Ombi-app/Ombi/commit/c0189dad478ea375beda61ba3bee3f029a39b8e5))
+* **plex:** :bug: Fixed the issue where you couldn't add a new server on a fresh setup after the settings page rework ([187b18d](https://github.com/Ombi-app/Ombi/commit/187b18d5c01f6a13831e4a410b5d7c349e27d847))
-## [4.12.1](https://github.com/Ombi-app/Ombi/compare/v4.12.0...v4.12.1) (2022-02-16)
+# [4.32.0](https://github.com/Ombi-app/Ombi/compare/v4.31.0...v4.32.0) (2022-11-18)
### Bug Fixes
-* **requests:** :bug: Fixed the issue where Approving a 4K Request wouldn't send it to the correct 4K radarr instance ([87cb990](https://github.com/Ombi-app/Ombi/commit/87cb9903db30e1dead25ee8c5ea34305eb084a03)), closes [#4509](https://github.com/Ombi-app/Ombi/issues/4509)
+* **translations:** 🌐 New translations from Crowdin [skip ci] ([#4801](https://github.com/Ombi-app/Ombi/issues/4801)) ([4692003](https://github.com/Ombi-app/Ombi/commit/46920032baed04675b2ffbe1700afdc0740a4ac4))
+
+
+### Features
+
+* **plex:** Rework the Plex Settings page ([#4805](https://github.com/Ombi-app/Ombi/issues/4805)) ([1b8c47f](https://github.com/Ombi-app/Ombi/commit/1b8c47f3163f618851d4904732cb07015e1e93ff))
+
+
+
+# [4.31.0](https://github.com/Ombi-app/Ombi/compare/v4.30.0...v4.31.0) (2022-11-18)
+
+
+### Features
+
+* **sonarr:** Added the ability to add default tags when sending to Sonarr ([#4803](https://github.com/Ombi-app/Ombi/issues/4803)) ([ecfbb8e](https://github.com/Ombi-app/Ombi/commit/ecfbb8eda91e1a90239dcf8be847afcc2394a78e))
-# [4.12.0](https://github.com/Ombi-app/Ombi/compare/v4.11.8...v4.12.0) (2022-02-14)
+# [4.30.0](https://github.com/Ombi-app/Ombi/compare/v4.29.3...v4.30.0) (2022-11-17)
### Features
-* **radarr:** 4K Requests and Radarr 4K support ([ba88848](https://github.com/Ombi-app/Ombi/commit/ba88848866b0a9dedb1e79b55c4d81a0fd453843))
+* **sonarr:** :sparkles: Add the username to a Sonarr tag when sent to Sonarr ([#4802](https://github.com/Ombi-app/Ombi/issues/4802)) ([1d5fabd](https://github.com/Ombi-app/Ombi/commit/1d5fabd317e3ce8f6dd31f06d15dc81277f39dbd))
+
+
+
+## [4.29.3](https://github.com/Ombi-app/Ombi/compare/v4.29.2...v4.29.3) (2022-11-14)
+
+
+### Bug Fixes
+
+* **notifications:** Fixed the Partially TV notifications going to the admin [#4797](https://github.com/Ombi-app/Ombi/issues/4797) ([#4799](https://github.com/Ombi-app/Ombi/issues/4799)) ([bcb3e7f](https://github.com/Ombi-app/Ombi/commit/bcb3e7f00380a4c4278f59dc55febf43e6d05d47))
+* Only log error messages from Microsoft ([#4787](https://github.com/Ombi-app/Ombi/issues/4787)) ([c614e0c](https://github.com/Ombi-app/Ombi/commit/c614e0ca5fe5023cbe7ced326145273cd75be85d))
-## [4.11.8](https://github.com/Ombi-app/Ombi/compare/v4.11.7...v4.11.8) (2022-02-13)
+## [4.29.2](https://github.com/Ombi-app/Ombi/compare/v4.29.1...v4.29.2) (2022-10-24)
### Bug Fixes
-* **settings:** :bug: Fixed an issue where we were not displaying the excluded keyworks correctly in the TheMovieDbSettings page ([d3b3316](https://github.com/Ombi-app/Ombi/commit/d3b3316cbac18356b2f6b0912a3deb2c183e6534))
+* **plex:** Fixed an issue where sometimes the availability checker would throw an exception when checking episodes ([17ba202](https://github.com/Ombi-app/Ombi/commit/17ba2020ee0950c2c0e0e03fdb7835b579da75a9))
diff --git a/README.md b/README.md
index c42059e78..ec40a056f 100644
--- a/README.md
+++ b/README.md
@@ -85,13 +85,6 @@ Here are some of the features Ombi has:
Twan Ariens
-
-
-
-
- Drew
-
- |
@@ -112,15 +105,15 @@ Here are some of the features Ombi has:
Magikarp Lvl 4
- |
-
+
James Carty
- |
+
+
@@ -155,15 +148,15 @@ Here are some of the features Ombi has:
Joshua M. Boniface
- |
-
+
Bruvv
- |
+
+
@@ -198,15 +191,15 @@ Here are some of the features Ombi has:
Jim MacKenize
- |
-
+
Avi
- |
+
+
@@ -241,15 +234,15 @@ Here are some of the features Ombi has:
Francesco Servida
- |
-
+
Patrick Collins
- |
+
+
@@ -284,15 +277,15 @@ Here are some of the features Ombi has:
Aptalca
- |
-
+
Dr3amer
- |
+
+
@@ -307,6 +300,13 @@ Here are some of the features Ombi has:
Ombi-bot
|
+
+
+
+
+ Phildups7
+
+ |
@@ -415,6 +415,13 @@ Here are some of the features Ombi has:
|
+
+
+
+
+ Alexander Russell
+
+ |
@@ -449,15 +456,15 @@ Here are some of the features Ombi has:
Calvin
- |
+
+
Chris Lees
- |
-
+
@@ -492,15 +499,15 @@ Here are some of the features Ombi has:
David Torosyan
- |
+
+
Devin Buhl
- |
-
+
@@ -515,6 +522,13 @@ Here are some of the features Ombi has:
Fish2
|
+
+
+
+
+ Grygon
+
+ |
@@ -528,7 +542,8 @@ Here are some of the features Ombi has:
Haries Ramdhani
- |
+
+
@@ -542,8 +557,7 @@ Here are some of the features Ombi has:
Imgbot
- |
-
+
@@ -571,7 +585,8 @@ Here are some of the features Ombi has:
Joe Harvey
- |
+
+
@@ -585,8 +600,7 @@ Here are some of the features Ombi has:
Jono Cairns
- |
-
+
@@ -614,7 +628,8 @@ Here are some of the features Ombi has:
Lightkeeper
- |
+
+
@@ -628,8 +643,7 @@ Here are some of the features Ombi has:
Madeleine Schönemann
- |
-
+
@@ -657,7 +671,8 @@ Here are some of the features Ombi has:
Micky
- |
+
+
@@ -671,8 +686,7 @@ Here are some of the features Ombi has:
Nathan Miller
- |
-
+
@@ -700,7 +714,8 @@ Here are some of the features Ombi has:
Sean Callinan
- |
+
+
@@ -714,8 +729,7 @@ Here are some of the features Ombi has:
Teifun2
- |
-
+
@@ -743,7 +757,8 @@ Here are some of the features Ombi has:
Torkil
- |
+
+
@@ -757,8 +772,7 @@ Here are some of the features Ombi has:
Xirg
- |
-
+
@@ -786,7 +800,8 @@ Here are some of the features Ombi has:
Michael DiStaula
- |
+
+
@@ -800,8 +815,7 @@ Here are some of the features Ombi has:
Echel0n
- |
-
+
@@ -829,6 +843,14 @@ Here are some of the features Ombi has:
Mkgeeky
+ |
+
+
+
+
+
+ Ryan-c44
+
|
@@ -843,8 +865,7 @@ Here are some of the features Ombi has:
Tdorsey
- |
-
+
diff --git a/src/Ombi.Api.Emby/EmbyApi.cs b/src/Ombi.Api.Emby/EmbyApi.cs
index e9e5f0fca..d8691d984 100644
--- a/src/Ombi.Api.Emby/EmbyApi.cs
+++ b/src/Ombi.Api.Emby/EmbyApi.cs
@@ -248,5 +248,37 @@ namespace Ombi.Api.Emby
req.AddContentHeader("Content-Type", "application/json");
req.AddHeader("Device", "Ombi");
}
+
+ public async Task> GetMoviesPlayed(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri)
+ {
+ return await GetPlayed("Movie", apiKey, userId, baseUri, startIndex, count, parentIdFilder);
+ }
+
+ private async Task> GetPlayed(string type, string apiKey, string userId, string baseUri, int startIndex, int count, string parentIdFilder = default)
+ {
+ var request = new Request($"emby/items", baseUri, HttpMethod.Get);
+
+ request.AddQueryString("Recursive", true.ToString());
+ request.AddQueryString("IncludeItemTypes", type);
+ request.AddQueryString("Fields", "ProviderIds");
+ request.AddQueryString("UserId", userId);
+ request.AddQueryString("isPlayed", true.ToString());
+
+ // paginate and display recently played items first
+ request.AddQueryString("sortBy", "DatePlayed");
+ request.AddQueryString("SortOrder", "Descending");
+ request.AddQueryString("startIndex", startIndex.ToString());
+ request.AddQueryString("limit", count.ToString());
+
+ if (!string.IsNullOrEmpty(parentIdFilder))
+ {
+ request.AddQueryString("ParentId", parentIdFilder);
+ }
+
+ AddHeaders(request, apiKey);
+
+ var obj = await Api.Request>(request);
+ return obj;
+ }
}
}
diff --git a/src/Ombi.Api.Emby/IBaseEmbyApi.cs b/src/Ombi.Api.Emby/IBaseEmbyApi.cs
index 248c0a88f..582eac0c9 100644
--- a/src/Ombi.Api.Emby/IBaseEmbyApi.cs
+++ b/src/Ombi.Api.Emby/IBaseEmbyApi.cs
@@ -32,5 +32,7 @@ namespace Ombi.Api.Emby
Task> RecentlyAddedMovies(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri);
Task> RecentlyAddedEpisodes(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri);
Task> RecentlyAddedShows(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri);
+
+ Task> GetMoviesPlayed(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri);
}
}
\ No newline at end of file
diff --git a/src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs b/src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs
index e127f75f6..3e8f5407e 100644
--- a/src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs
+++ b/src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs
@@ -5,30 +5,8 @@ namespace Ombi.Api.Emby.Models.Movie
public class EmbyMovie
{
public string Name { get; set; }
- public string ServerId { get; set; }
public string Id { get; set; }
- public string Container { get; set; }
- public DateTime PremiereDate { get; set; }
- public object[] ProductionLocations { get; set; }
- public string OfficialRating { get; set; }
- public float CommunityRating { get; set; }
- public long RunTimeTicks { get; set; }
- public string PlayAccess { get; set; }
- public int ProductionYear { get; set; }
- public bool IsPlaceHolder { get; set; }
- public bool IsHD { get; set; }
- public bool IsFolder { get; set; }
public string Type { get; set; }
- public int LocalTrailerCount { get; set; }
- public EmbyUserdata UserData { get; set; }
- public string VideoType { get; set; }
- public EmbyImagetags ImageTags { get; set; }
- public string[] BackdropImageTags { get; set; }
- public string LocationType { get; set; }
- public string MediaType { get; set; }
- public bool HasSubtitles { get; set; }
- public int CriticRating { get; set; }
- public string Overview { get; set; }
public EmbyProviderids ProviderIds { get; set; }
public EmbyMediastream[] MediaStreams { get; set; }
}
diff --git a/src/Ombi.Api.Jellyfin/Models/Media/Movie/JellyfinMovie.cs b/src/Ombi.Api.Jellyfin/Models/Media/Movie/JellyfinMovie.cs
index a83e1f087..7368c194e 100644
--- a/src/Ombi.Api.Jellyfin/Models/Media/Movie/JellyfinMovie.cs
+++ b/src/Ombi.Api.Jellyfin/Models/Media/Movie/JellyfinMovie.cs
@@ -5,30 +5,8 @@ namespace Ombi.Api.Jellyfin.Models.Movie
public class JellyfinMovie
{
public string Name { get; set; }
- public string ServerId { get; set; }
public string Id { get; set; }
- public string Container { get; set; }
- public DateTime PremiereDate { get; set; }
- public object[] ProductionLocations { get; set; }
- public string OfficialRating { get; set; }
- public float CommunityRating { get; set; }
- public long RunTimeTicks { get; set; }
- public string PlayAccess { get; set; }
- public int ProductionYear { get; set; }
- public bool IsPlaceHolder { get; set; }
- public bool IsHD { get; set; }
- public bool IsFolder { get; set; }
public string Type { get; set; }
- public int LocalTrailerCount { get; set; }
- public JellyfinUserdata UserData { get; set; }
- public string VideoType { get; set; }
- public JellyfinImagetags ImageTags { get; set; }
- public string[] BackdropImageTags { get; set; }
- public string LocationType { get; set; }
- public string MediaType { get; set; }
- public bool HasSubtitles { get; set; }
- public int CriticRating { get; set; }
- public string Overview { get; set; }
public JellyfinProviderids ProviderIds { get; set; }
public JellyfinMediastream[] MediaStreams { get; set; }
}
diff --git a/src/Ombi.Api.Sonarr/Models/SystemStatus.cs b/src/Ombi.Api.Sonarr/Models/SystemStatus.cs
index 778570a4c..a78429328 100644
--- a/src/Ombi.Api.Sonarr/Models/SystemStatus.cs
+++ b/src/Ombi.Api.Sonarr/Models/SystemStatus.cs
@@ -3,23 +3,6 @@ namespace Ombi.Api.Sonarr
public class SystemStatus
{
public string version { get; set; }
- public string buildTime { get; set; }
- public bool isDebug { get; set; }
- public bool isProduction { get; set; }
- public bool isAdmin { get; set; }
- public bool isUserInteractive { get; set; }
- public string startupPath { get; set; }
- public string appData { get; set; }
- public string osVersion { get; set; }
- public bool isMonoRuntime { get; set; }
- public bool isMono { get; set; }
- public bool isLinux { get; set; }
- public bool isOsx { get; set; }
- public bool isWindows { get; set; }
- public string branch { get; set; }
- public string authentication { get; set; }
- public string sqliteVersion { get; set; }
public string urlBase { get; set; }
- public string runtimeVersion { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Ombi.Core.Tests/Engine/MovieRequestEngineTests.cs b/src/Ombi.Core.Tests/Engine/MovieRequestEngineTests.cs
index 8418cddbc..c55d76e8f 100644
--- a/src/Ombi.Core.Tests/Engine/MovieRequestEngineTests.cs
+++ b/src/Ombi.Core.Tests/Engine/MovieRequestEngineTests.cs
@@ -52,6 +52,7 @@ namespace Ombi.Core.Tests.Engine
_subject = _mocker.CreateInstance();
var list = DbHelper.GetQueryableMockDbSet(new RequestSubscription());
_mocker.Setup, IQueryable>(x => x.GetAll()).Returns(new List().AsQueryable().BuildMock());
+ _mocker.Setup>(x => x.GetAll()).Returns(new List().AsQueryable().BuildMock());
}
[Test]
diff --git a/src/Ombi.Core.Tests/Engine/V2/MovieRequestEngineTests.cs b/src/Ombi.Core.Tests/Engine/V2/MovieRequestEngineTests.cs
index 16b7cb811..c483d81ba 100644
--- a/src/Ombi.Core.Tests/Engine/V2/MovieRequestEngineTests.cs
+++ b/src/Ombi.Core.Tests/Engine/V2/MovieRequestEngineTests.cs
@@ -46,8 +46,9 @@ namespace Ombi.Core.Tests.Engine.V2
var requestSubs = new Mock>();
var mediaCache = new Mock();
var featureService = new Mock();
+ var userPlayedMovieRepository = new Mock();
_engine = new MovieRequestEngine(movieApi.Object, requestService.Object, user.Object, notificationHelper.Object, rules.Object, movieSender.Object,
- logger.Object, userManager.Object, requestLogRepo.Object, cache.Object, ombiSettings.Object, requestSubs.Object, mediaCache.Object, featureService.Object);
+ logger.Object, userManager.Object, requestLogRepo.Object, cache.Object, ombiSettings.Object, requestSubs.Object, mediaCache.Object, featureService.Object, userPlayedMovieRepository.Object);
}
[Test]
diff --git a/src/Ombi.Core.Tests/Services/RecentlyRequestedServiceTests.cs b/src/Ombi.Core.Tests/Services/RecentlyRequestedServiceTests.cs
index 7e1046ca5..dc748e0d9 100644
--- a/src/Ombi.Core.Tests/Services/RecentlyRequestedServiceTests.cs
+++ b/src/Ombi.Core.Tests/Services/RecentlyRequestedServiceTests.cs
@@ -173,6 +173,7 @@ namespace Ombi.Core.Tests.Services
[Test]
+ [Ignore("Flaky")]
public async Task GetRecentlyRequested_HideUsernames()
{
_mocker.Setup, Task>(x => x.GetSettingsAsync())
diff --git a/src/Ombi.Core/Engine/MovieRequestEngine.cs b/src/Ombi.Core/Engine/MovieRequestEngine.cs
index 109460ff9..4d3cd2cf9 100644
--- a/src/Ombi.Core/Engine/MovieRequestEngine.cs
+++ b/src/Ombi.Core/Engine/MovieRequestEngine.cs
@@ -33,7 +33,8 @@ namespace Ombi.Core.Engine
INotificationHelper helper, IRuleEvaluator r, IMovieSender sender, ILogger log,
OmbiUserManager manager, IRepository rl, ICacheService cache,
ISettingsService ombiSettings, IRepository sub, IMediaCacheService mediaCacheService,
- IFeatureService featureService)
+ IFeatureService featureService,
+ IUserPlayedMovieRepository userPlayedMovieRepository)
: base(user, requestService, r, manager, cache, ombiSettings, sub)
{
MovieApi = movieApi;
@@ -43,6 +44,7 @@ namespace Ombi.Core.Engine
_requestLog = rl;
_mediaCacheService = mediaCacheService;
_featureService = featureService;
+ _userPlayedMovieRepository = userPlayedMovieRepository;
}
private IMovieDbApi MovieApi { get; }
@@ -52,6 +54,7 @@ namespace Ombi.Core.Engine
private readonly IRepository _requestLog;
private readonly IMediaCacheService _mediaCacheService;
private readonly IFeatureService _featureService;
+ protected readonly IUserPlayedMovieRepository _userPlayedMovieRepository;
///
/// Requests the movie.
@@ -77,7 +80,8 @@ namespace Ombi.Core.Engine
var userDetails = await GetUser();
var canRequestOnBehalf = model.RequestOnBehalf.HasValue();
- var isAdmin = await UserManager.IsInRoleAsync(userDetails, OmbiRoles.PowerUser)
+ var isAdmin = Username.Equals("API", StringComparison.CurrentCultureIgnoreCase)
+ || await UserManager.IsInRoleAsync(userDetails, OmbiRoles.PowerUser)
|| await UserManager.IsInRoleAsync(userDetails, OmbiRoles.Admin);
if (canRequestOnBehalf && !isAdmin)
{
@@ -252,7 +256,7 @@ namespace Ombi.Core.Engine
var requests = await (OrderMovies(allRequests, orderFilter.OrderType)).Skip(position).Take(count)
.ToListAsync();
- await CheckForSubscription(shouldHide.UserId, requests);
+ await FillAdditionalFields(shouldHide, requests);
return new RequestsViewModel
{
Collection = requests,
@@ -296,7 +300,7 @@ namespace Ombi.Core.Engine
var total = requests.Count();
requests = requests.Skip(position).Take(count).ToList();
- await CheckForSubscription(shouldHide.UserId, requests);
+ await FillAdditionalFields(shouldHide, requests);
return new RequestsViewModel
{
Collection = requests,
@@ -381,7 +385,7 @@ namespace Ombi.Core.Engine
// TODO fix this so we execute this on the server
requests = requests.Skip(position).Take(count).ToList();
- await CheckForSubscription(shouldHide.UserId, requests);
+ await FillAdditionalFields(shouldHide, requests);
return new RequestsViewModel
{
Collection = requests,
@@ -424,7 +428,7 @@ namespace Ombi.Core.Engine
var total = requests.Count();
requests = requests.Skip(position).Take(count).ToList();
- await CheckForSubscription(shouldHide.UserId, requests);
+ await FillAdditionalFields(shouldHide, requests);
return new RequestsViewModel
{
Collection = requests,
@@ -506,18 +510,25 @@ namespace Ombi.Core.Engine
allRequests = await MovieRepository.GetWithUser().ToListAsync();
}
- await CheckForSubscription(shouldHide.UserId, allRequests);
+ await FillAdditionalFields(shouldHide, allRequests);
return allRequests;
}
public async Task GetRequest(int requestId)
{
+ var shouldHide = await HideFromOtherUsers();
+ // TODO: this query should return the request only if the user is allowed to see it (see shouldHide implementations)
var request = await MovieRepository.GetWithUser().Where(x => x.Id == requestId).FirstOrDefaultAsync();
- await CheckForSubscription((await GetUser()).Id, new List { request });
+ await FillAdditionalFields(shouldHide, new List { request });
return request;
}
+ private async Task FillAdditionalFields(HideResult shouldHide, List requests)
+ {
+ await CheckForSubscription(shouldHide.UserId, requests);
+ await CheckForPlayed(shouldHide, requests);
+ }
private async Task CheckForSubscription(string UserId, List movieRequests)
{
@@ -543,6 +554,23 @@ namespace Ombi.Core.Engine
}
}
}
+
+ private async Task CheckForPlayed(HideResult shouldHide, List movieRequests)
+ {
+ var theMovieDbIds = movieRequests.Select(x => x.TheMovieDbId);
+ var plays = await _userPlayedMovieRepository.GetAll().Where(x =>
+ theMovieDbIds.Contains(x.TheMovieDbId))
+ .ToListAsync();
+ foreach (var request in movieRequests)
+ {
+ request.WatchedByRequestedUser = plays.Exists(x => x.TheMovieDbId == request.TheMovieDbId && x.UserId == request.RequestedUserId);
+
+ if (!shouldHide.Hide)
+ {
+ request.PlayedByUsersCount = plays.Count(x => x.TheMovieDbId == request.TheMovieDbId);
+ }
+ }
+ }
///
/// Searches the movie request.
@@ -563,7 +591,7 @@ namespace Ombi.Core.Engine
}
var results = allRequests.Where(x => x.Title.Contains(search, CompareOptions.IgnoreCase)).ToList();
- await CheckForSubscription(shouldHide.UserId, results);
+ await FillAdditionalFields(shouldHide, results);
return results;
}
diff --git a/src/Ombi.Core/Engine/TvRequestEngine.cs b/src/Ombi.Core/Engine/TvRequestEngine.cs
index 8ccc6d17e..5ebce9586 100644
--- a/src/Ombi.Core/Engine/TvRequestEngine.cs
+++ b/src/Ombi.Core/Engine/TvRequestEngine.cs
@@ -161,7 +161,7 @@ namespace Ombi.Core.Engine
var user = await GetUser();
var canRequestOnBehalf = tv.RequestOnBehalf.HasValue();
- var isAdmin = await UserManager.IsInRoleAsync(user, OmbiRoles.PowerUser) || await UserManager.IsInRoleAsync(user, OmbiRoles.Admin);
+ var isAdmin = Username.Equals("API", StringComparison.CurrentCultureIgnoreCase) || await UserManager.IsInRoleAsync(user, OmbiRoles.PowerUser) || await UserManager.IsInRoleAsync(user, OmbiRoles.Admin);
if (tv.RequestOnBehalf.HasValue() && !isAdmin)
{
return new RequestEngineResult
diff --git a/src/Ombi.Core/Models/Requests/RecentlyRequestedModel.cs b/src/Ombi.Core/Models/Requests/RecentlyRequestedModel.cs
index 4296c2cc1..daab65e71 100644
--- a/src/Ombi.Core/Models/Requests/RecentlyRequestedModel.cs
+++ b/src/Ombi.Core/Models/Requests/RecentlyRequestedModel.cs
@@ -16,6 +16,7 @@ namespace Ombi.Core.Models.Requests
public string Overview { get; set; }
public DateTime ReleaseDate { get; set; }
public bool Approved { get; set; }
+ public bool Denied { get; set; }
public string MediaId { get; set; }
public string PosterPath { get; set; }
diff --git a/src/Ombi.Core/Models/TesterResultModel.cs b/src/Ombi.Core/Models/TesterResultModel.cs
index 563fa5cb2..945e0e261 100644
--- a/src/Ombi.Core/Models/TesterResultModel.cs
+++ b/src/Ombi.Core/Models/TesterResultModel.cs
@@ -5,5 +5,6 @@
public bool IsValid { get; set; }
public string Version { get; set; }
public string ExpectedSubDir { get; set; }
+ public string AdditionalInformation { get; set; }
}
}
diff --git a/src/Ombi.Core/Senders/MusicSender.cs b/src/Ombi.Core/Senders/MusicSender.cs
index 260b008fe..57bf4ab68 100644
--- a/src/Ombi.Core/Senders/MusicSender.cs
+++ b/src/Ombi.Core/Senders/MusicSender.cs
@@ -100,7 +100,7 @@ namespace Ombi.Core.Senders
addOptions = new Addoptions
{
monitored = true,
- monitor = MonitorTypes.None,
+ monitor = MonitorTypes.Existing,
searchForMissingAlbums = false,
AlbumsToMonitor = new[] {model.ForeignAlbumId}
},
@@ -199,4 +199,4 @@ namespace Ombi.Core.Senders
return new SenderResult { Message = "Could not set album to monitored", Sent = false, Success = false };
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Ombi.Core/Services/RecentlyRequestedService.cs b/src/Ombi.Core/Services/RecentlyRequestedService.cs
index 6628dd8b8..26d873c4d 100644
--- a/src/Ombi.Core/Services/RecentlyRequestedService.cs
+++ b/src/Ombi.Core/Services/RecentlyRequestedService.cs
@@ -88,6 +88,7 @@ namespace Ombi.Core.Services
Title = item.Title,
Type = RequestType.Movie,
Approved = item.Approved,
+ Denied = item.Denied ?? false,
UserId = item.RequestedUserId,
Username = item.RequestedUser.UserAlias,
MediaId = item.TheMovieDbId.ToString(),
@@ -108,6 +109,7 @@ namespace Ombi.Core.Services
Available = item.Available,
Overview = item.ArtistName,
Approved = item.Approved,
+ Denied = item.Denied ?? false,
ReleaseDate = item.ReleaseDate,
RequestDate = item.RequestedDate,
Title = item.Title,
@@ -135,6 +137,7 @@ namespace Ombi.Core.Services
Overview = item.ParentRequest.Overview,
ReleaseDate = item.ParentRequest.ReleaseDate,
Approved = item.Approved,
+ Denied = item.Denied ?? false,
RequestDate = item.RequestedDate,
TvPartiallyAvailable = partialAvailability,
Title = item.ParentRequest.Title,
diff --git a/src/Ombi.DependencyInjection/IocExtensions.cs b/src/Ombi.DependencyInjection/IocExtensions.cs
index 09d99d4b7..c9bcc13d3 100644
--- a/src/Ombi.DependencyInjection/IocExtensions.cs
+++ b/src/Ombi.DependencyInjection/IocExtensions.cs
@@ -197,6 +197,7 @@ namespace Ombi.DependencyInjection
services.AddScoped();
services.AddScoped();
services.AddScoped();
+ services.AddScoped();
services.AddScoped();
services.AddScoped();
@@ -244,6 +245,7 @@ namespace Ombi.DependencyInjection
services.AddTransient();
services.AddTransient();
services.AddTransient();
+ services.AddTransient();
services.AddTransient();
services.AddTransient();
services.AddTransient();
diff --git a/src/Ombi.HealthChecks/Checks/OmbiPingHealthCheck.cs b/src/Ombi.HealthChecks/Checks/OmbiPingHealthCheck.cs
deleted file mode 100644
index 726d02078..000000000
--- a/src/Ombi.HealthChecks/Checks/OmbiPingHealthCheck.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using HealthChecks.Network;
-using Microsoft.Extensions.Diagnostics.HealthChecks;
-using System;
-using System.Collections.Generic;
-using System.Net.NetworkInformation;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Ombi.HealthChecks.Checks
-{
- public class OmbiPingHealthCheck
- : IHealthCheck
- {
- private readonly OmbiPingHealthCheckOptions _options;
- public OmbiPingHealthCheck(OmbiPingHealthCheckOptions options)
- {
- _options = options ?? throw new ArgumentNullException(nameof(options));
- }
- public async Task CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
- {
- var configuredHosts = _options.ConfiguredHosts.Values;
-
- try
- {
- foreach (var (host, timeout, status) in configuredHosts)
- {
- using (var ping = new Ping())
- {
- var pingReply = await ping.SendPingAsync(host, timeout);
-
- if (pingReply.Status != IPStatus.Success)
- {
- return new HealthCheckResult(status, description: $"Ping check for host {host} is failed with status reply:{pingReply.Status}");
- }
- }
- }
-
- return HealthCheckResult.Healthy();
- }
- catch (Exception ex)
- {
- return new HealthCheckResult(context.Registration.FailureStatus, exception: ex);
- }
- }
- }
-}
diff --git a/src/Ombi.HealthChecks/Checks/OmbiPingHealthCheckOptions.cs b/src/Ombi.HealthChecks/Checks/OmbiPingHealthCheckOptions.cs
deleted file mode 100644
index f89c71a52..000000000
--- a/src/Ombi.HealthChecks/Checks/OmbiPingHealthCheckOptions.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Microsoft.Extensions.Diagnostics.HealthChecks;
-using System.Collections.Generic;
-
-namespace Ombi.HealthChecks.Checks
-{
- public class OmbiPingHealthCheckOptions
- {
- internal Dictionary ConfiguredHosts { get; } = new Dictionary();
-
- public OmbiPingHealthCheckOptions AddHost(string host, int timeout, HealthStatus status)
- {
- ConfiguredHosts.Add(host, (host, timeout, status));
- return this;
- }
- }
-}
diff --git a/src/Ombi.HealthChecks/Checks/PlexHealthCheck.cs b/src/Ombi.HealthChecks/Checks/PlexHealthCheck.cs
index 182c1b2f8..bc90c4756 100644
--- a/src/Ombi.HealthChecks/Checks/PlexHealthCheck.cs
+++ b/src/Ombi.HealthChecks/Checks/PlexHealthCheck.cs
@@ -27,7 +27,7 @@ namespace Ombi.HealthChecks.Checks
var settings = await settingsProvider.GetSettingsAsync();
if (settings == null)
{
- return HealthCheckResult.Healthy("Plex is not confiured.");
+ return HealthCheckResult.Healthy("Plex is not configured.");
}
var taskResult = new List>();
diff --git a/src/Ombi.HealthChecks/HealthCheckExtensions.cs b/src/Ombi.HealthChecks/HealthCheckExtensions.cs
index 2f80378ff..21b9d5dde 100644
--- a/src/Ombi.HealthChecks/HealthCheckExtensions.cs
+++ b/src/Ombi.HealthChecks/HealthCheckExtensions.cs
@@ -18,39 +18,8 @@ namespace Ombi.HealthChecks
builder.AddCheck("Radarr", tags: new string[] { "DVR" });
builder.AddCheck("CouchPotato", tags: new string[] { "DVR" });
builder.AddCheck("SickRage", tags: new string[] { "DVR" });
- builder.AddOmbiPingHealthCheck(options =>
- {
- options.AddHost("www.google.co.uk", 5000, HealthStatus.Unhealthy);
- options.AddHost("www.google.com", 3000, HealthStatus.Degraded);
- }, "External Ping", tags: new string[] { "System" });
return builder;
}
-
- ///
- /// Add a health check for network ping.
- ///
- /// The .
- /// The action to configure the ping parameters.
- /// The health check name. Optional. If null the type name 'ping' will be used for the name.
- ///
- /// The that should be reported when the health check fails. Optional. If null then
- /// the default status of will be reported.
- ///
- /// A list of tags that can be used to filter sets of health checks. Optional.
- /// An optional System.TimeSpan representing the timeout of the check.
- /// The .
- public static IHealthChecksBuilder AddOmbiPingHealthCheck(this IHealthChecksBuilder builder, Action setup, string name = default, HealthStatus? failureStatus = default, IEnumerable tags = default, TimeSpan? timeout = default)
- {
- var options = new OmbiPingHealthCheckOptions();
- setup?.Invoke(options);
-
- return builder.Add(new HealthCheckRegistration(
- name,
- sp => new OmbiPingHealthCheck(options),
- failureStatus,
- tags,
- timeout));
- }
}
}
diff --git a/src/Ombi.I18n/Resources/Texts.hu.resx b/src/Ombi.I18n/Resources/Texts.hu.resx
index 4e7cebcfd..bd9f1a19e 100644
--- a/src/Ombi.I18n/Resources/Texts.hu.resx
+++ b/src/Ombi.I18n/Resources/Texts.hu.resx
@@ -118,13 +118,13 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- New Albums
+ Új album
- New Movies
+ Új film
- New TV
+ Új sorozat
Műfaj:
@@ -139,18 +139,18 @@
Epizódok:
- Powered by
+ Biztosítja a(z)
- Unsubscribe
+ Leiratkozás
Album
- Movie
+ Film
- TV Show
+ Sorozat
\ No newline at end of file
diff --git a/src/Ombi.I18n/Resources/Texts.nl.resx b/src/Ombi.I18n/Resources/Texts.nl.resx
index e785eb494..873d68ac2 100644
--- a/src/Ombi.I18n/Resources/Texts.nl.resx
+++ b/src/Ombi.I18n/Resources/Texts.nl.resx
@@ -148,9 +148,9 @@
Album
- Movie
+ Film
- TV Show
+ TV-serie
\ No newline at end of file
diff --git a/src/Ombi.I18n/Resources/Texts.no.resx b/src/Ombi.I18n/Resources/Texts.no.resx
index bf0daa456..b3fd2fe8e 100644
--- a/src/Ombi.I18n/Resources/Texts.no.resx
+++ b/src/Ombi.I18n/Resources/Texts.no.resx
@@ -118,16 +118,16 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- New Albums
+ Nye Album
- New Movies
+ Nye filmer
- New TV
+ Nye TV-serier
- Genres:
+ Sjangere:
Type:
@@ -136,21 +136,21 @@
Sesong:
- Episodes:
+ Episoder:
- Powered by
+ Drevet av
- Unsubscribe
+ Avslutt abonnement
Album
- Movie
+ Film
- TV Show
+ TV-serie
\ No newline at end of file
diff --git a/src/Ombi.Notifications/NotificationMessageCurlys.cs b/src/Ombi.Notifications/NotificationMessageCurlys.cs
index f079c03a3..c1fecb00c 100644
--- a/src/Ombi.Notifications/NotificationMessageCurlys.cs
+++ b/src/Ombi.Notifications/NotificationMessageCurlys.cs
@@ -153,6 +153,7 @@ namespace Ombi.Notifications
RequestedUser = req?.RequestedUser?.UserName;
RequestedDate = req?.RequestedDate.ToString("D");
DetailsUrl = GetDetailsUrl(s, req);
+ RequestedByAlias = req?.RequestedByAlias;
if (Type.IsNullOrEmpty())
{
@@ -276,6 +277,7 @@ namespace Ombi.Notifications
// User Defined
public string RequestId { get; set; }
public string RequestedUser { get; set; }
+ public string RequestedByAlias { get; set; }
public string UserName { get; set; }
public string IssueUser => UserName;
public string Alias { get; set; }
@@ -339,6 +341,7 @@ namespace Ombi.Notifications
{ nameof(IssueUser), IssueUser },
{ nameof(UserName), UserName },
{ nameof(Alias), Alias },
+ { nameof(RequestedByAlias), RequestedByAlias },
{ nameof(UserPreference), UserPreference },
{ nameof(DenyReason), DenyReason },
{ nameof(AvailableDate), AvailableDate },
diff --git a/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs b/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs
index 35cc66be4..7b301d4ed 100644
--- a/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs
+++ b/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs
@@ -8,10 +8,12 @@ using Ombi.Api.Emby;
using Ombi.Api.Emby.Models;
using Ombi.Api.Emby.Models.Media.Tv;
using Ombi.Api.Emby.Models.Movie;
+using Ombi.Core.Services;
using Ombi.Core.Settings;
using Ombi.Core.Settings.Models.External;
using Ombi.Helpers;
using Ombi.Hubs;
+using Ombi.Settings.Settings.Models;
using Ombi.Store.Entities;
using Ombi.Store.Repository;
using Quartz;
@@ -19,108 +21,43 @@ using MediaType = Ombi.Store.Entities.MediaType;
namespace Ombi.Schedule.Jobs.Emby
{
- public class EmbyContentSync : IEmbyContentSync
+ public class EmbyContentSync : EmbyLibrarySync, IEmbyContentSync
{
- public EmbyContentSync(ISettingsService settings, IEmbyApiFactory api, ILogger logger,
- IEmbyContentRepository repo, INotificationHubService notification)
+ public EmbyContentSync(
+ ISettingsService settings,
+ IEmbyApiFactory api,
+ ILogger logger,
+ IEmbyContentRepository repo,
+ INotificationHubService notification,
+ IFeatureService feature):
+ base(settings, api, logger, notification)
{
- _logger = logger;
- _settings = settings;
- _apiFactory = api;
_repo = repo;
- _notification = notification;
+ _feature = feature;
}
- private readonly ILogger _logger;
- private readonly ISettingsService _settings;
- private readonly IEmbyApiFactory _apiFactory;
private readonly IEmbyContentRepository _repo;
- private readonly INotificationHubService _notification;
+ private readonly IFeatureService _feature;
- private const int AmountToTake = 100;
- private IEmbyApi Api { get; set; }
-
- public async Task Execute(IJobExecutionContext context)
+ public async override Task Execute(IJobExecutionContext context)
{
- JobDataMap dataMap = context.JobDetail.JobDataMap;
- var recentlyAddedSearch = false;
- if (dataMap.TryGetValue(JobDataKeys.EmbyRecentlyAddedSearch, out var recentlyAddedObj))
- {
- recentlyAddedSearch = Convert.ToBoolean(recentlyAddedObj);
- }
-
- var embySettings = await _settings.GetSettingsAsync();
- if (!embySettings.Enable)
- return;
-
- Api = _apiFactory.CreateClient(embySettings);
-
- await _notification.SendNotificationToAdmins(recentlyAddedSearch ? "Emby Recently Added Started" : "Emby Content Sync Started");
- foreach (var server in embySettings.Servers)
- {
- try
- {
- await StartServerCache(server, recentlyAddedSearch);
- }
- catch (Exception e)
- {
- await _notification.SendNotificationToAdmins("Emby Content Sync Failed");
- _logger.LogError(e, "Exception when caching Emby for server {0}", server.Name);
- }
- }
+ await base.Execute(context);
- await _notification.SendNotificationToAdmins("Emby Content Sync Finished");
// Episodes
+ await OmbiQuartz.Scheduler.TriggerJob(new JobKey(nameof(IEmbyEpisodeSync), "Emby"), new JobDataMap(new Dictionary { { JobDataKeys.EmbyRecentlyAddedSearch, recentlyAdded.ToString() } }));
-
- await OmbiQuartz.Scheduler.TriggerJob(new JobKey(nameof(IEmbyEpisodeSync), "Emby"), new JobDataMap(new Dictionary { { JobDataKeys.EmbyRecentlyAddedSearch, recentlyAddedSearch.ToString() } }));
- }
-
-
- private async Task StartServerCache(EmbyServers server, bool recentlyAdded)
- {
- if (!ValidateSettings(server))
- {
- return;
- }
-
-
- if (server.EmbySelectedLibraries.Any() && server.EmbySelectedLibraries.Any(x => x.Enabled))
- {
- var movieLibsToFilter = server.EmbySelectedLibraries.Where(x => x.Enabled && x.CollectionType == "movies");
-
- foreach (var movieParentIdFilder in movieLibsToFilter)
- {
- _logger.LogInformation($"Scanning Lib '{movieParentIdFilder.Title}'");
- await ProcessMovies(server, recentlyAdded, movieParentIdFilder.Key);
- }
-
- var tvLibsToFilter = server.EmbySelectedLibraries.Where(x => x.Enabled && x.CollectionType == "tvshows");
- foreach (var tvParentIdFilter in tvLibsToFilter)
- {
- _logger.LogInformation($"Scanning Lib '{tvParentIdFilter.Title}'");
- await ProcessTv(server, recentlyAdded, tvParentIdFilter.Key);
- }
-
-
- var mixedLibs = server.EmbySelectedLibraries.Where(x => x.Enabled && x.CollectionType == "mixed");
- foreach (var m in mixedLibs)
- {
- _logger.LogInformation($"Scanning Lib '{m.Title}'");
- await ProcessTv(server, recentlyAdded, m.Key);
- await ProcessMovies(server, recentlyAdded, m.Key);
- }
- }
- else
+ // Played state
+ var isPlayedSyncEnabled = await _feature.FeatureEnabled(FeatureNames.PlayedSync);
+ if(isPlayedSyncEnabled)
{
- await ProcessMovies(server, recentlyAdded);
- await ProcessTv(server, recentlyAdded);
+ await OmbiQuartz.Scheduler.TriggerJob(new JobKey(nameof(IEmbyPlayedSync), "Emby"), new JobDataMap(new Dictionary { { JobDataKeys.EmbyRecentlyAddedSearch, recentlyAdded.ToString() } }));
}
}
- private async Task ProcessTv(EmbyServers server, bool recentlyAdded, string parentId = default)
+
+ protected async override Task ProcessTv(EmbyServers server, string parentId = default)
{
// TV Time
var mediaToAdd = new HashSet();
@@ -196,7 +133,7 @@ namespace Ombi.Schedule.Jobs.Emby
await _repo.AddRange(mediaToAdd);
}
- private async Task ProcessMovies(EmbyServers server, bool recentlyAdded, string parentId = default)
+ protected override async Task ProcessMovies(EmbyServers server, string parentId = default)
{
EmbyItemContainer movies;
if (recentlyAdded)
@@ -263,7 +200,12 @@ namespace Ombi.Schedule.Jobs.Emby
// Check if it exists
var existingMovie = await _repo.GetByEmbyId(movieInfo.Id);
var alreadyGoingToAdd = content.Any(x => x.EmbyId == movieInfo.Id);
- if (existingMovie == null && !alreadyGoingToAdd)
+ if (alreadyGoingToAdd)
+ {
+ _logger.LogDebug($"Detected duplicate for {movieInfo.Name}");
+ return;
+ }
+ if (existingMovie == null)
{
if (!movieInfo.ProviderIds.Any())
{
@@ -319,36 +261,6 @@ namespace Ombi.Schedule.Jobs.Emby
content.Quality = has4K ? null : quality;
content.Has4K = has4K;
}
-
- private bool ValidateSettings(EmbyServers server)
- {
- if (server?.Ip == null || string.IsNullOrEmpty(server?.ApiKey))
- {
- _logger.LogInformation(LoggingEvents.EmbyContentCacher, $"Server {server?.Name} is not configured correctly");
- return false;
- }
-
- return true;
- }
-
- private bool _disposed;
- protected virtual void Dispose(bool disposing)
- {
- if (_disposed)
- return;
-
- if (disposing)
- {
- //_settings?.Dispose();
- }
- _disposed = true;
- }
-
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
}
}
diff --git a/src/Ombi.Schedule/Jobs/Emby/EmbyLibrarySync.cs b/src/Ombi.Schedule/Jobs/Emby/EmbyLibrarySync.cs
new file mode 100644
index 000000000..095364037
--- /dev/null
+++ b/src/Ombi.Schedule/Jobs/Emby/EmbyLibrarySync.cs
@@ -0,0 +1,146 @@
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Ombi.Api.Emby;
+using Ombi.Core.Settings;
+using Ombi.Core.Settings.Models.External;
+using Ombi.Helpers;
+using Ombi.Hubs;
+using Quartz;
+
+namespace Ombi.Schedule.Jobs.Emby
+{
+ public abstract class EmbyLibrarySync
+ {
+ public EmbyLibrarySync(ISettingsService settings, IEmbyApiFactory api, ILogger logger,
+ INotificationHubService notification)
+ {
+ _logger = logger;
+ _settings = settings;
+ _apiFactory = api;
+ _notification = notification;
+ }
+
+ protected readonly ILogger _logger;
+ protected readonly ISettingsService _settings;
+ protected readonly IEmbyApiFactory _apiFactory;
+ protected bool recentlyAdded;
+ protected readonly INotificationHubService _notification;
+
+ protected const int AmountToTake = 100;
+
+ protected IEmbyApi Api { get; set; }
+
+ public virtual async Task Execute(IJobExecutionContext context)
+ {
+
+ JobDataMap dataMap = context.MergedJobDataMap;
+ if (dataMap.TryGetValue(JobDataKeys.EmbyRecentlyAddedSearch, out var recentlyAddedObj))
+ {
+ recentlyAdded = Convert.ToBoolean(recentlyAddedObj);
+ }
+
+ await _notification.SendNotificationToAdmins(recentlyAdded ? "Emby Recently Added Started" : "Emby Content Sync Started");
+
+
+ var embySettings = await _settings.GetSettingsAsync();
+ if (!embySettings.Enable)
+ return;
+
+ Api = _apiFactory.CreateClient(embySettings);
+
+ foreach (var server in embySettings.Servers)
+ {
+ try
+ {
+ await StartServerCache(server);
+ }
+ catch (Exception e)
+ {
+ await _notification.SendNotificationToAdmins("Emby Content Sync Failed");
+ _logger.LogError(e, "Exception when caching Emby for server {0}", server.Name);
+ }
+ }
+
+ await _notification.SendNotificationToAdmins("Emby Content Sync Finished");
+ }
+
+
+ private async Task StartServerCache(EmbyServers server)
+ {
+ if (!ValidateSettings(server))
+ {
+ return;
+ }
+
+
+ if (server.EmbySelectedLibraries.Any() && server.EmbySelectedLibraries.Any(x => x.Enabled))
+ {
+ var movieLibsToFilter = server.EmbySelectedLibraries.Where(x => x.Enabled && x.CollectionType == "movies");
+
+ foreach (var movieParentIdFilder in movieLibsToFilter)
+ {
+ _logger.LogInformation($"Scanning Lib '{movieParentIdFilder.Title}'");
+ await ProcessMovies(server, movieParentIdFilder.Key);
+ }
+
+ var tvLibsToFilter = server.EmbySelectedLibraries.Where(x => x.Enabled && x.CollectionType == "tvshows");
+ foreach (var tvParentIdFilter in tvLibsToFilter)
+ {
+ _logger.LogInformation($"Scanning Lib '{tvParentIdFilter.Title}'");
+ await ProcessTv(server, tvParentIdFilter.Key);
+ }
+
+
+ var mixedLibs = server.EmbySelectedLibraries.Where(x => x.Enabled && x.CollectionType == "mixed");
+ foreach (var m in mixedLibs)
+ {
+ _logger.LogInformation($"Scanning Lib '{m.Title}'");
+ await ProcessTv(server, m.Key);
+ await ProcessMovies(server, m.Key);
+ }
+ }
+ else
+ {
+ await ProcessMovies(server);
+ await ProcessTv(server);
+ }
+ }
+
+ protected abstract Task ProcessTv(EmbyServers server, string parentId = default);
+
+ protected abstract Task ProcessMovies(EmbyServers server, string parentId = default);
+
+ private bool ValidateSettings(EmbyServers server)
+ {
+ if (server?.Ip == null || string.IsNullOrEmpty(server?.ApiKey))
+ {
+ _logger.LogInformation(LoggingEvents.EmbyContentCacher, $"Server {server?.Name} is not configured correctly");
+ return false;
+ }
+
+ return true;
+ }
+
+ private bool _disposed;
+ protected virtual void Dispose(bool disposing)
+ {
+ if (_disposed)
+ return;
+
+ if (disposing)
+ {
+ //_settings?.Dispose();
+ }
+ _disposed = true;
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+ }
+
+}
diff --git a/src/Ombi.Schedule/Jobs/Emby/EmbyPlayedSync.cs b/src/Ombi.Schedule/Jobs/Emby/EmbyPlayedSync.cs
new file mode 100644
index 000000000..5af5a9756
--- /dev/null
+++ b/src/Ombi.Schedule/Jobs/Emby/EmbyPlayedSync.cs
@@ -0,0 +1,110 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Logging;
+using Ombi.Api.Emby;
+using Ombi.Api.Emby.Models;
+using Ombi.Api.Emby.Models.Movie;
+using Ombi.Core.Authentication;
+using Ombi.Core.Settings;
+using Ombi.Core.Settings.Models.External;
+using Ombi.Helpers;
+using Ombi.Hubs;
+using Ombi.Store.Entities;
+using Ombi.Store.Repository;
+
+namespace Ombi.Schedule.Jobs.Emby
+{
+ public class EmbyPlayedSync : EmbyLibrarySync, IEmbyPlayedSync
+ {
+ public EmbyPlayedSync(ISettingsService settings, IEmbyApiFactory api, ILogger logger,
+ IUserPlayedMovieRepository repo, INotificationHubService notification, OmbiUserManager user) : base(settings, api, logger, notification)
+ {
+ _userManager = user;
+ _repo = repo;
+ }
+ private OmbiUserManager _userManager { get; }
+
+ private readonly IUserPlayedMovieRepository _repo;
+
+ protected override Task ProcessTv(EmbyServers server, string parentId = default)
+ {
+ // TODO
+ return Task.CompletedTask;
+ }
+
+ protected async override Task ProcessMovies(EmbyServers server, string parentId = default)
+ {
+
+ var allUsers = await _userManager.Users.Where(x => x.UserType == UserType.EmbyUser || x.UserType == UserType.EmbyConnectUser).ToListAsync();
+ foreach (var user in allUsers)
+ {
+ await ProcessMoviesUser(server, user, parentId);
+ }
+ }
+
+
+ private async Task ProcessMoviesUser(EmbyServers server, OmbiUser user, string parentId = default)
+ {
+ EmbyItemContainer movies;
+ if (recentlyAdded)
+ {
+ var recentlyAddedAmountToTake = 5; // to be adjusted?
+ movies = await Api.GetMoviesPlayed(server.ApiKey, parentId, 0, recentlyAddedAmountToTake, user.ProviderUserId, server.FullUri);
+ // Setting this so we don't attempt to grab more than we need
+ if (movies.TotalRecordCount > recentlyAddedAmountToTake)
+ {
+ movies.TotalRecordCount = recentlyAddedAmountToTake;
+ }
+ }
+ else
+ {
+ movies = await Api.GetMoviesPlayed(server.ApiKey, parentId, 0, AmountToTake, user.ProviderUserId, server.FullUri);
+ }
+ var totalCount = movies.TotalRecordCount;
+ var processed = 0;
+ var mediaToAdd = new HashSet();
+
+ while (processed < totalCount)
+ {
+ foreach (var movie in movies.Items)
+ {
+ await ProcessMovie(movie, user, mediaToAdd, server);
+ processed++;
+ }
+
+ // Get the next batch
+ // Recently Added should never be checked as the TotalRecords should equal the amount to take
+ if (!recentlyAdded)
+ {
+ movies = await Api.GetMoviesPlayed(server.ApiKey, parentId, processed, AmountToTake, user.ProviderUserId, server.FullUri);
+ }
+ await _repo.AddRange(mediaToAdd);
+ mediaToAdd.Clear();
+ }
+ }
+
+ private async Task ProcessMovie(EmbyMovie movieInfo, OmbiUser user, ICollection content, EmbyServers server)
+ {
+ if (movieInfo.ProviderIds.Tmdb.IsNullOrEmpty())
+ {
+ _logger.LogWarning($"Movie {movieInfo.Name} has no relevant metadata. Skipping.");
+ return;
+ }
+ var userPlayedMovie = new UserPlayedMovie()
+ {
+ TheMovieDbId = int.Parse(movieInfo.ProviderIds.Tmdb),
+ UserId = user.Id
+ };
+ // Check if it exists
+ var existingMovie = await _repo.Get(userPlayedMovie.TheMovieDbId, userPlayedMovie.UserId);
+ var alreadyGoingToAdd = content.Any(x => x.TheMovieDbId == userPlayedMovie.TheMovieDbId && x.UserId == userPlayedMovie.UserId);
+ if (existingMovie == null && !alreadyGoingToAdd)
+ {
+ content.Add(userPlayedMovie);
+ }
+ }
+ }
+
+}
diff --git a/src/Ombi.Schedule/Jobs/Emby/IEmbyPlayedSync.cs b/src/Ombi.Schedule/Jobs/Emby/IEmbyPlayedSync.cs
new file mode 100644
index 000000000..80434bddb
--- /dev/null
+++ b/src/Ombi.Schedule/Jobs/Emby/IEmbyPlayedSync.cs
@@ -0,0 +1,6 @@
+namespace Ombi.Schedule.Jobs.Emby
+{
+ public interface IEmbyPlayedSync : IBaseJob
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs b/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs
index 58dacaed5..3eab17a35 100644
--- a/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs
+++ b/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs
@@ -228,7 +228,12 @@ namespace Ombi.Schedule.Jobs.Jellyfin
// Check if it exists
var existingMovie = await _repo.GetByJellyfinId(movieInfo.Id);
var alreadyGoingToAdd = content.Any(x => x.JellyfinId == movieInfo.Id);
- if (existingMovie == null && !alreadyGoingToAdd)
+ if (alreadyGoingToAdd)
+ {
+ _logger.LogDebug($"Detected duplicate for {movieInfo.Name}");
+ return;
+ }
+ if (existingMovie == null)
{
if (!movieInfo.ProviderIds.Any())
{
diff --git a/src/Ombi.Schedule/Jobs/Ombi/MediaDatabaseRefresh.cs b/src/Ombi.Schedule/Jobs/Ombi/MediaDatabaseRefresh.cs
index 46f3a7e56..e3573e6c8 100644
--- a/src/Ombi.Schedule/Jobs/Ombi/MediaDatabaseRefresh.cs
+++ b/src/Ombi.Schedule/Jobs/Ombi/MediaDatabaseRefresh.cs
@@ -15,15 +15,22 @@ namespace Ombi.Schedule.Jobs.Ombi
{
public class MediaDatabaseRefresh : IMediaDatabaseRefresh
{
- public MediaDatabaseRefresh(ISettingsService s, ILogger log,
- IPlexContentRepository plexRepo, IEmbyContentRepository embyRepo, IJellyfinContentRepository jellyfinRepo,
- ISettingsService embySettings, ISettingsService jellyfinSettings)
+ public MediaDatabaseRefresh(
+ ISettingsService s,
+ ILogger log,
+ IPlexContentRepository plexRepo,
+ IEmbyContentRepository embyRepo,
+ IJellyfinContentRepository jellyfinRepo,
+ IUserPlayedMovieRepository userPlayedRepo,
+ ISettingsService embySettings,
+ ISettingsService jellyfinSettings)
{
_plexSettings = s;
_log = log;
_plexRepo = plexRepo;
_embyRepo = embyRepo;
_jellyfinRepo = jellyfinRepo;
+ _userPlayedRepo = userPlayedRepo;
_embySettings = embySettings;
_jellyfinSettings = jellyfinSettings;
_plexSettings.ClearCache();
@@ -34,6 +41,7 @@ namespace Ombi.Schedule.Jobs.Ombi
private readonly IPlexContentRepository _plexRepo;
private readonly IEmbyContentRepository _embyRepo;
private readonly IJellyfinContentRepository _jellyfinRepo;
+ private readonly IUserPlayedMovieRepository _userPlayedRepo;
private readonly ISettingsService _embySettings;
private readonly ISettingsService _jellyfinSettings;
@@ -41,6 +49,7 @@ namespace Ombi.Schedule.Jobs.Ombi
{
try
{
+ await RemovePlayedData();
await RemovePlexData();
await RemoveEmbyData();
await RemoveJellyfinData();
@@ -52,6 +61,20 @@ namespace Ombi.Schedule.Jobs.Ombi
}
+ private async Task RemovePlayedData()
+ {
+ try
+ {
+ const string movieSql = "DELETE FROM UserPlayedMovie";
+ await _userPlayedRepo.ExecuteSql(movieSql);
+ }
+ catch (Exception e)
+ {
+ _log.LogError(LoggingEvents.MediaReferesh, e, "Refreshing Played Data Failed");
+ }
+ }
+
+
private async Task RemoveEmbyData()
{
try
diff --git a/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs b/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs
index ef2975057..3eaf0154a 100644
--- a/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs
+++ b/src/Ombi.Schedule/Jobs/Radarr/RadarrSync.cs
@@ -46,8 +46,8 @@ namespace Ombi.Schedule.Jobs.Radarr
await tran.CommitAsync();
var radarrSettings = _radarrSettings.GetSettingsAsync();
- var radarr4kSettings = _radarr4kSettings.GetSettingsAsync();
await Process(await radarrSettings);
+ var radarr4kSettings = _radarr4kSettings.GetSettingsAsync();
await Process(await radarr4kSettings);
}
catch (Exception)
diff --git a/src/Ombi.Schedule/OmbiScheduler.cs b/src/Ombi.Schedule/OmbiScheduler.cs
index 41602f641..3b4f6316f 100644
--- a/src/Ombi.Schedule/OmbiScheduler.cs
+++ b/src/Ombi.Schedule/OmbiScheduler.cs
@@ -99,6 +99,7 @@ namespace Ombi.Schedule
await OmbiQuartz.Instance.AddJob(nameof(IEmbyContentSync), "Emby", JobSettingsHelper.EmbyContent(s));
await OmbiQuartz.Instance.AddJob(nameof(IEmbyContentSync) + "RecentlyAdded", "Emby", JobSettingsHelper.EmbyRecentlyAddedSync(s), new Dictionary { { JobDataKeys.EmbyRecentlyAddedSearch, "true" } });
await OmbiQuartz.Instance.AddJob(nameof(IEmbyEpisodeSync), "Emby", null);
+ await OmbiQuartz.Instance.AddJob(nameof(IEmbyPlayedSync), "Emby", null);
await OmbiQuartz.Instance.AddJob(nameof(IEmbyAvaliabilityChecker), "Emby", null);
await OmbiQuartz.Instance.AddJob(nameof(IEmbyUserImporter), "Emby", JobSettingsHelper.UserImporter(s));
}
diff --git a/src/Ombi.Settings/Settings/Models/FeatureSettings.cs b/src/Ombi.Settings/Settings/Models/FeatureSettings.cs
index 9d0149e5d..f541d1e0d 100644
--- a/src/Ombi.Settings/Settings/Models/FeatureSettings.cs
+++ b/src/Ombi.Settings/Settings/Models/FeatureSettings.cs
@@ -21,5 +21,6 @@ namespace Ombi.Settings.Settings.Models
{
public const string Movie4KRequests = nameof(Movie4KRequests);
public const string OldTrendingSource = nameof(OldTrendingSource);
+ public const string PlayedSync = nameof(PlayedSync);
}
}
diff --git a/src/Ombi.Settings/Settings/Models/JobSettingsHelper.cs b/src/Ombi.Settings/Settings/Models/JobSettingsHelper.cs
index b80943cc5..fb51ae147 100644
--- a/src/Ombi.Settings/Settings/Models/JobSettingsHelper.cs
+++ b/src/Ombi.Settings/Settings/Models/JobSettingsHelper.cs
@@ -1,5 +1,6 @@
using Ombi.Helpers;
using Quartz;
+using System;
namespace Ombi.Settings.Settings.Models
{
@@ -104,7 +105,9 @@ namespace Ombi.Settings.Settings.Models
private static string ValidateCron(string cron)
{
- if (CronExpression.IsValidExpression(cron))
+ CronExpression expression = new CronExpression(cron);
+ DateTimeOffset? nextFireUTCTime = expression.GetNextValidTimeAfter(DateTime.Now);
+ if (CronExpression.IsValidExpression(cron) && nextFireUTCTime != null)
{
return cron;
}
diff --git a/src/Ombi.Store/Context/ExternalContext.cs b/src/Ombi.Store/Context/ExternalContext.cs
index f13c1e74f..c54c39beb 100644
--- a/src/Ombi.Store/Context/ExternalContext.cs
+++ b/src/Ombi.Store/Context/ExternalContext.cs
@@ -41,6 +41,7 @@ namespace Ombi.Store.Context
public DbSet SonarrEpisodeCache { get; set; }
public DbSet SickRageCache { get; set; }
public DbSet SickRageEpisodeCache { get; set; }
+ public DbSet UserPlayedMovie { get; set; }
protected override void OnModelCreating(ModelBuilder builder)
{
diff --git a/src/Ombi.Store/Entities/Requests/MovieRequests.cs b/src/Ombi.Store/Entities/Requests/MovieRequests.cs
index 415efded2..3c3c75893 100644
--- a/src/Ombi.Store/Entities/Requests/MovieRequests.cs
+++ b/src/Ombi.Store/Entities/Requests/MovieRequests.cs
@@ -84,5 +84,10 @@ namespace Ombi.Store.Entities.Requests
[NotMapped]
public override bool CanApprove => !Approved && !Available || !Approved4K && !Available4K;
+
+ [NotMapped]
+ public bool WatchedByRequestedUser { get; set; }
+ [NotMapped]
+ public int PlayedByUsersCount { get; set; }
}
}
diff --git a/src/Ombi.Store/Entities/UserPlayedMovie.cs b/src/Ombi.Store/Entities/UserPlayedMovie.cs
new file mode 100644
index 000000000..7f28e9d99
--- /dev/null
+++ b/src/Ombi.Store/Entities/UserPlayedMovie.cs
@@ -0,0 +1,8 @@
+namespace Ombi.Store.Entities
+{
+ public class UserPlayedMovie : Entity
+ {
+ public int TheMovieDbId { get; set; }
+ public string UserId { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Ombi.Store/Migrations/ExternalMySql/20230406152218_MovieUserPlayed.Designer.cs b/src/Ombi.Store/Migrations/ExternalMySql/20230406152218_MovieUserPlayed.Designer.cs
new file mode 100644
index 000000000..0e2e290b7
--- /dev/null
+++ b/src/Ombi.Store/Migrations/ExternalMySql/20230406152218_MovieUserPlayed.Designer.cs
@@ -0,0 +1,566 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+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("20230406152218_MovieUserPlayed")]
+ partial class MovieUserPlayed
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "6.0.9")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("CouchPotatoCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ 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");
+
+ 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");
+
+ 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");
+
+ 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");
+
+ 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");
+
+ 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");
+
+ 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");
+
+ b.Property("ParentKey")
+ .HasColumnType("longtext");
+
+ b.Property("PlexContentId")
+ .HasColumnType("longtext");
+
+ b.Property("PlexServerContentId")
+ .HasColumnType("int");
+
+ b.Property("SeasonKey")
+ .HasColumnType("longtext");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PlexServerContentId");
+
+ b.ToTable("PlexSeasonsContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Has4K")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ImdbId")
+ .HasColumnType("longtext");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
+
+ b.Property("Quality")
+ .HasColumnType("longtext");
+
+ b.Property("ReleaseYear")
+ .HasColumnType("longtext");
+
+ b.Property("RequestId")
+ .HasColumnType("int");
+
+ 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("PlexServerContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TmdbId")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("PlexWatchlistHistory");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.RadarrCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("Has4K")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("HasFile")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("HasRegular")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("RadarrCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SickRageCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SickRageCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SickRageEpisodeCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SickRageEpisodeCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SonarrCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SonarrCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SonarrEpisodeCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("HasFile")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("MovieDbId")
+ .HasColumnType("int");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SonarrEpisodeCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.UserPlayedMovie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.Property("UserId")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("UserPlayedMovie");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.EmbyContent", "Series")
+ .WithMany("Episodes")
+ .HasForeignKey("ParentId")
+ .HasPrincipalKey("EmbyId");
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.JellyfinContent", "Series")
+ .WithMany("Episodes")
+ .HasForeignKey("ParentId")
+ .HasPrincipalKey("JellyfinId");
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.PlexServerContent", "Series")
+ .WithMany("Episodes")
+ .HasForeignKey("GrandparentKey")
+ .HasPrincipalKey("Key");
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.PlexServerContent", null)
+ .WithMany("Seasons")
+ .HasForeignKey("PlexServerContentId");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
+ {
+ b.Navigation("Episodes");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
+ {
+ b.Navigation("Episodes");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
+ {
+ b.Navigation("Episodes");
+
+ b.Navigation("Seasons");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/Ombi.Store/Migrations/ExternalMySql/20230406152218_MovieUserPlayed.cs b/src/Ombi.Store/Migrations/ExternalMySql/20230406152218_MovieUserPlayed.cs
new file mode 100644
index 000000000..48336a03d
--- /dev/null
+++ b/src/Ombi.Store/Migrations/ExternalMySql/20230406152218_MovieUserPlayed.cs
@@ -0,0 +1,35 @@
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Ombi.Store.Migrations.ExternalMySql
+{
+ public partial class MovieUserPlayed : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "UserPlayedMovie",
+ columns: table => new
+ {
+ Id = table.Column(type: "int", nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ TheMovieDbId = table.Column(type: "int", nullable: false),
+ UserId = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_UserPlayedMovie", x => x.Id);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "UserPlayedMovie");
+ }
+ }
+}
diff --git a/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs b/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs
index 1e86ddf7b..0121a99ba 100644
--- a/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs
+++ b/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs
@@ -16,7 +16,7 @@ namespace Ombi.Store.Migrations.ExternalMySql
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "6.0.0")
+ .HasAnnotation("ProductVersion", "6.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
@@ -488,6 +488,23 @@ namespace Ombi.Store.Migrations.ExternalMySql
b.ToTable("SonarrEpisodeCache");
});
+ modelBuilder.Entity("Ombi.Store.Entities.UserPlayedMovie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.Property("UserId")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("UserPlayedMovie");
+ });
+
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
{
b.HasOne("Ombi.Store.Entities.EmbyContent", "Series")
diff --git a/src/Ombi.Store/Migrations/ExternalSqlite/20230310130339_MovieUserPlayed.Designer.cs b/src/Ombi.Store/Migrations/ExternalSqlite/20230310130339_MovieUserPlayed.Designer.cs
new file mode 100644
index 000000000..f1162e20f
--- /dev/null
+++ b/src/Ombi.Store/Migrations/ExternalSqlite/20230310130339_MovieUserPlayed.Designer.cs
@@ -0,0 +1,564 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Ombi.Store.Context.Sqlite;
+
+#nullable disable
+
+namespace Ombi.Store.Migrations.ExternalSqlite
+{
+ [DbContext(typeof(ExternalSqliteContext))]
+ [Migration("20230310130339_MovieUserPlayed")]
+ partial class MovieUserPlayed
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "6.0.9");
+
+ modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("CouchPotatoCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AddedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("EmbyId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Has4K")
+ .HasColumnType("INTEGER");
+
+ b.Property("ImdbId")
+ .HasColumnType("TEXT");
+
+ b.Property("ProviderId")
+ .HasColumnType("TEXT");
+
+ b.Property("Quality")
+ .HasColumnType("TEXT");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("TEXT");
+
+ b.Property("Title")
+ .HasColumnType("TEXT");
+
+ b.Property("TvDbId")
+ .HasColumnType("TEXT");
+
+ b.Property("Type")
+ .HasColumnType("INTEGER");
+
+ b.Property("Url")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("EmbyContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AddedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("EmbyId")
+ .HasColumnType("TEXT");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("INTEGER");
+
+ b.Property("ImdbId")
+ .HasColumnType("TEXT");
+
+ b.Property("ParentId")
+ .HasColumnType("TEXT");
+
+ b.Property("ProviderId")
+ .HasColumnType("TEXT");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("INTEGER");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("TEXT");
+
+ b.Property("Title")
+ .HasColumnType("TEXT");
+
+ b.Property("TvDbId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("EmbyEpisode");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AddedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("Has4K")
+ .HasColumnType("INTEGER");
+
+ b.Property("ImdbId")
+ .HasColumnType("TEXT");
+
+ b.Property("JellyfinId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property |