diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e1047f965..467073cd2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,6 +3,7 @@ name: CI Build
on:
push:
branches: [ develop, master ]
+ workflow_dispatch:
jobs:
build-ui:
@@ -38,7 +39,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '5.0.x'
+ dotnet-version: '6.0.x'
- name: Nuget Cache
uses: actions/cache@v2
@@ -67,6 +68,7 @@ jobs:
uses: TriPSs/conventional-changelog-action@v3
with:
version-file: 'version.json'
+ release-count: 20
skip-on-empty: 'false'
git-message: 'chore(release): :rocket: {version}'
@@ -102,6 +104,12 @@ jobs:
format: tar.gz
steps:
- uses: actions/checkout@v2
+ - uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '6.0.x'
+ - uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '5.0.x'
- name: Nuget Cache
uses: actions/cache@v2
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml
index 499cd272d..2e382eee3 100644
--- a/.github/workflows/cypress.yml
+++ b/.github/workflows/cypress.yml
@@ -7,6 +7,7 @@ on:
branches: [ develop ]
schedule:
- cron: '0 0 * * *'
+ workflow_dispatch:
jobs:
automation-tests:
@@ -18,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 5.0.x
+ dotnet-version: 6.0.x
- uses: actions/setup-node@v2
with:
node-version: '14'
@@ -38,7 +39,7 @@ jobs:
- name: Start Backend
run: |
- nohup dotnet run -p ./src/Ombi -- --host http://*:3577 &
+ nohup dotnet run --project ./src/Ombi -- --host http://*:3577 &
- name: Start Frontend
run: |
nohup yarn --cwd ./src/Ombi/ClientApp start &
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index e353dce4d..961871f8a 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -3,6 +3,7 @@ name: PR Build
on:
pull_request:
types: [opened, synchronize, reopened]
+ workflow_dispatch:
jobs:
build-ui:
@@ -31,7 +32,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '5.0.x'
+ dotnet-version: '6.0.x'
- name: Nuget Cache
uses: actions/cache@v2
@@ -89,6 +90,9 @@ jobs:
format: tar.gz
steps:
- uses: actions/checkout@v2
+ - uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '6.0.x'
- name: Nuget Cache
uses: actions/cache@v2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7de5d4064..d65ba2568 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,61 @@
+## [4.6.4](https://github.com/Ombi-app/Ombi/compare/v4.6.3...v4.6.4) (2021-11-12)
+
+
+
+## [4.6.3](https://github.com/Ombi-app/Ombi/compare/v4.6.2...v4.6.3) (2021-11-11)
+
+
+### Bug Fixes
+
+* **discover:** :bug: Display TV + movies on actor page in user language ([#4395](https://github.com/Ombi-app/Ombi/issues/4395)) ([fe635c7](https://github.com/Ombi-app/Ombi/commit/fe635c7106bc487ff879bdc8a73bab16cb389b97))
+* **permissions:** :bug: Improved the security around the role "Manage Own Requests" ([#4397](https://github.com/Ombi-app/Ombi/issues/4397)) ([334a32b](https://github.com/Ombi-app/Ombi/commit/334a32bca42f90198d9b720d2bdb710a583be47f)), closes [#4391](https://github.com/Ombi-app/Ombi/issues/4391)
+* **search:** Fixed some cases where search wouldn't work correctly ([#4398](https://github.com/Ombi-app/Ombi/issues/4398)) ([4410790](https://github.com/Ombi-app/Ombi/commit/4410790bc096826bc11554098f846e3acb59589a))
+
+
+
+## [4.6.2](https://github.com/Ombi-app/Ombi/compare/v4.6.1...v4.6.2) (2021-11-10)
+
+
+### Bug Fixes
+
+* **discover:** TV shows now display on the Actor Pages ([#4388](https://github.com/Ombi-app/Ombi/issues/4388)) ([6b716e7](https://github.com/Ombi-app/Ombi/commit/6b716e722076e3d1e6bf2097c5263645d5ea9edf))
+
+
+
+## [4.6.1](https://github.com/Ombi-app/Ombi/compare/v4.6.0...v4.6.1) (2021-11-10)
+
+
+### Bug Fixes
+
+* :bug: Fixed the MySQL issue after .net 6 upgrade [#4393](https://github.com/Ombi-app/Ombi/issues/4393) ([fea7ff0](https://github.com/Ombi-app/Ombi/commit/fea7ff05139e9ff50c8097fa5389b4ef9ad21a15))
+* **translations:** 🌐 New translations from Crowdin [skip ci] ([c6acb45](https://github.com/Ombi-app/Ombi/commit/c6acb45f8d3f371c0b4024c4272849d0d0cc867f))
+* **translations:** 🌐 New translations from Crowdin [skip ci] ([18c220a](https://github.com/Ombi-app/Ombi/commit/18c220a0cd0d19e45a07d0c319da2b9512778a8a))
+
+
+
+# [4.6.0](https://github.com/Ombi-app/Ombi/compare/v4.4.0...v4.6.0) (2021-11-09)
+
+
+### Features
+
+* :sparkles: Upgrade Ombi to .NET 6 ([#4390](https://github.com/Ombi-app/Ombi/issues/4390)) ([719eb7d](https://github.com/Ombi-app/Ombi/commit/719eb7dbe37b3a72d264e2f670067518eef70694)), closes [#4392](https://github.com/Ombi-app/Ombi/issues/4392)
+
+
+
+# [4.4.0](https://github.com/Ombi-app/Ombi/compare/v4.3.2...v4.4.0) (2021-11-06)
+
+
+### Bug Fixes
+
+* **request-list:** :bug: Fixed an issue where the request options were not appearing for Music requests ([c0406a2](https://github.com/Ombi-app/Ombi/commit/c0406a2ddebafb03d98ed25cdf7d89dc9a600c7d))
+
+
+### Features
+
+* **mass-email:** :sparkles: Added the ability to configure the Mass Email, we can now send BCC and we are less likely to be rate limited when not using bcc [#4377](https://github.com/Ombi-app/Ombi/issues/4377) ([ca655ae](https://github.com/Ombi-app/Ombi/commit/ca655ae57042dec44106a2f2ef5ba2e6f1019ee4))
+
+
+
## [4.3.2](https://github.com/Ombi-app/Ombi/compare/v4.3.1...v4.3.2) (2021-11-02)
@@ -67,3 +125,76 @@
+## [4.2.11](https://github.com/Ombi-app/Ombi/compare/v4.2.10...v4.2.11) (2021-10-18)
+
+
+
+## [4.2.10](https://github.com/Ombi-app/Ombi/compare/v4.2.9...v4.2.10) (2021-10-15)
+
+
+### Bug Fixes
+
+* :bug: Really really fix it this time? ([543d36e](https://github.com/Ombi-app/Ombi/commit/543d36e5615341bc8378cac377b843a3dbc1ef99))
+
+
+
+## [4.2.9](https://github.com/Ombi-app/Ombi/compare/v4.2.8...v4.2.9) (2021-10-15)
+
+
+### Bug Fixes
+
+* :fire: Really fix the base url issue this time ([9f36923](https://github.com/Ombi-app/Ombi/commit/9f36923c51bfabf9cb026f2da14f9947050af0d9))
+
+
+
+## [4.2.8](https://github.com/Ombi-app/Ombi/compare/v4.2.7...v4.2.8) (2021-10-15)
+
+
+### Bug Fixes
+
+* :adhesive_bandage: See if this fixes the proxy issue ([74d1aca](https://github.com/Ombi-app/Ombi/commit/74d1acae499707a7e21401f53eb2bb90c5bb9cfa))
+* :bug: Fixed Ombi not writing the baseUrl correctly ([e9cc8b6](https://github.com/Ombi-app/Ombi/commit/e9cc8b6fe71d3e10c1a901e70227989b3362afe3))
+
+
+
+## [4.2.7](https://github.com/Ombi-app/Ombi/compare/v4.2.6...v4.2.7) (2021-10-14)
+
+
+### Bug Fixes
+
+* :bug: Fixed the issue parsing TheMovieDB dates. They have broken something... ([6e397e0](https://github.com/Ombi-app/Ombi/commit/6e397e02e95f894a92e8bf02428efdcac1275b31))
+
+
+
+## [4.2.6](https://github.com/Ombi-app/Ombi/compare/v4.2.5...v4.2.6) (2021-10-14)
+
+
+### Performance Improvements
+
+* :zap: Use ngxs store for the whole customization section of the app ([97b493d](https://github.com/Ombi-app/Ombi/commit/97b493d869feee59d360b484a6c59388a2aead1f))
+
+
+
+## [4.2.5](https://github.com/Ombi-app/Ombi/compare/v4.2.4...v4.2.5) (2021-10-14)
+
+
+
+## [4.2.4](https://github.com/Ombi-app/Ombi/compare/v4.2.3...v4.2.4) (2021-10-13)
+
+
+### Bug Fixes
+
+* **#4344:** :bug: Fixed an issue where we errored on Plex Episode Scan ([cd5532f](https://github.com/Ombi-app/Ombi/commit/cd5532fa8f7ebbfaf942841398672bafb9a405d4))
+* **#4345:** :bug: Fixed the issue where denied requests we not appearing correctly ([5a2f652](https://github.com/Ombi-app/Ombi/commit/5a2f652a28f5699dd667afef8dde129817e53392))
+
+
+
+## [4.2.3](https://github.com/Ombi-app/Ombi/compare/v4.2.2...v4.2.3) (2021-10-12)
+
+
+### Bug Fixes
+
+* **user-management:** :bug: Fixed an issue where the Copy users App Link did not generate the correct app link for that user ([8cafcdc](https://github.com/Ombi-app/Ombi/commit/8cafcdcc3baa85c55d75e43835b2289bbea69b0e))
+
+
+
diff --git a/README.md b/README.md
index 636c58c3e..33310efd2 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ Don't worry, it's grandma friendly, and more importantly; has wife approval cert
| Service | Stable | Develop
|----------|:---------------------------:|:----------------------------:|
-| Build Status | [](https://github.com/Ombi-app/Ombi/actions/workflows/build.yml) | [](https://github.com/Ombi-app/Ombi/actions/workflows/build.yml) | [](https://dev.azure.com/tidusjar/Ombi/_build/latest?definitionId=18&branchName=feature%2Fv4)
+| Build Status | [](https://github.com/Ombi-app/Ombi/actions/workflows/build.yml) | [](https://github.com/Ombi-app/Ombi/actions/workflows/build.yml) | [](https://dev.azure.com/tidusjar/Ombi/_build/latest?definitionId=18&branchName=feature%2Fv4)
| Download |[](https://github.com/Ombi-app/Ombi/releases) | [](https://ci.appveyor.com/project/tidusjar/requestplex/branch/develop/artifacts) | [](https://github.com/ombi-app/ombi/releases) |
# Feature Requests
@@ -142,21 +142,28 @@ Here are some of the features Ombi has:
Victor Usoltsev
+
+
+
+
+ Sephrat
+
+ |
Dhruv Bhavsar
- |
+
+
Joshua M. Boniface
- |
-
+
@@ -164,13 +171,6 @@ Here are some of the features Ombi has:
Bruvv
|
-
-
-
-
- Sephrat
-
- |
diff --git a/makefile b/makefile
new file mode 100644
index 000000000..ec70a7815
--- /dev/null
+++ b/makefile
@@ -0,0 +1,14 @@
+backend:
+ cd src/Ombi && dotnet watch run -- --host http://*:3577
+
+frontend:
+ cd src/Ombi/ClientApp && yarn start
+
+install-frontend:
+ cd src/Ombi/ClientApp && yarn
+
+install-tests:
+ cd tests && yarn
+
+tests:
+ cd tests && npx cypress open
diff --git a/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj b/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj
index 0701967d1..5939549de 100644
--- a/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj
+++ b/src/Ombi.Api.CloudService/Ombi.Api.CloudService.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj b/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj
index 320c51076..6353f4bf9 100644
--- a/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj
+++ b/src/Ombi.Api.CouchPotato/Ombi.Api.CouchPotato.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj b/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj
index 20c8a9aef..4945a2fb2 100644
--- a/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj
+++ b/src/Ombi.Api.Discord/Ombi.Api.Discord.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj b/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj
index 320c51076..6353f4bf9 100644
--- a/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj
+++ b/src/Ombi.Api.DogNzb/Ombi.Api.DogNzb.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj b/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj
index 3008c9230..f167146af 100644
--- a/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj
+++ b/src/Ombi.Api.Emby/Ombi.Api.Emby.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj b/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj
index 20c8a9aef..4945a2fb2 100644
--- a/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj
+++ b/src/Ombi.Api.FanartTv/Ombi.Api.FanartTv.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Github/Ombi.Api.Github.csproj b/src/Ombi.Api.Github/Ombi.Api.Github.csproj
index 320c51076..6353f4bf9 100644
--- a/src/Ombi.Api.Github/Ombi.Api.Github.csproj
+++ b/src/Ombi.Api.Github/Ombi.Api.Github.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj b/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj
index 7065a1e65..1285c073c 100644
--- a/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj
+++ b/src/Ombi.Api.Gotify/Ombi.Api.Gotify.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj b/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj
index 320c51076..6353f4bf9 100644
--- a/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj
+++ b/src/Ombi.Api.GroupMe/Ombi.Api.GroupMe.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Jellyfin/Ombi.Api.Jellyfin.csproj b/src/Ombi.Api.Jellyfin/Ombi.Api.Jellyfin.csproj
index 3008c9230..f167146af 100644
--- a/src/Ombi.Api.Jellyfin/Ombi.Api.Jellyfin.csproj
+++ b/src/Ombi.Api.Jellyfin/Ombi.Api.Jellyfin.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj b/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj
index 320c51076..6353f4bf9 100644
--- a/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj
+++ b/src/Ombi.Api.Lidarr/Ombi.Api.Lidarr.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj b/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj
index 5742fd3a5..a25024b6c 100644
--- a/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj
+++ b/src/Ombi.Api.Mattermost/Ombi.Api.Mattermost.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj b/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj
index 65b4175d4..584b980ce 100644
--- a/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj
+++ b/src/Ombi.Api.MusicBrainz/Ombi.Api.MusicBrainz.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj b/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj
index 312aa49f2..f84a8add6 100644
--- a/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj
+++ b/src/Ombi.Api.Notifications/Ombi.Api.Notifications.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj b/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj
index 20c8a9aef..4945a2fb2 100644
--- a/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj
+++ b/src/Ombi.Api.Plex/Ombi.Api.Plex.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj b/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj
index 20c8a9aef..4945a2fb2 100644
--- a/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj
+++ b/src/Ombi.Api.Pushbullet/Ombi.Api.Pushbullet.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj b/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj
index 7065a1e65..1285c073c 100644
--- a/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj
+++ b/src/Ombi.Api.Pushover/Ombi.Api.Pushover.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj
index c8ace891e..f14df4f5f 100644
--- a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj
+++ b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Ombi.Api.RottenTomatoes/Ombi.Api.RottenTomatoes.csproj b/src/Ombi.Api.RottenTomatoes/Ombi.Api.RottenTomatoes.csproj
index 795629ea6..6353f4bf9 100644
--- a/src/Ombi.Api.RottenTomatoes/Ombi.Api.RottenTomatoes.csproj
+++ b/src/Ombi.Api.RottenTomatoes/Ombi.Api.RottenTomatoes.csproj
@@ -1,7 +1,7 @@
-
+
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Service/Ombi.Api.Service.csproj b/src/Ombi.Api.Service/Ombi.Api.Service.csproj
index 0b83f88e0..a344de142 100644
--- a/src/Ombi.Api.Service/Ombi.Api.Service.csproj
+++ b/src/Ombi.Api.Service/Ombi.Api.Service.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -13,7 +13,7 @@
-
+
diff --git a/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj b/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj
index 320c51076..6353f4bf9 100644
--- a/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj
+++ b/src/Ombi.Api.SickRage/Ombi.Api.SickRage.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj b/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj
index 20c8a9aef..4945a2fb2 100644
--- a/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj
+++ b/src/Ombi.Api.Slack/Ombi.Api.Slack.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj b/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj
index 20c8a9aef..4945a2fb2 100644
--- a/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj
+++ b/src/Ombi.Api.Sonarr/Ombi.Api.Sonarr.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj b/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj
index 320c51076..6353f4bf9 100644
--- a/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj
+++ b/src/Ombi.Api.Telegram/Ombi.Api.Telegram.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj b/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj
index f499f594e..e07f40c60 100644
--- a/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj
+++ b/src/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj b/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj
index 3008c9230..f167146af 100644
--- a/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj
+++ b/src/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj b/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj
index a5bb9ea19..8e12c7c67 100644
--- a/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj
+++ b/src/Ombi.Api.Twilio/Ombi.Api.Twilio.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj b/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj
index 109e3e3f1..7748aad45 100644
--- a/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj
+++ b/src/Ombi.Api.Webhook/Ombi.Api.Webhook.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Api/ApiHelper.cs b/src/Ombi.Api/ApiHelper.cs
index fa9d3e7ab..f88525869 100644
--- a/src/Ombi.Api/ApiHelper.cs
+++ b/src/Ombi.Api/ApiHelper.cs
@@ -66,6 +66,8 @@ namespace Ombi.Api
startingTag = builder.Query.Contains("?") ? "&" : "?";
}
+ value = Uri.EscapeDataString(value);
+
builder.Query = hasQuery
? $"{builder.Query}{startingTag}{parameter}={value}"
: $"{startingTag}{parameter}={value}";
diff --git a/src/Ombi.Api/Ombi.Api.csproj b/src/Ombi.Api/Ombi.Api.csproj
index 02969e665..83c3ee62e 100644
--- a/src/Ombi.Api/Ombi.Api.csproj
+++ b/src/Ombi.Api/Ombi.Api.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj
index fcbdab967..4e01e32cd 100644
--- a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj
+++ b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
true
true
Debug;Release;NonUiBuild
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Ombi.Core.Tests/Senders/MassEmailSenderTests.cs b/src/Ombi.Core.Tests/Senders/MassEmailSenderTests.cs
new file mode 100644
index 000000000..5c5cedabe
--- /dev/null
+++ b/src/Ombi.Core.Tests/Senders/MassEmailSenderTests.cs
@@ -0,0 +1,228 @@
+using Microsoft.Extensions.Logging;
+using MockQueryable.Moq;
+using Moq;
+using Moq.AutoMock;
+using NUnit.Framework;
+using Ombi.Core.Authentication;
+using Ombi.Core.Models;
+using Ombi.Core.Senders;
+using Ombi.Notifications;
+using Ombi.Notifications.Models;
+using Ombi.Settings.Settings.Models.Notifications;
+using Ombi.Store.Entities;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Ombi.Core.Tests.Senders
+{
+ [TestFixture]
+ public class MassEmailSenderTests
+ {
+
+ private MassEmailSender _subject;
+ private AutoMocker _mocker;
+
+ [SetUp]
+ public void Setup()
+ {
+ _mocker = new AutoMocker();
+ _subject = _mocker.CreateInstance();
+ }
+
+ [Test]
+ public async Task SendMassEmail_SingleUser()
+ {
+ var model = new MassEmailModel
+ {
+ Body = "Test",
+ Subject = "Subject",
+ Users = new List
+ {
+ new OmbiUser
+ {
+ Id = "a"
+ }
+ }
+ };
+
+ _mocker.Setup>(x => x.Users).Returns(new List
+ {
+ new OmbiUser
+ {
+ Id = "a",
+ Email = "Test@test.com"
+ }
+ }.AsQueryable().BuildMock().Object);
+
+ var result = await _subject.SendMassEmail(model);
+
+ _mocker.Verify(x => x.SendAdHoc(It.Is(m => m.Subject == model.Subject
+ && m.Message == model.Body
+ && m.To == "Test@test.com"), It.IsAny()), Times.Once);
+ }
+
+ [Test]
+ public async Task SendMassEmail_MultipleUsers()
+ {
+ var model = new MassEmailModel
+ {
+ Body = "Test",
+ Subject = "Subject",
+ Users = new List
+ {
+ new OmbiUser
+ {
+ Id = "a"
+ },
+ new OmbiUser
+ {
+ Id = "b"
+ }
+ }
+ };
+
+ _mocker.Setup>(x => x.Users).Returns(new List
+ {
+ new OmbiUser
+ {
+ Id = "a",
+ Email = "Test@test.com"
+ },
+ new OmbiUser
+ {
+ Id = "b",
+ Email = "b@test.com"
+ }
+ }.AsQueryable().BuildMock().Object);
+
+ var result = await _subject.SendMassEmail(model);
+
+ _mocker.Verify(x => x.SendAdHoc(It.Is(m => m.Subject == model.Subject
+ && m.Message == model.Body
+ && m.To == "Test@test.com"), It.IsAny()), Times.Once);
+ _mocker.Verify(x => x.SendAdHoc(It.Is(m => m.Subject == model.Subject
+ && m.Message == model.Body
+ && m.To == "b@test.com"), It.IsAny()), Times.Once);
+ }
+
+ [Test]
+ public async Task SendMassEmail_UserNoEmail()
+ {
+ var model = new MassEmailModel
+ {
+ Body = "Test",
+ Subject = "Subject",
+ Users = new List
+ {
+ new OmbiUser
+ {
+ Id = "a"
+ }
+ }
+ };
+
+ _mocker.Setup>(x => x.Users).Returns(new List
+ {
+ new OmbiUser
+ {
+ Id = "a",
+ }
+ }.AsQueryable().BuildMock().Object);
+
+ var result = await _subject.SendMassEmail(model);
+ _mocker.Verify>(
+ x => x.Log(
+ LogLevel.Information,
+ It.IsAny(),
+ It.IsAny(),
+ It.IsAny(),
+ It.IsAny>()),
+ Times.Once);
+
+ _mocker.Verify(x => x.SendAdHoc(It.IsAny(), It.IsAny()), Times.Never);
+ }
+
+ [Test]
+ public async Task SendMassEmail_Bcc()
+ {
+ var model = new MassEmailModel
+ {
+ Body = "Test",
+ Subject = "Subject",
+ Bcc = true,
+ Users = new List
+ {
+ new OmbiUser
+ {
+ Id = "a"
+ },
+ new OmbiUser
+ {
+ Id = "b"
+ }
+ }
+ };
+
+ _mocker.Setup>(x => x.Users).Returns(new List
+ {
+ new OmbiUser
+ {
+ Id = "a",
+ Email = "Test@test.com"
+ },
+ new OmbiUser
+ {
+ Id = "b",
+ Email = "b@test.com"
+ }
+ }.AsQueryable().BuildMock().Object);
+
+ var result = await _subject.SendMassEmail(model);
+
+ _mocker.Verify(x => x.SendAdHoc(It.Is(m => m.Subject == model.Subject
+ && m.Message == model.Body
+ && m.Other["bcc"] == "Test@test.com,b@test.com"), It.IsAny()), Times.Once);
+ }
+
+ [Test]
+ public async Task SendMassEmail_Bcc_NoEmails()
+ {
+ var model = new MassEmailModel
+ {
+ Body = "Test",
+ Subject = "Subject",
+ Bcc = true,
+ Users = new List
+ {
+ new OmbiUser
+ {
+ Id = "a"
+ },
+ new OmbiUser
+ {
+ Id = "b"
+ }
+ }
+ };
+
+ _mocker.Setup>(x => x.Users).Returns(new List
+ {
+ new OmbiUser
+ {
+ Id = "a",
+ },
+ new OmbiUser
+ {
+ Id = "b",
+ }
+ }.AsQueryable().BuildMock().Object);
+
+ var result = await _subject.SendMassEmail(model);
+
+ _mocker.Verify(x => x.SendAdHoc(It.IsAny(), It.IsAny()), Times.Never);
+ }
+
+ }
+}
diff --git a/src/Ombi.Core/Engine/BaseMediaEngine.cs b/src/Ombi.Core/Engine/BaseMediaEngine.cs
index 91f8a58b0..277144ab1 100644
--- a/src/Ombi.Core/Engine/BaseMediaEngine.cs
+++ b/src/Ombi.Core/Engine/BaseMediaEngine.cs
@@ -78,6 +78,32 @@ namespace Ombi.Core.Engine
return _dbTv;
}
+ protected async Task CheckCanManageRequest(BaseRequest request) {
+ var errorResult = new RequestEngineResult {
+ Result = false,
+ ErrorCode = ErrorCode.NoPermissions
+ };
+ var successResult = new RequestEngineResult { Result = true };
+
+ // Admins can always manage requests
+ var isAdmin = await IsInRole(OmbiRoles.PowerUser) || await IsInRole(OmbiRoles.Admin);
+ if (isAdmin) {
+ return successResult;
+ }
+
+ // Users with 'ManageOwnRequests' can only manage their own requests
+ var canManageOwnRequests = await IsInRole(OmbiRoles.ManageOwnRequests);
+ if (!canManageOwnRequests) {
+ return errorResult;
+ }
+ var isRequestedBySameUser = ( await GetUser() ).Id == request.RequestedUser?.Id;
+ if (isRequestedBySameUser) {
+ return successResult;
+ }
+
+ return errorResult;
+ }
+
public RequestCountModel RequestCount()
{
var movieQuery = MovieRepository.GetAll();
diff --git a/src/Ombi.Core/Engine/IMusicRequestEngine.cs b/src/Ombi.Core/Engine/IMusicRequestEngine.cs
index 4dbb3b16a..fcdb06496 100644
--- a/src/Ombi.Core/Engine/IMusicRequestEngine.cs
+++ b/src/Ombi.Core/Engine/IMusicRequestEngine.cs
@@ -18,7 +18,7 @@ namespace Ombi.Core.Engine
Task GetTotal();
Task MarkAvailable(int modelId);
Task MarkUnavailable(int modelId);
- Task RemoveAlbumRequest(int requestId);
+ Task RemoveAlbumRequest(int requestId);
Task RequestAlbum(MusicAlbumRequestViewModel model);
Task> SearchAlbumRequest(string search);
Task UserHasRequest(string userId);
diff --git a/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs b/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs
index dfcd1b1da..7cc64bee2 100644
--- a/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs
+++ b/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs
@@ -14,7 +14,7 @@ namespace Ombi.Core.Engine.Interfaces
Task> SearchMovieRequest(string search);
Task RequestCollection(int collectionId, CancellationToken cancellationToken);
- Task RemoveMovieRequest(int requestId);
+ Task RemoveMovieRequest(int requestId);
Task RemoveAllMovieRequests();
Task GetRequest(int requestId);
Task UpdateMovieRequest(MovieRequests request);
diff --git a/src/Ombi.Core/Engine/Interfaces/ITvRequestEngine.cs b/src/Ombi.Core/Engine/Interfaces/ITvRequestEngine.cs
index c93403b3e..6fdf52c56 100644
--- a/src/Ombi.Core/Engine/Interfaces/ITvRequestEngine.cs
+++ b/src/Ombi.Core/Engine/Interfaces/ITvRequestEngine.cs
@@ -20,7 +20,7 @@ namespace Ombi.Core.Engine.Interfaces
Task UpdateTvRequest(TvRequests request);
Task> GetAllChldren(int tvId);
Task UpdateChildRequest(ChildRequests request);
- Task RemoveTvChild(int requestId);
+ Task RemoveTvChild(int requestId);
Task ApproveChildRequest(int id);
Task> GetRequestsLite();
Task UpdateQualityProfile(int requestId, int profileId);
diff --git a/src/Ombi.Core/Engine/Interfaces/ITvSearchEngineV2.cs b/src/Ombi.Core/Engine/Interfaces/ITvSearchEngineV2.cs
index 25a3c2621..2e01e739e 100644
--- a/src/Ombi.Core/Engine/Interfaces/ITvSearchEngineV2.cs
+++ b/src/Ombi.Core/Engine/Interfaces/ITvSearchEngineV2.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+using Ombi.Api.TheMovieDb.Models;
using Ombi.Core.Models.Search;
using Ombi.Core.Models.Search.V2;
@@ -10,6 +11,7 @@ namespace Ombi.Core
{
Task GetShowInformation(string tvdbid, CancellationToken token);
Task GetShowByRequest(int requestId, CancellationToken token);
+ Task GetTvByActor(int actorId, string langCode);
Task> GetStreamInformation(int movieDbId, CancellationToken cancellationToken);
Task> Popular(int currentlyLoaded, int amountToLoad, string langCustomCode = null);
Task> Anticipated(int currentlyLoaded, int amountToLoad);
diff --git a/src/Ombi.Core/Engine/MovieRequestEngine.cs b/src/Ombi.Core/Engine/MovieRequestEngine.cs
index 63aa0d376..0d0234fc6 100644
--- a/src/Ombi.Core/Engine/MovieRequestEngine.cs
+++ b/src/Ombi.Core/Engine/MovieRequestEngine.cs
@@ -654,11 +654,20 @@ namespace Ombi.Core.Engine
///
/// The request identifier.
///
- public async Task RemoveMovieRequest(int requestId)
+ public async Task RemoveMovieRequest(int requestId)
{
var request = await MovieRepository.GetAll().FirstOrDefaultAsync(x => x.Id == requestId);
+
+ var result = await CheckCanManageRequest(request);
+ if (result.IsError)
+ return result;
+
await MovieRepository.Delete(request);
await _mediaCacheService.Purge();
+ return new RequestEngineResult
+ {
+ Result = true,
+ };
}
public async Task RemoveAllMovieRequests()
diff --git a/src/Ombi.Core/Engine/MusicRequestEngine.cs b/src/Ombi.Core/Engine/MusicRequestEngine.cs
index d0a9cc5d7..b9aa183d2 100644
--- a/src/Ombi.Core/Engine/MusicRequestEngine.cs
+++ b/src/Ombi.Core/Engine/MusicRequestEngine.cs
@@ -404,10 +404,20 @@ namespace Ombi.Core.Engine
///
/// The request identifier.
///
- public async Task RemoveAlbumRequest(int requestId)
+ public async Task RemoveAlbumRequest(int requestId)
{
var request = await MusicRepository.GetAll().FirstOrDefaultAsync(x => x.Id == requestId);
+
+ var result = await CheckCanManageRequest(request);
+ if (result.IsError)
+ return result;
+
await MusicRepository.Delete(request);
+
+ return new RequestEngineResult
+ {
+ Result = true,
+ };
}
public async Task UserHasRequest(string userId)
diff --git a/src/Ombi.Core/Engine/RequestEngineResult.cs b/src/Ombi.Core/Engine/RequestEngineResult.cs
index 08c61b7ae..a2f4f93f4 100644
--- a/src/Ombi.Core/Engine/RequestEngineResult.cs
+++ b/src/Ombi.Core/Engine/RequestEngineResult.cs
@@ -7,7 +7,7 @@ namespace Ombi.Core.Engine
{
public bool Result { get; set; }
public string Message { get; set; }
- public bool IsError => !string.IsNullOrEmpty(ErrorMessage);
+ public bool IsError => ( !string.IsNullOrEmpty(ErrorMessage) || ErrorCode != null );
public string ErrorMessage { get; set; }
public ErrorCode? ErrorCode { get; set; }
public int RequestId { get; set; }
diff --git a/src/Ombi.Core/Engine/TvRequestEngine.cs b/src/Ombi.Core/Engine/TvRequestEngine.cs
index fd306f951..c05a23a48 100644
--- a/src/Ombi.Core/Engine/TvRequestEngine.cs
+++ b/src/Ombi.Core/Engine/TvRequestEngine.cs
@@ -749,10 +749,14 @@ namespace Ombi.Core.Engine
return request;
}
- public async Task RemoveTvChild(int requestId)
+ public async Task RemoveTvChild(int requestId)
{
var request = await TvRepository.GetChild().FirstOrDefaultAsync(x => x.Id == requestId);
+ var result = await CheckCanManageRequest(request);
+ if (result.IsError)
+ return result;
+
TvRepository.Db.ChildRequests.Remove(request);
var all = TvRepository.Db.TvRequests.Include(x => x.ChildRequests);
var parent = all.FirstOrDefault(x => x.Id == request.ParentRequestId);
@@ -766,6 +770,11 @@ namespace Ombi.Core.Engine
await TvRepository.Db.SaveChangesAsync();
await _mediaCacheService.Purge();
+
+ return new RequestEngineResult
+ {
+ Result = true,
+ };
}
public async Task RemoveTvRequest(int requestId)
diff --git a/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs b/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs
index e865c6465..7c69e4d5d 100644
--- a/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs
+++ b/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs
@@ -323,6 +323,7 @@ namespace Ombi.Core.Engine.V2
public async Task GetMoviesByActor(int actorId, string langCode)
{
+ langCode = await DefaultLanguageCode(langCode);
var result = await Cache.GetOrAddAsync(nameof(GetMoviesByActor) + actorId + langCode,
() => MovieApi.GetActorMovieCredits(actorId, langCode), DateTimeOffset.Now.AddHours(12));
// Later we run this through the rules engine
diff --git a/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs b/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs
index 26cba7c14..2fcff7439 100644
--- a/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs
+++ b/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs
@@ -147,6 +147,13 @@ namespace Ombi.Core.Engine.V2
return await processed;
}
+ public async Task GetTvByActor(int actorId, string langCode)
+ {
+ langCode = await DefaultLanguageCode(langCode);
+ var result = await Cache.GetOrAddAsync(nameof(GetTvByActor) + actorId + langCode,
+ () => _movieApi.GetActorTvCredits(actorId, langCode), DateTimeOffset.Now.AddHours(12));
+ return result;
+ }
public async Task> GetStreamInformation(int movieDbId, CancellationToken cancellationToken)
{
diff --git a/src/Ombi.Core/Models/MassEmailModel.cs b/src/Ombi.Core/Models/MassEmailModel.cs
index ad09f0cb9..e175c0886 100644
--- a/src/Ombi.Core/Models/MassEmailModel.cs
+++ b/src/Ombi.Core/Models/MassEmailModel.cs
@@ -35,6 +35,8 @@ namespace Ombi.Core.Models
public string Subject { get; set; }
public string Body { get; set; }
+ public bool Bcc { get; set; }
+
public List Users { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Ombi.Core/Ombi.Core.csproj b/src/Ombi.Core/Ombi.Core.csproj
index 857de0bab..359792e0d 100644
--- a/src/Ombi.Core/Ombi.Core.csproj
+++ b/src/Ombi.Core/Ombi.Core.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/src/Ombi.Core/Senders/MassEmailSender.cs b/src/Ombi.Core/Senders/MassEmailSender.cs
index 604224b34..106a63f49 100644
--- a/src/Ombi.Core/Senders/MassEmailSender.cs
+++ b/src/Ombi.Core/Senders/MassEmailSender.cs
@@ -25,7 +25,9 @@
// ************************************************************************/
#endregion
+using System;
using System.Collections.Generic;
+using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
@@ -64,6 +66,63 @@ namespace Ombi.Core.Senders
var customization = await _customizationService.GetSettingsAsync();
var email = await _emailService.GetSettingsAsync();
var messagesSent = new List();
+ if (model.Bcc)
+ {
+ await SendBccMails(model, customization, email, messagesSent);
+ }
+ else
+ {
+ await SendIndividualEmails(model, customization, email, messagesSent);
+ }
+
+ await Task.WhenAll(messagesSent);
+
+ return true;
+ }
+
+ private async Task SendBccMails(MassEmailModel model, CustomizationSettings customization, EmailNotificationSettings email, List messagesSent)
+ {
+ var resolver = new NotificationMessageResolver();
+ var curlys = new NotificationMessageCurlys();
+
+ var validUsers = new List();
+ foreach (var user in model.Users)
+ {
+ var fullUser = await _userManager.Users.FirstOrDefaultAsync(x => x.Id == user.Id);
+ if (!fullUser.Email.HasValue())
+ {
+ _log.LogInformation("User {0} has no email, cannot send mass email to this user", fullUser.UserName);
+ continue;
+ }
+
+ validUsers.Add(fullUser);
+ }
+
+ if (!validUsers.Any())
+ {
+ return;
+ }
+
+ var firstUser = validUsers.FirstOrDefault();
+
+ var bccAddress = string.Join(',', validUsers.Select(x => x.Email));
+ curlys.Setup(firstUser, customization);
+ var template = new NotificationTemplates() { Message = model.Body, Subject = model.Subject };
+ var content = resolver.ParseMessage(template, curlys);
+ var msg = new NotificationMessage
+ {
+ Message = content.Message,
+ Subject = content.Subject,
+ Other = new Dictionary { { "bcc", bccAddress } }
+ };
+
+ messagesSent.Add(_email.SendAdHoc(msg, email));
+ }
+
+ private async Task SendIndividualEmails(MassEmailModel model, CustomizationSettings customization, EmailNotificationSettings email, List messagesSent)
+ {
+ var resolver = new NotificationMessageResolver();
+ var curlys = new NotificationMessageCurlys();
foreach (var user in model.Users)
{
var fullUser = await _userManager.Users.FirstOrDefaultAsync(x => x.Id == user.Id);
@@ -72,8 +131,6 @@ namespace Ombi.Core.Senders
_log.LogInformation("User {0} has no email, cannot send mass email to this user", fullUser.UserName);
continue;
}
- var resolver = new NotificationMessageResolver();
- var curlys = new NotificationMessageCurlys();
curlys.Setup(fullUser, customization);
var template = new NotificationTemplates() { Message = model.Body, Subject = model.Subject };
var content = resolver.ParseMessage(template, curlys);
@@ -83,13 +140,19 @@ namespace Ombi.Core.Senders
To = fullUser.Email,
Subject = content.Subject
};
- messagesSent.Add(_email.SendAdHoc(msg, email));
+ messagesSent.Add(DelayEmail(msg, email));
_log.LogInformation("Sent mass email to user {0} @ {1}", fullUser.UserName, fullUser.Email);
}
+ }
- await Task.WhenAll(messagesSent);
-
- return true;
+ ///
+ /// This will add a 2 second delay, this is to help with concurrent connection limits
+ ///
+ ///
+ private async Task DelayEmail(NotificationMessage msg, EmailNotificationSettings email)
+ {
+ await Task.Delay(2000);
+ await _email.SendAdHoc(msg, email);
}
}
}
\ No newline at end of file
diff --git a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj
index 9d6efcd69..e65f2d5a2 100644
--- a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj
+++ b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -11,10 +11,10 @@
-
+
-
-
+
+
diff --git a/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj b/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj
index 1abcc9a8d..e228dd0d2 100644
--- a/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj
+++ b/src/Ombi.HealthChecks/Ombi.HealthChecks.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj b/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj
index 53725b2b0..370440d1c 100644
--- a/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj
+++ b/src/Ombi.Helpers.Tests/Ombi.Helpers.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
false
@@ -10,7 +10,7 @@
-
+
diff --git a/src/Ombi.Helpers/LinqHelpers.cs b/src/Ombi.Helpers/LinqHelpers.cs
index af8d44633..4e8012653 100644
--- a/src/Ombi.Helpers/LinqHelpers.cs
+++ b/src/Ombi.Helpers/LinqHelpers.cs
@@ -6,16 +6,6 @@ namespace Ombi.Helpers
{
public static class LinqHelpers
{
- public static IEnumerable DistinctBy(this IEnumerable source, Func keySelector)
- {
- HashSet knownKeys = new HashSet();
- foreach (TSource source1 in source)
- {
- if (knownKeys.Add(keySelector(source1)))
- yield return source1;
- }
- }
-
public static HashSet ToHashSet(
this IEnumerable source,
IEqualityComparer comparer = null)
diff --git a/src/Ombi.Helpers/MediaCacheService.cs b/src/Ombi.Helpers/MediaCacheService.cs
index d99090b62..8d244f4b3 100644
--- a/src/Ombi.Helpers/MediaCacheService.cs
+++ b/src/Ombi.Helpers/MediaCacheService.cs
@@ -53,17 +53,18 @@ namespace Ombi.Helpers
_memoryCache.Set(CacheKey, mediaServiceCache);
}
- public async Task Purge()
+ public Task Purge()
{
var keys = _memoryCache.Get>(CacheKey);
if (keys == null)
{
- return;
+ return Task.CompletedTask;
}
foreach (var key in keys)
{
base.Remove(key);
}
+ return Task.CompletedTask;
}
}
diff --git a/src/Ombi.Helpers/Ombi.Helpers.csproj b/src/Ombi.Helpers/Ombi.Helpers.csproj
index 2c32cc1bc..afc881d94 100644
--- a/src/Ombi.Helpers/Ombi.Helpers.csproj
+++ b/src/Ombi.Helpers/Ombi.Helpers.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/src/Ombi.Hubs/Ombi.Hubs.csproj b/src/Ombi.Hubs/Ombi.Hubs.csproj
index 613221552..fc65e2dc2 100644
--- a/src/Ombi.Hubs/Ombi.Hubs.csproj
+++ b/src/Ombi.Hubs/Ombi.Hubs.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Mapping/Ombi.Mapping.csproj b/src/Ombi.Mapping/Ombi.Mapping.csproj
index f6a5194d9..9ad1f1135 100644
--- a/src/Ombi.Mapping/Ombi.Mapping.csproj
+++ b/src/Ombi.Mapping/Ombi.Mapping.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs b/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs
index 15ec9b286..455c2d182 100644
--- a/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs
+++ b/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs
@@ -13,7 +13,7 @@ namespace Ombi.Notifications.Templates
if (string.IsNullOrEmpty(_templateLocation))
{
#if DEBUG
- _templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net5.0", "Templates",
+ _templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net6.0", "Templates",
"BasicTemplate.html");
#else
_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "Templates","BasicTemplate.html");
diff --git a/src/Ombi.Notifications.Templates/NewsletterTemplate.cs b/src/Ombi.Notifications.Templates/NewsletterTemplate.cs
index f2f0cbf12..ef31dfc4c 100644
--- a/src/Ombi.Notifications.Templates/NewsletterTemplate.cs
+++ b/src/Ombi.Notifications.Templates/NewsletterTemplate.cs
@@ -13,7 +13,7 @@ namespace Ombi.Notifications.Templates
if (string.IsNullOrEmpty(_templateLocation))
{
#if DEBUG
- _templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net5.0", "Templates", "NewsletterTemplate.html");
+ _templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "bin", "Debug", "net6.0", "Templates", "NewsletterTemplate.html");
#else
_templateLocation = Path.Combine(Directory.GetCurrentDirectory(), "Templates", "NewsletterTemplate.html");
#endif
diff --git a/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj b/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj
index 47f701083..33088a591 100644
--- a/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj
+++ b/src/Ombi.Notifications.Templates/Ombi.Notifications.Templates.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj
index 495df8cdc..b3edbcf6d 100644
--- a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj
+++ b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
Debug;Release;NonUiBuild
@@ -10,7 +10,7 @@
-
+
diff --git a/src/Ombi.Notifications/GenericEmailProvider.cs b/src/Ombi.Notifications/GenericEmailProvider.cs
index 15f17af92..fdeb1f49c 100644
--- a/src/Ombi.Notifications/GenericEmailProvider.cs
+++ b/src/Ombi.Notifications/GenericEmailProvider.cs
@@ -64,7 +64,20 @@ namespace Ombi.Notifications
MessageId = messageId
};
message.From.Add(new MailboxAddress(string.IsNullOrEmpty(settings.SenderName) ? settings.SenderAddress : settings.SenderName, settings.SenderAddress));
- message.To.Add(new MailboxAddress(model.To, model.To));
+ if (model.To.HasValue())
+ {
+ message.To.Add(new MailboxAddress(model.To, model.To));
+ }
+
+ // Check for BCC
+ if (model.Other.TryGetValue("bcc", out var bcc))
+ {
+ var bccList = bcc.Split(',', StringSplitOptions.RemoveEmptyEntries);
+ foreach (var item in bccList)
+ {
+ message.Bcc.Add(new MailboxAddress(item, item));
+ }
+ }
using (var client = new SmtpClient())
{
diff --git a/src/Ombi.Notifications/Ombi.Notifications.csproj b/src/Ombi.Notifications/Ombi.Notifications.csproj
index ab65285b3..6b497c23e 100644
--- a/src/Ombi.Notifications/Ombi.Notifications.csproj
+++ b/src/Ombi.Notifications/Ombi.Notifications.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj
index 1203d731d..fd23ee60b 100644
--- a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj
+++ b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
Debug;Release;NonUiBuild
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs b/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs
index c2cf42441..4489a045e 100644
--- a/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs
+++ b/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs
@@ -321,7 +321,9 @@ namespace Ombi.Schedule.Jobs.Ombi
public async Task DownloadAsync(string requestUri, string filename)
{
Logger.LogDebug(LoggingEvents.Updater, "Starting the DownloadAsync");
+#pragma warning disable SYSLIB0014 // Type or member is obsolete
using (var client = new WebClient())
+#pragma warning restore SYSLIB0014 // Type or member is obsolete
{
await client.DownloadFileTaskAsync(requestUri, filename);
}
diff --git a/src/Ombi.Schedule/Ombi.Schedule.csproj b/src/Ombi.Schedule/Ombi.Schedule.csproj
index 51cf46f82..ed1a7d9a1 100644
--- a/src/Ombi.Schedule/Ombi.Schedule.csproj
+++ b/src/Ombi.Schedule/Ombi.Schedule.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -11,10 +11,9 @@
-
-
+
diff --git a/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj b/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj
index d30b780c6..5f93b4b68 100644
--- a/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj
+++ b/src/Ombi.Settings.Tests/Ombi.Settings.Tests.csproj
@@ -1,6 +1,6 @@
- net5.0
+ net6.0
false
@@ -10,7 +10,7 @@
-
+
diff --git a/src/Ombi.Settings/Ombi.Settings.csproj b/src/Ombi.Settings/Ombi.Settings.csproj
index 377970b59..b39c123e2 100644
--- a/src/Ombi.Settings/Ombi.Settings.csproj
+++ b/src/Ombi.Settings/Ombi.Settings.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Ombi.Store/Ombi.Store.csproj b/src/Ombi.Store/Ombi.Store.csproj
index 99e12530f..f35da548f 100644
--- a/src/Ombi.Store/Ombi.Store.csproj
+++ b/src/Ombi.Store/Ombi.Store.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -12,14 +12,14 @@
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
-
+
diff --git a/src/Ombi.Test.Common/Ombi.Test.Common.csproj b/src/Ombi.Test.Common/Ombi.Test.Common.csproj
index deeccf52b..71b05f59c 100644
--- a/src/Ombi.Test.Common/Ombi.Test.Common.csproj
+++ b/src/Ombi.Test.Common/Ombi.Test.Common.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
8.0
Debug;Release;NonUiBuild
diff --git a/src/Ombi.Tests/Ombi.Tests.csproj b/src/Ombi.Tests/Ombi.Tests.csproj
index 9153b12d1..c38756445 100644
--- a/src/Ombi.Tests/Ombi.Tests.csproj
+++ b/src/Ombi.Tests/Ombi.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
false
@@ -9,12 +9,12 @@
-
+
-
+
diff --git a/src/Ombi.TheMovieDbApi/IMovieDbApi.cs b/src/Ombi.TheMovieDbApi/IMovieDbApi.cs
index 6d0859cef..eadfb3a3a 100644
--- a/src/Ombi.TheMovieDbApi/IMovieDbApi.cs
+++ b/src/Ombi.TheMovieDbApi/IMovieDbApi.cs
@@ -31,6 +31,7 @@ namespace Ombi.Api.TheMovieDb
Task GetTVInfo(string themoviedbid, string langCode = "en");
Task> SearchByActor(string searchTerm, string langCode);
Task GetActorMovieCredits(int actorId, string langCode);
+ Task GetActorTvCredits(int actorId, string langCode);
Task> MultiSearch(string searchTerm, string languageCode, CancellationToken cancellationToken);
Task> DiscoverMovies(string langCode, int keywordId);
Task GetFullMovieInfo(int movieId, CancellationToken cancellationToken, string langCode);
diff --git a/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj b/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj
index 6311e948c..41ac19686 100644
--- a/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj
+++ b/src/Ombi.TheMovieDbApi/Ombi.Api.TheMovieDb.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
Ombi.Api.TheMovieDb
3.0.0.0
3.0.0.0
diff --git a/src/Ombi.TheMovieDbApi/TheMovieDbApi.cs b/src/Ombi.TheMovieDbApi/TheMovieDbApi.cs
index aa46b0c8e..0391c184a 100644
--- a/src/Ombi.TheMovieDbApi/TheMovieDbApi.cs
+++ b/src/Ombi.TheMovieDbApi/TheMovieDbApi.cs
@@ -139,6 +139,16 @@ namespace Ombi.Api.TheMovieDb
var result = await Api.Request(request);
return result;
}
+
+ public async Task GetActorTvCredits(int actorId, string langCode)
+ {
+ var request = new Request($"person/{actorId}/tv_credits", BaseUri, HttpMethod.Get);
+ request.AddQueryString("api_key", ApiToken);
+ request.AddQueryString("language", langCode);
+
+ var result = await Api.Request(request);
+ return result;
+ }
public async Task> SearchTv(string searchTerm, string year = default)
{
diff --git a/src/Ombi.Updater/Ombi.Updater.csproj b/src/Ombi.Updater/Ombi.Updater.csproj
index 6c74dbe74..d31229b62 100644
--- a/src/Ombi.Updater/Ombi.Updater.csproj
+++ b/src/Ombi.Updater/Ombi.Updater.csproj
@@ -3,7 +3,7 @@
Exe
win10-x64;win10-x86;osx-x64;ubuntu-x64;debian.8-x64;centos.7-x64;linux-x64;linux-arm;linux-arm64;
- net5.0
+ net6.0
3.0.0.0
3.0.0.0
@@ -13,14 +13,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/src/Ombi/.vscode/settings.json b/src/Ombi/.vscode/settings.json
index 89d2dbd93..fd36c353d 100644
--- a/src/Ombi/.vscode/settings.json
+++ b/src/Ombi/.vscode/settings.json
@@ -10,13 +10,13 @@
"cSpell.words": [
"usermanagement"
],
- "discord.enabled": true,
"conventionalCommits.scopes": [
"discover",
"request-limits",
"notifications",
"settings",
"user-management",
- "newsletter"
+ "newsletter",
+ "mass-email"
]
}
diff --git a/src/Ombi/ClientApp/src/app/app.module.ts b/src/Ombi/ClientApp/src/app/app.module.ts
index b4e78087c..082ce80d2 100644
--- a/src/Ombi/ClientApp/src/app/app.module.ts
+++ b/src/Ombi/ClientApp/src/app/app.module.ts
@@ -65,6 +65,9 @@ import { TooltipModule } from "primeng/tooltip";
import { TranslateHttpLoader } from "@ngx-translate/http-loader";
import { UnauthorizedInterceptor } from "./auth/unauthorized.interceptor";
import { environment } from "../environments/environment";
+import { MatPaginatorIntl } from "@angular/material/paginator";
+import { TranslateService } from "@ngx-translate/core";
+import { MatPaginatorI18n } from "./localization/MatPaginatorI18n";
const routes: Routes = [
{ path: "*", component: PageNotFoundComponent },
@@ -212,6 +215,10 @@ export function JwtTokenGetter() {
useClass: UnauthorizedInterceptor,
multi: true
},
+ {
+ provide: MatPaginatorIntl, deps: [TranslateService],
+ useFactory: (translateService: TranslateService) => new MatPaginatorI18n(translateService).getPaginatorIntl()
+ },
],
bootstrap: [AppComponent],
})
diff --git a/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.html b/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.html
index a7f6a7847..67f243503 100644
--- a/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.html
+++ b/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts b/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts
index 8cdb90436..290042d87 100644
--- a/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts
+++ b/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts
@@ -1,10 +1,12 @@
import { Component } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { SearchV2Service } from "../../../services";
-import { IActorCredits } from "../../../interfaces/ISearchTvResultV2";
+import { IActorCredits, IActorCast } from "../../../interfaces/ISearchTvResultV2";
import { IDiscoverCardResult } from "../../interfaces";
import { RequestType } from "../../../interfaces";
import { AuthService } from "../../../auth/auth.service";
+import { forkJoin } from "rxjs";
+import { isEqual } from "lodash";
@Component({
templateUrl: "./discover-actor.component.html",
@@ -12,7 +14,6 @@ import { AuthService } from "../../../auth/auth.service";
})
export class DiscoverActorComponent {
public actorId: number;
- public actorCredits: IActorCredits;
public loadingFlag: boolean;
public isAdmin: boolean;
@@ -24,24 +25,32 @@ export class DiscoverActorComponent {
this.route.params.subscribe((params: any) => {
this.actorId = params.actorId;
this.isAdmin = this.auth.isAdmin();
- this.loading();
- this.searchService.getMoviesByActor(this.actorId).subscribe(res => {
- this.actorCredits = res;
- this.createModel();
- });
+ this.search();
});
}
- private createModel() {
- this.finishLoading();
+ private search() {
this.discoverResults = [];
- this.actorCredits.cast.forEach(m => {
+ this.loading();
+
+ forkJoin([
+ this.searchService.getMoviesByActor(this.actorId),
+ this.searchService.getTvByActor(this.actorId)
+ ]).subscribe(([movie, tv]) => {
+ this.pushDiscoverResults(movie.cast, RequestType.movie);
+ this.pushDiscoverResults(tv.cast, RequestType.tvShow);
+ this.finishLoading();
+ });
+ }
+
+ pushDiscoverResults(cast: IActorCast[], type: RequestType) {
+ cast.forEach(m => {
this.discoverResults.push({
available: false,
posterPath: m.poster_path ? `https://image.tmdb.org/t/p/w300/${m.poster_path}` : "../../../images/default_movie_poster.png",
requested: false,
title: m.title,
- type: RequestType.movie,
+ type: type,
id: m.id,
url: null,
rating: 0,
diff --git a/src/Ombi/ClientApp/src/app/errors/not-found.component.ts b/src/Ombi/ClientApp/src/app/errors/not-found.component.ts
index f102d0449..25269ecd1 100644
--- a/src/Ombi/ClientApp/src/app/errors/not-found.component.ts
+++ b/src/Ombi/ClientApp/src/app/errors/not-found.component.ts
@@ -1,6 +1,6 @@
import { Component } from "@angular/core";
@Component({
- template: " Page not found",
+ template: " {{ 'ErrorPages.NotFound' | translate }}",
})
export class PageNotFoundComponent { }
diff --git a/src/Ombi/ClientApp/src/app/interfaces/IUser.ts b/src/Ombi/ClientApp/src/app/interfaces/IUser.ts
index 2db5a5de2..97882e783 100644
--- a/src/Ombi/ClientApp/src/app/interfaces/IUser.ts
+++ b/src/Ombi/ClientApp/src/app/interfaces/IUser.ts
@@ -121,6 +121,7 @@ export interface IMassEmailModel {
subject: string;
body: string;
users: IUser[];
+ bcc: boolean;
}
export interface INotificationPreferences {
diff --git a/src/Ombi/ClientApp/src/app/issues/components/details/details.component.html b/src/Ombi/ClientApp/src/app/issues/components/details/details.component.html
index bc0e8a794..42a84171b 100644
--- a/src/Ombi/ClientApp/src/app/issues/components/details/details.component.html
+++ b/src/Ombi/ClientApp/src/app/issues/components/details/details.component.html
@@ -1,6 +1,6 @@
- Issues for {{details.title}}
+ {{ 'Issues.IssuesForTitle' | translate: { title: details.title} }}
{{'Issues.Requested' | translate}}
diff --git a/src/Ombi/ClientApp/src/app/localization/MatPaginatorI18n.ts b/src/Ombi/ClientApp/src/app/localization/MatPaginatorI18n.ts
new file mode 100644
index 000000000..71a86b7bd
--- /dev/null
+++ b/src/Ombi/ClientApp/src/app/localization/MatPaginatorI18n.ts
@@ -0,0 +1,34 @@
+import { MatPaginatorIntl } from '@angular/material/paginator';
+import { TranslateService } from '@ngx-translate/core';
+
+export class MatPaginatorI18n {
+
+ constructor(private translate: TranslateService) { }
+
+ getPaginatorIntl(): MatPaginatorIntl {
+ const paginatorIntl = new MatPaginatorIntl();
+ paginatorIntl.itemsPerPageLabel = this.translate.instant('Paginator.itemsPerPageLabel');
+ paginatorIntl.nextPageLabel = this.translate.instant('Paginator.nextPageLabel');
+ paginatorIntl.previousPageLabel = this.translate.instant('Paginator.previousPageLabel');
+ paginatorIntl.firstPageLabel = this.translate.instant('Paginator.firstPageLabel');
+ paginatorIntl.lastPageLabel = this.translate.instant('Paginator.lastPageLabel');
+ paginatorIntl.getRangeLabel = this.getRangeLabel.bind(this);
+ return paginatorIntl;
+ }
+
+ private getRangeLabel(page: number, pageSize: number, length: number): string {
+ if (length == 0 || pageSize == 0) {
+ return this.translate.instant('Paginator.rangePageLabel1', { length });
+ }
+
+ length = Math.max(length, 0);
+
+ const startIndex = page * pageSize;
+
+ // If the start index exceeds the list length, do not try and fix the end index to the end.
+ const endIndex =
+ startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
+
+ return this.translate.instant('Paginator.rangePageLabel2', { startIndex: startIndex + 1, endIndex, length });
+ }
+}
\ No newline at end of file
diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html
index 4e088bd69..3cfe6383a 100644
--- a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html
+++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html
@@ -143,7 +143,7 @@
0">
- Trailers
+ {{'MediaDetails.Trailers' | translate}}
diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-information-panel.component.html b/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-information-panel.component.html
index 1aafc30bf..1fa528159 100644
--- a/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-information-panel.component.html
+++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-information-panel.component.html
@@ -104,7 +104,7 @@
|