Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cdf755c20 | ||
|
|
f99ab47c01 | ||
|
|
c8c74b0ae5 | ||
|
|
de3d288949 | ||
|
|
6353cda582 | ||
|
|
1163e81adc | ||
|
|
5d06a34731 | ||
|
|
8f292d538b | ||
|
|
4809257816 | ||
|
|
02969d5426 | ||
|
|
ed94a0f335 | ||
|
|
395cbb2be6 | ||
|
|
bd947409e6 | ||
|
|
06fc98b6b9 | ||
|
|
d7b1c28406 | ||
|
|
3438045e51 | ||
|
|
4b7af86111 | ||
|
|
dd22d158ff | ||
|
|
e88dc83aeb | ||
|
|
329a814a8f | ||
|
|
a333a09582 | ||
|
|
f2ebba7b1d | ||
|
|
17518dbe7f | ||
|
|
2350f3ffd8 | ||
|
|
3dced2065f | ||
|
|
7e4175ff21 | ||
|
|
4157432aa7 | ||
|
|
941fe19904 | ||
|
|
2e0e4d5129 | ||
|
|
9f5f920c23 | ||
|
|
1fb7ea7258 | ||
|
|
3bbc716434 | ||
|
|
6898357b13 | ||
|
|
a7db01fba4 | ||
|
|
0c8a180189 | ||
|
|
0980fa54f9 | ||
|
|
32b4c99950 | ||
|
|
22002ab4c7 | ||
|
|
659fa505f0 | ||
|
|
4205e32ae7 | ||
|
|
ffe9e19c3b | ||
|
|
66ef72dd42 | ||
|
|
1056d28a26 | ||
|
|
741b2c4e9f | ||
|
|
6dbe9ea814 | ||
|
|
69fd7a5511 | ||
|
|
96328ab5c6 | ||
|
|
c31709681a | ||
|
|
4b505223b8 | ||
|
|
16e48c4919 | ||
|
|
604ba2a92f | ||
|
|
12127a7763 | ||
|
|
9a4da25faa | ||
|
|
7e8f361af7 | ||
|
|
08c22b03e0 | ||
|
|
3cee6b78a4 | ||
|
|
7083ddf181 | ||
|
|
b092361c73 | ||
|
|
6f2a71c788 | ||
|
|
22006e9dbd | ||
|
|
e7ee85c29b | ||
|
|
f35dae56a5 | ||
|
|
5deb64a87f | ||
|
|
6753d9daaa | ||
|
|
4891298891 | ||
|
|
ab9cef3624 | ||
|
|
d4d79e438c | ||
|
|
c6836e02c8 | ||
|
|
0916b58594 | ||
|
|
44a305426f | ||
|
|
764db94f1b |
@@ -189,6 +189,52 @@
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "danshilm",
|
||||
"name": "Danshil Mungur",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/20923978?v=4",
|
||||
"profile": "https://github.com/danshilm",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "doob187",
|
||||
"name": "doob187",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/60312740?v=4",
|
||||
"profile": "https://github.com/doob187",
|
||||
"contributions": [
|
||||
"infra"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "johnpyp",
|
||||
"name": "johnpyp",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/20625636?v=4",
|
||||
"profile": "https://github.com/johnpyp",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ankarhem",
|
||||
"name": "Jakob Ankarhem",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/14110063?v=4",
|
||||
"profile": "https://github.com/ankarhem",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jayesh100",
|
||||
"name": "Jayesh",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/8022175?v=4",
|
||||
"profile": "https://github.com/jayesh100",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"badgeTemplate": "<a href=\"#contributors-\"><img alt=\"All Contributors\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg\"/></a>",
|
||||
|
||||
@@ -4,7 +4,12 @@ node_modules
|
||||
.gitconfig
|
||||
.gitignore
|
||||
.github
|
||||
.all-contributorsrc
|
||||
.editorconfig
|
||||
.prettierignore
|
||||
**/README.md
|
||||
**/.vscode
|
||||
config/db/db.sqlite3
|
||||
config/db/logs/overseerr.log
|
||||
Dockerfil**
|
||||
**.md
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -2,7 +2,7 @@
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
labels: 'awaiting-triage, type:bug'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -2,7 +2,7 @@
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
labels: 'awaiting-triage, type:enhancement'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
|
||||
3
.gitignore
vendored
@@ -36,7 +36,8 @@ config/db/db.sqlite3
|
||||
config/settings.json
|
||||
|
||||
# logs
|
||||
config/logs/*.log
|
||||
config/logs/*.log*
|
||||
config/logs/*.json
|
||||
|
||||
# dist files
|
||||
dist
|
||||
|
||||
91
CHANGELOG.md
@@ -1,3 +1,94 @@
|
||||
# [1.14.0](https://github.com/sct/overseerr/compare/v1.13.0...v1.14.0) (2020-12-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **frontend:** add margin to ButtonWithDropdown component on movie/tv details page ([06fc98b](https://github.com/sct/overseerr/commit/06fc98b6b958221fa180f57f702c348f15b31f1c))
|
||||
* **frontend:** correctly position title card hover section ([#486](https://github.com/sct/overseerr/issues/486)) ([4b7af86](https://github.com/sct/overseerr/commit/4b7af86111a0300e1a137f23fa4ad1639fa55feb))
|
||||
* **frontend:** fix missing styles for alert component ([de3d288](https://github.com/sct/overseerr/commit/de3d288949b60d3a3af889d69a62bea2bc799ed7))
|
||||
* **frontend:** fix mobile dropdown in notifications settings ([6353cda](https://github.com/sct/overseerr/commit/6353cda5825f442dd539886c7b9ba437edf27ac4))
|
||||
* **frontend:** fix scaling titlecard content position ([bd94740](https://github.com/sct/overseerr/commit/bd947409e6e8ff313011b77adc76ccd5f9112c78))
|
||||
* **frontend:** improve flex header on movie/tv details page ([d7b1c28](https://github.com/sct/overseerr/commit/d7b1c2840690c144ebf29a360defcbd6fdb21354))
|
||||
* **frontend:** invalid dom-nesting title card fix ([#482](https://github.com/sct/overseerr/issues/482)) ([f2ebba7](https://github.com/sct/overseerr/commit/f2ebba7b1df775d33d2af6abc3ee2c9de5f2e57a)), closes [#476](https://github.com/sct/overseerr/issues/476)
|
||||
* **frontend:** remove vote permission for now ([5d06a34](https://github.com/sct/overseerr/commit/5d06a347311bd10c05d8f58068ca7104e265dcca))
|
||||
* **frontend:** sort person detail credits by tmdb votes ([17518db](https://github.com/sct/overseerr/commit/17518dbe7f545100770a892d03d1f8508adc3650))
|
||||
* **frontend:** status badge Unavailable renamed to Requested ([ed94a0f](https://github.com/sct/overseerr/commit/ed94a0f335c59de526dd812aea7616313fe002fd)), closes [#374](https://github.com/sct/overseerr/issues/374)
|
||||
* **frontend:** update titlecard status badge to new requested colors ([8f292d5](https://github.com/sct/overseerr/commit/8f292d538b937ea133175089979ef02599f6fef4))
|
||||
* **logs:** rotate logs on a daily basis instead of incrementing log filename ([395cbb2](https://github.com/sct/overseerr/commit/395cbb2be6c62f1d7573593e49a93615eaf22853))
|
||||
* improve apple-touch-icon and android app icons ([329a814](https://github.com/sct/overseerr/commit/329a814a8fb791122266c0b04b05848c71d68ba1))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lang:** translations update from Weblate ([#479](https://github.com/sct/overseerr/issues/479)) ([c8c74b0](https://github.com/sct/overseerr/commit/c8c74b0ae54fcc524aa8b2edf5a5c5e5db6c1638))
|
||||
* **notifications:** add slack notification agent ([1163e81](https://github.com/sct/overseerr/commit/1163e81adc7da1e8334155ebee5b4672a22143db)), closes [#365](https://github.com/sct/overseerr/issues/365)
|
||||
* add collections ([#484](https://github.com/sct/overseerr/issues/484)) ([a333a09](https://github.com/sct/overseerr/commit/a333a095820ce3f10857026ba4770a2fffeed7cb)), closes [#418](https://github.com/sct/overseerr/issues/418)
|
||||
* add separate auto approve permissions for Movies/Series ([4809257](https://github.com/sct/overseerr/commit/480925781691de456abc427fbbba161be11a3a8a)), closes [#268](https://github.com/sct/overseerr/issues/268)
|
||||
* simple failed request handling ([#474](https://github.com/sct/overseerr/issues/474)) ([02969d5](https://github.com/sct/overseerr/commit/02969d5426245062a2f53475d83c4a8639632c9d))
|
||||
* YouTube Movie/TV Trailers ([#454](https://github.com/sct/overseerr/issues/454)) ([e88dc83](https://github.com/sct/overseerr/commit/e88dc83aeba0475e3ad421d5ab130cea4fc9a806))
|
||||
|
||||
# [1.13.0](https://github.com/sct/overseerr/compare/v1.12.1...v1.13.0) (2020-12-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **api:** correctly return firstAirDate for series in search endpoints ([32b4c99](https://github.com/sct/overseerr/commit/32b4c99950659d9e1da2ffa93c22383c54d0d904)), closes [#462](https://github.com/sct/overseerr/issues/462)
|
||||
* **email:** correctly log errors when emails fail to send ([0980fa5](https://github.com/sct/overseerr/commit/0980fa54f9fc3bdfae6c57fa5a20ce3b2a88a677))
|
||||
* **frontend:** added new Radarr v3 logo ([#471](https://github.com/sct/overseerr/issues/471)) ([3bbc716](https://github.com/sct/overseerr/commit/3bbc716434dc04bfe6b55de9898eb2c0ecb03baa))
|
||||
* **frontend:** approve and decline button (in manage panel) will now fit on mobile ([#441](https://github.com/sct/overseerr/issues/441)) ([66ef72d](https://github.com/sct/overseerr/commit/66ef72dd42912d83ea8f86aabb75fbee547f8de9))
|
||||
* **frontend:** filter out undefined backdrop paths for person details page ([2e0e4d5](https://github.com/sct/overseerr/commit/2e0e4d5129ed4912415f61eb8d1da41e88ddcaff))
|
||||
* **frontend:** show backdrops instead of posters for new person detail design ([9f5f920](https://github.com/sct/overseerr/commit/9f5f920c23007363aa7f53ebef0b61236d4f53ea))
|
||||
* clarify full sync runs every 24 hours ([0c8a180](https://github.com/sct/overseerr/commit/0c8a180189b2610bab2fa977d458743d8a60343e))
|
||||
* **plex-sync:** match correct tmdb format for movies ([4205e32](https://github.com/sct/overseerr/commit/4205e32ae71bc18c07209f1c82e6af1cb5f01335))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **email:** option to allow self signed certificates ([6898357](https://github.com/sct/overseerr/commit/6898357b13a6aa53a55709ea95819c2b3df6784c))
|
||||
* **frontend:** adjust person details design and add improved truncate ([1fb7ea7](https://github.com/sct/overseerr/commit/1fb7ea72589d2908ae80a2a688881d4eb3c050e5))
|
||||
* **frontend:** first air date added to TV details page ([#470](https://github.com/sct/overseerr/issues/470)) ([a7db01f](https://github.com/sct/overseerr/commit/a7db01fba483ca633a6eb9d39eb085ab9939d4d2))
|
||||
* **lang:** translations update from Weblate ([#410](https://github.com/sct/overseerr/issues/410)) ([941fe19](https://github.com/sct/overseerr/commit/941fe1990454439cf05b48ef92bd3493432f8ed8))
|
||||
* **logs:** rotate log files if they reach 20MB in size ([22002ab](https://github.com/sct/overseerr/commit/22002ab4c76aace2bb202ac58da605b7a6f75d6d)), closes [#438](https://github.com/sct/overseerr/issues/438)
|
||||
* **notifications:** include direct links to media in notifications ([659fa50](https://github.com/sct/overseerr/commit/659fa505f0db32262ad0041cddb4daea893e6d65)), closes [#437](https://github.com/sct/overseerr/issues/437)
|
||||
* **plex-sync:** add support for hama guid's ([ffe9e19](https://github.com/sct/overseerr/commit/ffe9e19c3b99de6af1185900e292da641ff44320)), closes [#453](https://github.com/sct/overseerr/issues/453)
|
||||
|
||||
## [1.12.1](https://github.com/sct/overseerr/compare/v1.12.0...v1.12.1) (2020-12-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **migration:** fixes issue migrating away from the unique imdbId constraint ([69fd7a5](https://github.com/sct/overseerr/commit/69fd7a5511215674a5c22ba48627f221da900229))
|
||||
|
||||
# [1.12.0](https://github.com/sct/overseerr/compare/v1.11.0...v1.12.0) (2020-12-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **api:** fix cross-imported type crashing build ([f35dae5](https://github.com/sct/overseerr/commit/f35dae56a583a5545375318fa5be994ae1f2557f))
|
||||
* **api:** prevent checking first admin account for plex server access ([22006e9](https://github.com/sct/overseerr/commit/22006e9dbde82609440f89bde9a40887b4742682))
|
||||
* **frontend:** add name, short_name and start_url to manifest ([#424](https://github.com/sct/overseerr/issues/424)) ([c6836e0](https://github.com/sct/overseerr/commit/c6836e02c810e8adb12c3a4b110f9604cf5b7b81))
|
||||
* **frontend:** adjust person card layout to deal with overflowing content ([4891298](https://github.com/sct/overseerr/commit/48912988915ae40606a900a6f1dd23fc25ed567f)), closes [#416](https://github.com/sct/overseerr/issues/416)
|
||||
* **frontend:** allow more special characters in search input ([5deb64a](https://github.com/sct/overseerr/commit/5deb64a87fd70e97da27a025ad11fb8ace0e0b57)), closes [#430](https://github.com/sct/overseerr/issues/430)
|
||||
* **logs:** improve logging when adding to sonarr/radarr ([4b50522](https://github.com/sct/overseerr/commit/4b505223b881a750007e3fbc7d4bcb9677d4d412))
|
||||
* only run migrations in production ([ab9cef3](https://github.com/sct/overseerr/commit/ab9cef3624b5db1ec03507553a69d33b87857e29))
|
||||
* **notifications:** always update the media table when seasons become available ([0916b58](https://github.com/sct/overseerr/commit/0916b58594a00db98c6701fdcaee4f3c3e08904e))
|
||||
* **plex-sync:** fixes processing movies using TMDB agent ([764db94](https://github.com/sct/overseerr/commit/764db94f1bd7866309684d5bd56033b21cbc2e0c)), closes [#363](https://github.com/sct/overseerr/issues/363)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **frontend:** add crew related movies/shows to person details page ([12127a7](https://github.com/sct/overseerr/commit/12127a77633f0e92ae88cbafd49581296f559c33))
|
||||
* **frontend:** add full crew page for movies/shows ([604ba2a](https://github.com/sct/overseerr/commit/604ba2a92f1d59489e7fc6dfc011347f8595c123))
|
||||
* default user permissions added to settings ([e7ee85c](https://github.com/sct/overseerr/commit/e7ee85c29b5d25c6bff58717eae5e62de4dcef0c)), closes [#388](https://github.com/sct/overseerr/issues/388)
|
||||
* import users from plex ([#428](https://github.com/sct/overseerr/issues/428)) ([7e8f361](https://github.com/sct/overseerr/commit/7e8f361af711001cfc4dcc06a384b76f9846f90f)), closes [#281](https://github.com/sct/overseerr/issues/281)
|
||||
* **frontend:** add prioritized crew under overview ([6753d9d](https://github.com/sct/overseerr/commit/6753d9daaafb18672f14fd86f2c1675dcec39b13)), closes [#406](https://github.com/sct/overseerr/issues/406)
|
||||
* **notifications:** added ability to send test notifications ([44a3054](https://github.com/sct/overseerr/commit/44a305426f3e9829c167a4a73095d0d248641f47)), closes [#309](https://github.com/sct/overseerr/issues/309)
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* **deps:** revert react-use-clipboard to 1.0.2 ([7083ddf](https://github.com/sct/overseerr/commit/7083ddf18121716e3442acab3506c395fdc351ac))
|
||||
|
||||
# [1.11.0](https://github.com/sct/overseerr/compare/v1.10.0...v1.11.0) (2020-12-20)
|
||||
|
||||
|
||||
|
||||
@@ -14,16 +14,46 @@ All help is welcome and greatly appreciated. If you would like to contribute to
|
||||
### Getting Started
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) the repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.
|
||||
2. Create a new branch `git checkout -b BRANCH_NAME`
|
||||
```
|
||||
git clone https://github.com/YOUR_USERNAME/overseerr.git
|
||||
cd overseerr/
|
||||
```
|
||||
2. Add the remote upstream.
|
||||
|
||||
- Its recommended to name the branch something relevant to the feature or fix you are working on.
|
||||
- An example of this would be `fix-title-cards` or `feature-new-system`.
|
||||
- Bad examples would be `patch` or `bug`.
|
||||
```
|
||||
git remote add upstream https://github.com/sct/overseerr.git
|
||||
```
|
||||
|
||||
3. Install dependencies `yarn`
|
||||
4. `yarn dev` to build and watch for changes
|
||||
3. Create a new branch
|
||||
|
||||
You can also run the development environment in [Docker](https://www.docker.com/) with `docker-compose up -d`. This method does not require installing NodeJS or Yarn on your machine directly.
|
||||
```
|
||||
git checkout -b BRANCH_NAME develop
|
||||
```
|
||||
|
||||
- Its recommended to name the branch something relevant to the feature or fix you are working on.
|
||||
- An example of this would be `fix-title-cards` or `feature-new-system`.
|
||||
- Bad examples would be `patch` or `bug`.
|
||||
|
||||
4. Run development environment
|
||||
|
||||
```
|
||||
yarn
|
||||
yarn install
|
||||
```
|
||||
|
||||
- Alternatively you can run using [Docker](https://www.docker.com/) with `docker-compose up -d`. This method does not require installing NodeJS or Yarn on your machine directly.
|
||||
|
||||
5. Create your patch and run appropriate tests.
|
||||
|
||||
6. Follow the [guidelines](#contributing-code).
|
||||
|
||||
7. Should you need to update your fork you can do so by rebasing from upstream.
|
||||
|
||||
```
|
||||
git fetch upstream
|
||||
git rebase upstream/develop
|
||||
git push origin BRANCH_NAME -f
|
||||
```
|
||||
|
||||
### Contributing Code
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<a href="https://lgtm.com/projects/g/sct/overseerr/context:javascript"><img alt="Language grade: JavaScript" src="https://img.shields.io/lgtm/grade/javascript/g/sct/overseerr.svg?logo=lgtm&logoWidth=18"/></a>
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/sct/overseerr">
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
<a href="#contributors-"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-20-orange.svg"/></a>
|
||||
<a href="#contributors-"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-25-orange.svg"/></a>
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
</p>
|
||||
|
||||
@@ -123,6 +123,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
||||
<td align="center"><a href="https://github.com/Panzer1119"><img src="https://avatars1.githubusercontent.com/u/23016343?v=4" width="100px;" alt=""/><br /><sub><b>Paul Hagedorn</b></sub></a><br /><a href="#translation-Panzer1119" title="Translation">🌍</a></td>
|
||||
<td align="center"><a href="https://github.com/Shagon94"><img src="https://avatars3.githubusercontent.com/u/9140783?v=4" width="100px;" alt=""/><br /><sub><b>Shagon94</b></sub></a><br /><a href="#translation-Shagon94" title="Translation">🌍</a></td>
|
||||
<td align="center"><a href="https://github.com/sebstrgg"><img src="https://avatars3.githubusercontent.com/u/27026694?v=4" width="100px;" alt=""/><br /><sub><b>sebstrgg</b></sub></a><br /><a href="#translation-sebstrgg" title="Translation">🌍</a></td>
|
||||
<td align="center"><a href="https://github.com/danshilm"><img src="https://avatars2.githubusercontent.com/u/20923978?v=4" width="100px;" alt=""/><br /><sub><b>Danshil Mungur</b></sub></a><br /><a href="https://github.com/sct/overseerr/commits?author=danshilm" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/doob187"><img src="https://avatars1.githubusercontent.com/u/60312740?v=4" width="100px;" alt=""/><br /><sub><b>doob187</b></sub></a><br /><a href="#infra-doob187" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
||||
<td align="center"><a href="https://github.com/johnpyp"><img src="https://avatars2.githubusercontent.com/u/20625636?v=4" width="100px;" alt=""/><br /><sub><b>johnpyp</b></sub></a><br /><a href="https://github.com/sct/overseerr/commits?author=johnpyp" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/ankarhem"><img src="https://avatars1.githubusercontent.com/u/14110063?v=4" width="100px;" alt=""/><br /><sub><b>Jakob Ankarhem</b></sub></a><br /><a href="https://github.com/sct/overseerr/commits?author=ankarhem" title="Documentation">📖</a> <a href="https://github.com/sct/overseerr/commits?author=ankarhem" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/jayesh100"><img src="https://avatars1.githubusercontent.com/u/8022175?v=4" width="100px;" alt=""/><br /><sub><b>Jayesh</b></sub></a><br /><a href="https://github.com/sct/overseerr/commits?author=jayesh100" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ const devConfig = {
|
||||
type: 'sqlite',
|
||||
database: 'config/db/db.sqlite3',
|
||||
synchronize: true,
|
||||
migrationsRun: false,
|
||||
logging: false,
|
||||
entities: ['server/entity/**/*.ts'],
|
||||
migrations: ['server/migration/**/*.ts'],
|
||||
@@ -19,7 +20,7 @@ const prodConfig = {
|
||||
logging: false,
|
||||
entities: ['dist/entity/**/*.js'],
|
||||
migrations: ['dist/migration/**/*.js'],
|
||||
migrationsRun: true,
|
||||
migrationsRun: false,
|
||||
subscribers: ['dist/subscriber/**/*.js'],
|
||||
cli: {
|
||||
entitiesDir: 'dist/entity',
|
||||
|
||||
@@ -58,6 +58,9 @@ components:
|
||||
applicationUrl:
|
||||
type: string
|
||||
example: https://os.example.com
|
||||
defaultPermissions:
|
||||
type: number
|
||||
example: 32
|
||||
PlexLibrary:
|
||||
type: object
|
||||
properties:
|
||||
@@ -380,6 +383,36 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
RelatedVideo:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
example: https://www.youtube.com/watch?v=9qhL2_UxXM0/
|
||||
key:
|
||||
type: string
|
||||
example: 9qhL2_UxXM0
|
||||
name:
|
||||
type: string
|
||||
example: Trailer for some movie (1978)
|
||||
size:
|
||||
type: number
|
||||
example: 1080
|
||||
type:
|
||||
type: string
|
||||
example: Trailer
|
||||
enum:
|
||||
- Clip
|
||||
- Teaser
|
||||
- Trailer
|
||||
- Featurette
|
||||
- Opening Credits
|
||||
- Behind the Scenes
|
||||
- Bloopers
|
||||
site:
|
||||
type: string
|
||||
enum:
|
||||
- 'YouTube'
|
||||
MovieDetails:
|
||||
type: object
|
||||
properties:
|
||||
@@ -405,6 +438,10 @@ components:
|
||||
$ref: '#/components/schemas/Genre'
|
||||
homepage:
|
||||
type: string
|
||||
relatedVideos:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/RelatedVideo'
|
||||
originalLanguage:
|
||||
type: string
|
||||
originalTitle:
|
||||
@@ -460,6 +497,19 @@ components:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Crew'
|
||||
collection:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
example: 1
|
||||
name:
|
||||
type: string
|
||||
example: A collection
|
||||
posterPath:
|
||||
type: string
|
||||
backdropPath:
|
||||
type: string
|
||||
externalIds:
|
||||
$ref: '#/components/schemas/ExternalIds'
|
||||
mediaInfo:
|
||||
@@ -791,6 +841,20 @@ components:
|
||||
properties:
|
||||
webhookUrl:
|
||||
type: string
|
||||
SlackSettings:
|
||||
type: object
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
example: false
|
||||
types:
|
||||
type: number
|
||||
example: 2
|
||||
options:
|
||||
type: object
|
||||
properties:
|
||||
webhookUrl:
|
||||
type: string
|
||||
NotificationEmailSettings:
|
||||
type: object
|
||||
properties:
|
||||
@@ -821,7 +885,9 @@ components:
|
||||
authPass:
|
||||
type: string
|
||||
nullable: true
|
||||
|
||||
allowSelfSigned:
|
||||
type: boolean
|
||||
example: false
|
||||
PersonDetail:
|
||||
type: object
|
||||
properties:
|
||||
@@ -986,6 +1052,26 @@ components:
|
||||
name:
|
||||
type: string
|
||||
example: 'English'
|
||||
Collection:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
example: 123
|
||||
name:
|
||||
type: string
|
||||
example: A Movie Collection
|
||||
overview:
|
||||
type: string
|
||||
example: Overview of collection
|
||||
posterPath:
|
||||
type: string
|
||||
backdropPath:
|
||||
type: string
|
||||
parts:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MovieResult'
|
||||
securitySchemes:
|
||||
cookieAuth:
|
||||
type: apiKey
|
||||
@@ -1488,6 +1574,21 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NotificationEmailSettings'
|
||||
/settings/notifications/email/test:
|
||||
post:
|
||||
summary: Test the provided email settings
|
||||
description: Sends a test notification to the email agent
|
||||
tags:
|
||||
- settings
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NotificationEmailSettings'
|
||||
responses:
|
||||
'204':
|
||||
description: Test notification attempted
|
||||
/settings/notifications/discord:
|
||||
get:
|
||||
summary: Return current discord notification settings
|
||||
@@ -1519,6 +1620,67 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DiscordSettings'
|
||||
/settings/notifications/discord/test:
|
||||
post:
|
||||
summary: Test the provided discord settings
|
||||
description: Sends a test notification to the discord agent
|
||||
tags:
|
||||
- settings
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DiscordSettings'
|
||||
responses:
|
||||
'204':
|
||||
description: Test notification attempted
|
||||
/settings/notifications/slack:
|
||||
get:
|
||||
summary: Return current slack notification settings
|
||||
description: Returns current slack notification settings in JSON format
|
||||
tags:
|
||||
- settings
|
||||
responses:
|
||||
'200':
|
||||
description: Returned slack settings
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SlackSettings'
|
||||
post:
|
||||
summary: Update slack notification settings
|
||||
description: Update current slack notification settings with provided values
|
||||
tags:
|
||||
- settings
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SlackSettings'
|
||||
responses:
|
||||
'200':
|
||||
description: 'Values were sucessfully updated'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SlackSettings'
|
||||
/settings/notifications/slack/test:
|
||||
post:
|
||||
summary: Test the provided slack settings
|
||||
description: Sends a test notification to the slack agent
|
||||
tags:
|
||||
- settings
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SlackSettings'
|
||||
responses:
|
||||
'204':
|
||||
description: Test notification attempted
|
||||
/settings/about:
|
||||
get:
|
||||
summary: Return current about stats
|
||||
@@ -1640,6 +1802,25 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
/user/import-from-plex:
|
||||
post:
|
||||
summary: Imports all users from Plex
|
||||
description: |
|
||||
Requests users from the Plex Server and creates a new user for each of them
|
||||
|
||||
Requires the `MANAGE_USERS` permission.
|
||||
tags:
|
||||
- users
|
||||
responses:
|
||||
'201':
|
||||
description: A list of the newly created users
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/User'
|
||||
|
||||
/user/{userId}:
|
||||
get:
|
||||
summary: Retrieve a user by ID
|
||||
@@ -2079,6 +2260,30 @@ paths:
|
||||
responses:
|
||||
'204':
|
||||
description: Succesfully removed request
|
||||
/request/{requestId}/retry:
|
||||
post:
|
||||
summary: Retry a failed request
|
||||
description: |
|
||||
Retries a request by resending requests to Sonarr or Radarr
|
||||
|
||||
Requires the `MANAGE_REQUESTS` permission or `ADMIN`
|
||||
tags:
|
||||
- request
|
||||
parameters:
|
||||
- in: path
|
||||
name: requestId
|
||||
description: Request ID
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Retry triggered
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/MediaRequest'
|
||||
/request/{requestId}/{status}:
|
||||
get:
|
||||
summary: Update a requests status
|
||||
@@ -2573,6 +2778,31 @@ paths:
|
||||
responses:
|
||||
'204':
|
||||
description: Succesfully removed media item
|
||||
/collection/{collectionId}:
|
||||
get:
|
||||
summary: Request collection details
|
||||
description: Returns back full collection details in JSON format
|
||||
tags:
|
||||
- collection
|
||||
parameters:
|
||||
- in: path
|
||||
name: collectionId
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
example: 537982
|
||||
- in: query
|
||||
name: language
|
||||
schema:
|
||||
type: string
|
||||
example: en
|
||||
responses:
|
||||
'200':
|
||||
description: Collection details
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Collection'
|
||||
|
||||
security:
|
||||
- cookieAuth: []
|
||||
|
||||
38
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "overseerr",
|
||||
"version": "1.11.0",
|
||||
"version": "1.14.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "nodemon -e ts --watch server --watch overseerr-api.yml -e .json,.ts,.yml -x ts-node --files --project server/tsconfig.json server/index.ts",
|
||||
@@ -25,39 +25,41 @@
|
||||
"cookie-parser": "^1.4.5",
|
||||
"email-templates": "^8.0.2",
|
||||
"express": "^4.17.1",
|
||||
"express-openapi-validator": "^4.8.0",
|
||||
"express-openapi-validator": "^4.9.4",
|
||||
"express-session": "^1.17.1",
|
||||
"formik": "^2.2.5",
|
||||
"formik": "^2.2.6",
|
||||
"intl": "^1.2.5",
|
||||
"lodash": "^4.17.20",
|
||||
"next": "^10.0.3",
|
||||
"node-schedule": "^1.3.2",
|
||||
"nodemailer": "^6.4.16",
|
||||
"nodemailer": "^6.4.17",
|
||||
"nookies": "^2.5.0",
|
||||
"plex-api": "^5.3.1",
|
||||
"pug": "^3.0.0",
|
||||
"react": "17.0.1",
|
||||
"react-dom": "17.0.1",
|
||||
"react-intersection-observer": "^8.31.0",
|
||||
"react-intl": "^5.10.6",
|
||||
"react-intl": "^5.10.9",
|
||||
"react-markdown": "^5.0.3",
|
||||
"react-spring": "^8.0.27",
|
||||
"react-toast-notifications": "^2.4.0",
|
||||
"react-transition-group": "^4.4.1",
|
||||
"react-truncate-markup": "^5.0.1",
|
||||
"react-use-clipboard": "1.0.2",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"sqlite3": "^5.0.0",
|
||||
"swagger-ui-express": "^4.1.5",
|
||||
"swr": "^0.3.9",
|
||||
"swr": "^0.3.11",
|
||||
"typeorm": "^0.2.29",
|
||||
"uuid": "^8.3.2",
|
||||
"winston": "^3.3.3",
|
||||
"winston-daily-rotate-file": "^4.5.0",
|
||||
"xml2js": "^0.4.23",
|
||||
"yamljs": "^0.3.0",
|
||||
"yup": "^0.32.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.12.8",
|
||||
"@babel/cli": "^7.12.10",
|
||||
"@commitlint/cli": "^11.0.0",
|
||||
"@commitlint/config-conventional": "^11.0.0",
|
||||
"@semantic-release/changelog": "^5.0.1",
|
||||
@@ -73,7 +75,7 @@
|
||||
"@types/express": "^4.17.9",
|
||||
"@types/express-session": "^1.17.0",
|
||||
"@types/lodash": "^4.14.165",
|
||||
"@types/node": "^14.14.11",
|
||||
"@types/node": "^14.14.14",
|
||||
"@types/node-schedule": "^1.3.1",
|
||||
"@types/nodemailer": "^6.4.0",
|
||||
"@types/react": "^17.0.0",
|
||||
@@ -84,24 +86,24 @@
|
||||
"@types/uuid": "^8.3.0",
|
||||
"@types/xml2js": "^0.4.7",
|
||||
"@types/yamljs": "^0.2.31",
|
||||
"@types/yup": "^0.29.10",
|
||||
"@typescript-eslint/eslint-plugin": "^4.9.1",
|
||||
"@typescript-eslint/parser": "^4.9.1",
|
||||
"@types/yup": "^0.29.11",
|
||||
"@typescript-eslint/eslint-plugin": "^4.10.0",
|
||||
"@typescript-eslint/parser": "^4.10.0",
|
||||
"autoprefixer": "^9",
|
||||
"babel-plugin-react-intl": "^8.2.21",
|
||||
"babel-plugin-react-intl": "^8.2.22",
|
||||
"babel-plugin-react-intl-auto": "^3.3.0",
|
||||
"commitizen": "^4.2.2",
|
||||
"copyfiles": "^2.4.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint": "^7.15.0",
|
||||
"eslint-config-prettier": "^7.0.0",
|
||||
"eslint-plugin-formatjs": "^2.9.10",
|
||||
"eslint": "^7.16.0",
|
||||
"eslint-config-prettier": "^7.1.0",
|
||||
"eslint-plugin-formatjs": "^2.9.11",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-prettier": "^3.2.0",
|
||||
"eslint-plugin-prettier": "^3.3.0",
|
||||
"eslint-plugin-react": "^7.21.5",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"extract-react-intl-messages": "^4.1.1",
|
||||
"husky": "^4.3.5",
|
||||
"husky": "^4.3.6",
|
||||
"lint-staged": "^10.5.3",
|
||||
"nodemon": "^2.0.6",
|
||||
"postcss": "^7",
|
||||
@@ -111,7 +113,7 @@
|
||||
"semantic-release-docker": "^2.2.0",
|
||||
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.1.2"
|
||||
"typescript": "^4.1.3"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 10 KiB |
@@ -1 +1,20 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#1e2937","display":"standalone"}
|
||||
{
|
||||
"name": "Overseerr",
|
||||
"short_name": "Overseerr",
|
||||
"start_url": "./",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#2d3748",
|
||||
"background_color": "#2d3748",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
||||
@@ -56,6 +56,21 @@ interface FriendResponse {
|
||||
};
|
||||
}
|
||||
|
||||
interface UsersResponse {
|
||||
MediaContainer: {
|
||||
User: {
|
||||
$: {
|
||||
id: string;
|
||||
title: string;
|
||||
username: string;
|
||||
email: string;
|
||||
thumb: string;
|
||||
};
|
||||
Server: ServerResponse[];
|
||||
}[];
|
||||
};
|
||||
}
|
||||
|
||||
class PlexTvAPI {
|
||||
private authToken: string;
|
||||
private axios: AxiosInstance;
|
||||
@@ -129,6 +144,18 @@ class PlexTvAPI {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public async getUsers(): Promise<UsersResponse> {
|
||||
const response = await this.axios.get('/api/users', {
|
||||
transformResponse: [],
|
||||
responseType: 'text',
|
||||
});
|
||||
|
||||
const parsedXml = (await xml2js.parseStringPromise(
|
||||
response.data
|
||||
)) as UsersResponse;
|
||||
return parsedXml;
|
||||
}
|
||||
}
|
||||
|
||||
export default PlexTvAPI;
|
||||
|
||||
@@ -76,9 +76,9 @@ class RadarrAPI {
|
||||
}
|
||||
};
|
||||
|
||||
public addMovie = async (options: RadarrMovieOptions): Promise<void> => {
|
||||
public addMovie = async (options: RadarrMovieOptions): Promise<boolean> => {
|
||||
try {
|
||||
await this.axios.post<RadarrMovie>(`/movie`, {
|
||||
const response = await this.axios.post<RadarrMovie>(`/movie`, {
|
||||
title: options.title,
|
||||
qualityProfileId: options.qualityProfileId,
|
||||
profileId: options.profileId,
|
||||
@@ -92,6 +92,21 @@ class RadarrAPI {
|
||||
searchForMovie: options.searchNow,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.data.id) {
|
||||
logger.info('Radarr accepted request', { label: 'Radarr' });
|
||||
logger.debug('Radarr add details', {
|
||||
label: 'Radarr',
|
||||
movie: response.data,
|
||||
});
|
||||
} else {
|
||||
logger.error('Failed to add movie to Radarr', {
|
||||
label: 'Radarr',
|
||||
options,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
logger.error(
|
||||
'Failed to add movie to Radarr. This might happen if the movie already exists, in which case you can safely ignore this error.',
|
||||
@@ -99,8 +114,13 @@ class RadarrAPI {
|
||||
label: 'Radarr',
|
||||
errorMessage: e.message,
|
||||
options,
|
||||
response: e?.response?.data,
|
||||
}
|
||||
);
|
||||
if (e?.response?.data?.[0]?.errorCode === 'MovieExistsValidator') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class SonarrAPI {
|
||||
}
|
||||
}
|
||||
|
||||
public async addSeries(options: AddSeriesOptions): Promise<SonarrSeries> {
|
||||
public async addSeries(options: AddSeriesOptions): Promise<boolean> {
|
||||
try {
|
||||
const series = await this.getSeriesByTvdbId(options.tvdbid);
|
||||
|
||||
@@ -126,7 +126,7 @@ class SonarrAPI {
|
||||
|
||||
series.addOptions = {
|
||||
ignoreEpisodesWithFiles: true,
|
||||
searchForMissingEpisodes: true,
|
||||
searchForMissingEpisodes: options.searchNow,
|
||||
};
|
||||
|
||||
const newSeriesResponse = await this.axios.put<SonarrSeries>(
|
||||
@@ -134,7 +134,23 @@ class SonarrAPI {
|
||||
series
|
||||
);
|
||||
|
||||
return newSeriesResponse.data;
|
||||
if (newSeriesResponse.data.id) {
|
||||
logger.info('Sonarr accepted request. Updated existing series', {
|
||||
label: 'Sonarr',
|
||||
});
|
||||
logger.debug('Sonarr add details', {
|
||||
label: 'Sonarr',
|
||||
movie: newSeriesResponse.data,
|
||||
});
|
||||
} else {
|
||||
logger.error('Failed to add movie to Sonarr', {
|
||||
label: 'Sonarr',
|
||||
options,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const createdSeriesResponse = await this.axios.post<SonarrSeries>(
|
||||
@@ -162,14 +178,29 @@ class SonarrAPI {
|
||||
} as Partial<SonarrSeries>
|
||||
);
|
||||
|
||||
return createdSeriesResponse.data;
|
||||
if (createdSeriesResponse.data.id) {
|
||||
logger.info('Sonarr accepted request', { label: 'Sonarr' });
|
||||
logger.debug('Sonarr add details', {
|
||||
label: 'Sonarr',
|
||||
movie: createdSeriesResponse.data,
|
||||
});
|
||||
} else {
|
||||
logger.error('Failed to add movie to Sonarr', {
|
||||
label: 'Sonarr',
|
||||
options,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
logger.error('Something went wrong adding a series to Sonarr', {
|
||||
label: 'Sonarr API',
|
||||
errorMessage: e.message,
|
||||
error: e,
|
||||
response: e?.response?.data,
|
||||
});
|
||||
throw new Error('Failed to add series');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ export interface TmdbTvResult extends TmdbMediaResult {
|
||||
name: string;
|
||||
original_name: string;
|
||||
origin_country: string[];
|
||||
first_air_Date: string;
|
||||
first_air_date: string;
|
||||
}
|
||||
|
||||
export interface TmdbPersonResult {
|
||||
@@ -190,7 +190,30 @@ export interface TmdbMovieDetails {
|
||||
cast: TmdbCreditCast[];
|
||||
crew: TmdbCreditCrew[];
|
||||
};
|
||||
belongs_to_collection?: {
|
||||
id: number;
|
||||
name: string;
|
||||
poster_path?: string;
|
||||
backdrop_path?: string;
|
||||
};
|
||||
external_ids: TmdbExternalIds;
|
||||
videos: TmdbVideoResult;
|
||||
}
|
||||
|
||||
export interface TmdbVideo {
|
||||
id: string;
|
||||
key: string;
|
||||
name: string;
|
||||
site: 'YouTube';
|
||||
size: number;
|
||||
type:
|
||||
| 'Clip'
|
||||
| 'Teaser'
|
||||
| 'Trailer'
|
||||
| 'Featurette'
|
||||
| 'Opening Credits'
|
||||
| 'Behind the Scenes'
|
||||
| 'Bloopers';
|
||||
}
|
||||
|
||||
export interface TmdbTvEpisodeResult {
|
||||
@@ -278,6 +301,11 @@ export interface TmdbTvDetails {
|
||||
keywords: {
|
||||
results: TmdbKeyword[];
|
||||
};
|
||||
videos: TmdbVideoResult;
|
||||
}
|
||||
|
||||
export interface TmdbVideoResult {
|
||||
results: TmdbVideo[];
|
||||
}
|
||||
|
||||
export interface TmdbKeyword {
|
||||
@@ -344,6 +372,15 @@ export interface TmdbSeasonWithEpisodes extends TmdbTvSeasonResult {
|
||||
external_ids: TmdbExternalIds;
|
||||
}
|
||||
|
||||
export interface TmdbCollection {
|
||||
id: number;
|
||||
name: string;
|
||||
overview?: string;
|
||||
poster_path?: string;
|
||||
backdrop_path?: string;
|
||||
parts: TmdbMovieResult[];
|
||||
}
|
||||
|
||||
class TheMovieDb {
|
||||
private apiKey = 'db55323b8d3e4154498498a75642b381';
|
||||
private axios: AxiosInstance;
|
||||
@@ -374,7 +411,12 @@ class TheMovieDb {
|
||||
|
||||
return response.data;
|
||||
} catch (e) {
|
||||
throw new Error(`[TMDB] Failed to search multi: ${e.message}`);
|
||||
return {
|
||||
page: 1,
|
||||
results: [],
|
||||
total_pages: 1,
|
||||
total_results: 0,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -433,7 +475,10 @@ class TheMovieDb {
|
||||
const response = await this.axios.get<TmdbMovieDetails>(
|
||||
`/movie/${movieId}`,
|
||||
{
|
||||
params: { language, append_to_response: 'credits,external_ids' },
|
||||
params: {
|
||||
language,
|
||||
append_to_response: 'credits,external_ids,videos',
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -454,7 +499,7 @@ class TheMovieDb {
|
||||
const response = await this.axios.get<TmdbTvDetails>(`/tv/${tvId}`, {
|
||||
params: {
|
||||
language,
|
||||
append_to_response: 'credits,external_ids,keywords',
|
||||
append_to_response: 'credits,external_ids,keywords,videos',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -861,6 +906,29 @@ class TheMovieDb {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public async getCollection({
|
||||
collectionId,
|
||||
language = 'en-US',
|
||||
}: {
|
||||
collectionId: number;
|
||||
language?: string;
|
||||
}): Promise<TmdbCollection> {
|
||||
try {
|
||||
const response = await this.axios.get<TmdbCollection>(
|
||||
`/collection/${collectionId}`,
|
||||
{
|
||||
params: {
|
||||
language,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
return response.data;
|
||||
} catch (e) {
|
||||
throw new Error(`[TMDB] Failed to fetch collection: ${e.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default TheMovieDb;
|
||||
|
||||
@@ -92,6 +92,9 @@ class Media {
|
||||
@UpdateDateColumn()
|
||||
public updatedAt: Date;
|
||||
|
||||
@Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public lastSeasonChange: Date;
|
||||
|
||||
constructor(init?: Partial<Media>) {
|
||||
Object.assign(this, init);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,12 @@ export class MediaRequest {
|
||||
Object.assign(this, init);
|
||||
}
|
||||
|
||||
@AfterUpdate()
|
||||
@AfterInsert()
|
||||
public async sendMedia(): Promise<void> {
|
||||
await Promise.all([this._sendToRadarr(), this._sendToSonarr()]);
|
||||
}
|
||||
|
||||
@AfterInsert()
|
||||
private async _notifyNewRequest() {
|
||||
if (this.status === MediaRequestStatus.PENDING) {
|
||||
@@ -88,6 +94,7 @@ export class MediaRequest {
|
||||
message: movie.overview,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${movie.poster_path}`,
|
||||
notifyUser: this.requestedBy,
|
||||
media,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -98,6 +105,7 @@ export class MediaRequest {
|
||||
message: tv.overview,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${tv.poster_path}`,
|
||||
notifyUser: this.requestedBy,
|
||||
media,
|
||||
extra: [
|
||||
{
|
||||
name: 'Seasons',
|
||||
@@ -136,6 +144,7 @@ export class MediaRequest {
|
||||
message: movie.overview,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${movie.poster_path}`,
|
||||
notifyUser: this.requestedBy,
|
||||
media,
|
||||
});
|
||||
} else if (this.media.mediaType === MediaType.TV) {
|
||||
const tv = await tmdb.getTvShow({ tvId: this.media.tmdbId });
|
||||
@@ -144,6 +153,7 @@ export class MediaRequest {
|
||||
message: tv.overview,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${tv.poster_path}`,
|
||||
notifyUser: this.requestedBy,
|
||||
media,
|
||||
extra: [
|
||||
{
|
||||
name: 'Seasons',
|
||||
@@ -159,7 +169,7 @@ export class MediaRequest {
|
||||
|
||||
@AfterUpdate()
|
||||
@AfterInsert()
|
||||
private async _updateParentStatus() {
|
||||
public async updateParentStatus(): Promise<void> {
|
||||
const mediaRepository = getRepository(Media);
|
||||
const media = await mediaRepository.findOne({
|
||||
where: { id: this.media.id },
|
||||
@@ -225,14 +235,13 @@ export class MediaRequest {
|
||||
}
|
||||
}
|
||||
|
||||
@AfterUpdate()
|
||||
@AfterInsert()
|
||||
private async _sendToRadarr() {
|
||||
if (
|
||||
this.status === MediaRequestStatus.APPROVED &&
|
||||
this.type === MediaType.MOVIE
|
||||
) {
|
||||
try {
|
||||
const mediaRepository = getRepository(Media);
|
||||
const settings = getSettings();
|
||||
if (settings.radarr.length === 0 && !settings.radarr[0]) {
|
||||
logger.info(
|
||||
@@ -264,17 +273,49 @@ export class MediaRequest {
|
||||
const movie = await tmdb.getMovie({ movieId: this.media.tmdbId });
|
||||
|
||||
// Run this asynchronously so we don't wait for it on the UI side
|
||||
radarr.addMovie({
|
||||
profileId: radarrSettings.activeProfileId,
|
||||
qualityProfileId: radarrSettings.activeProfileId,
|
||||
rootFolderPath: radarrSettings.activeDirectory,
|
||||
minimumAvailability: radarrSettings.minimumAvailability,
|
||||
title: movie.title,
|
||||
tmdbId: movie.id,
|
||||
year: Number(movie.release_date.slice(0, 4)),
|
||||
monitored: true,
|
||||
searchNow: true,
|
||||
});
|
||||
radarr
|
||||
.addMovie({
|
||||
profileId: radarrSettings.activeProfileId,
|
||||
qualityProfileId: radarrSettings.activeProfileId,
|
||||
rootFolderPath: radarrSettings.activeDirectory,
|
||||
minimumAvailability: radarrSettings.minimumAvailability,
|
||||
title: movie.title,
|
||||
tmdbId: movie.id,
|
||||
year: Number(movie.release_date.slice(0, 4)),
|
||||
monitored: true,
|
||||
searchNow: true,
|
||||
})
|
||||
.then(async (success) => {
|
||||
if (!success) {
|
||||
const media = await mediaRepository.findOne({
|
||||
where: { id: this.media.id },
|
||||
});
|
||||
if (!media) {
|
||||
logger.error('Media not present');
|
||||
return;
|
||||
}
|
||||
media.status = MediaStatus.UNKNOWN;
|
||||
await mediaRepository.save(media);
|
||||
logger.warn(
|
||||
'Newly added movie request failed to add to Radarr, marking as unknown',
|
||||
{
|
||||
label: 'Media Request',
|
||||
}
|
||||
);
|
||||
const userRepository = getRepository(User);
|
||||
const admin = await userRepository.findOneOrFail({
|
||||
select: ['id', 'plexToken'],
|
||||
order: { id: 'ASC' },
|
||||
});
|
||||
notificationManager.sendNotification(Notification.MEDIA_FAILED, {
|
||||
subject: movie.title,
|
||||
message: 'Movie failed to add to Radarr',
|
||||
notifyUser: admin,
|
||||
media,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${movie.poster_path}`,
|
||||
});
|
||||
}
|
||||
});
|
||||
logger.info('Sent request to Radarr', { label: 'Media Request' });
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
@@ -284,8 +325,6 @@ export class MediaRequest {
|
||||
}
|
||||
}
|
||||
|
||||
@AfterUpdate()
|
||||
@AfterInsert()
|
||||
private async _sendToSonarr() {
|
||||
if (
|
||||
this.status === MediaRequestStatus.APPROVED &&
|
||||
@@ -348,23 +387,55 @@ export class MediaRequest {
|
||||
}
|
||||
|
||||
// Run this asynchronously so we don't wait for it on the UI side
|
||||
sonarr.addSeries({
|
||||
profileId:
|
||||
seriesType === 'anime' && sonarrSettings.activeAnimeProfileId
|
||||
? sonarrSettings.activeAnimeProfileId
|
||||
: sonarrSettings.activeProfileId,
|
||||
rootFolderPath:
|
||||
seriesType === 'anime' && sonarrSettings.activeAnimeDirectory
|
||||
? sonarrSettings.activeAnimeDirectory
|
||||
: sonarrSettings.activeDirectory,
|
||||
title: series.name,
|
||||
tvdbid: series.external_ids.tvdb_id,
|
||||
seasons: this.seasons.map((season) => season.seasonNumber),
|
||||
seasonFolder: sonarrSettings.enableSeasonFolders,
|
||||
seriesType,
|
||||
monitored: true,
|
||||
searchNow: true,
|
||||
});
|
||||
sonarr
|
||||
.addSeries({
|
||||
profileId:
|
||||
seriesType === 'anime' && sonarrSettings.activeAnimeProfileId
|
||||
? sonarrSettings.activeAnimeProfileId
|
||||
: sonarrSettings.activeProfileId,
|
||||
rootFolderPath:
|
||||
seriesType === 'anime' && sonarrSettings.activeAnimeDirectory
|
||||
? sonarrSettings.activeAnimeDirectory
|
||||
: sonarrSettings.activeDirectory,
|
||||
title: series.name,
|
||||
tvdbid: series.external_ids.tvdb_id,
|
||||
seasons: this.seasons.map((season) => season.seasonNumber),
|
||||
seasonFolder: sonarrSettings.enableSeasonFolders,
|
||||
seriesType,
|
||||
monitored: true,
|
||||
searchNow: true,
|
||||
})
|
||||
.then(async (success) => {
|
||||
if (!success) {
|
||||
media.status = MediaStatus.UNKNOWN;
|
||||
await mediaRepository.save(media);
|
||||
logger.warn(
|
||||
'Newly added series request failed to add to Sonarr, marking as unknown',
|
||||
{
|
||||
label: 'Media Request',
|
||||
}
|
||||
);
|
||||
const userRepository = getRepository(User);
|
||||
const admin = await userRepository.findOneOrFail({
|
||||
order: { id: 'ASC' },
|
||||
});
|
||||
notificationManager.sendNotification(Notification.MEDIA_FAILED, {
|
||||
subject: series.name,
|
||||
message: 'Series failed to add to Sonarr',
|
||||
notifyUser: admin,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${series.poster_path}`,
|
||||
media,
|
||||
extra: [
|
||||
{
|
||||
name: 'Seasons',
|
||||
value: this.seasons
|
||||
.map((season) => season.seasonNumber)
|
||||
.join(', '),
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
});
|
||||
logger.info('Sent request to Sonarr', { label: 'Media Request' });
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
|
||||
@@ -18,6 +18,7 @@ import notificationManager from './lib/notifications';
|
||||
import DiscordAgent from './lib/notifications/agents/discord';
|
||||
import EmailAgent from './lib/notifications/agents/email';
|
||||
import { getAppVersion } from './utils/appVersion';
|
||||
import SlackAgent from './lib/notifications/agents/slack';
|
||||
|
||||
const API_SPEC_PATH = path.join(__dirname, '../overseerr-api.yml');
|
||||
|
||||
@@ -29,12 +30,24 @@ const handle = app.getRequestHandler();
|
||||
app
|
||||
.prepare()
|
||||
.then(async () => {
|
||||
await createConnection();
|
||||
const dbConnection = await createConnection();
|
||||
|
||||
// Run migrations in production
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
await dbConnection.query('PRAGMA foreign_keys=OFF');
|
||||
await dbConnection.runMigrations();
|
||||
await dbConnection.query('PRAGMA foreign_keys=ON');
|
||||
}
|
||||
|
||||
// Load Settings
|
||||
const settings = getSettings().load();
|
||||
|
||||
// Register Notification Agents
|
||||
notificationManager.registerAgents([new DiscordAgent(), new EmailAgent()]);
|
||||
notificationManager.registerAgents([
|
||||
new DiscordAgent(),
|
||||
new EmailAgent(),
|
||||
new SlackAgent(),
|
||||
]);
|
||||
|
||||
// Start Jobs
|
||||
startJobs();
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { getRepository } from 'typeorm';
|
||||
import { User } from '../../entity/User';
|
||||
import PlexAPI, { PlexLibraryItem } from '../../api/plexapi';
|
||||
import TheMovieDb, { TmdbTvDetails } from '../../api/themoviedb';
|
||||
import TheMovieDb, {
|
||||
TmdbMovieDetails,
|
||||
TmdbTvDetails,
|
||||
} from '../../api/themoviedb';
|
||||
import Media from '../../entity/Media';
|
||||
import { MediaStatus, MediaType } from '../../constants/media';
|
||||
import logger from '../../logger';
|
||||
@@ -14,7 +17,7 @@ const UPDATE_RATE = 4 * 1000;
|
||||
|
||||
const imdbRegex = new RegExp(/imdb:\/\/(tt[0-9]+)/);
|
||||
const tmdbRegex = new RegExp(/tmdb:\/\/([0-9]+)/);
|
||||
const tvdbRegex = new RegExp(/tvdb:\/\/([0-9]+)/);
|
||||
const tvdbRegex = new RegExp(/tvdb:\/\/([0-9]+)|hama:\/\/tvdb-([0-9]+)/);
|
||||
const tmdbShowRegex = new RegExp(/themoviedb:\/\/([0-9]+)/);
|
||||
const plexRegex = new RegExp(/plex:\/\//);
|
||||
|
||||
@@ -93,40 +96,58 @@ class JobPlexSync {
|
||||
this.log(`Saved ${plexitem.title}`);
|
||||
}
|
||||
} else {
|
||||
const matchedid = plexitem.guid.match(/imdb:\/\/(tt[0-9]+)/);
|
||||
let tmdbMovieId: number | undefined;
|
||||
let tmdbMovie: TmdbMovieDetails | undefined;
|
||||
|
||||
if (matchedid?.[1]) {
|
||||
const tmdbMovie = await this.tmdb.getMovieByImdbId({
|
||||
imdbId: matchedid[1],
|
||||
const imdbMatch = plexitem.guid.match(imdbRegex);
|
||||
const tmdbMatch = plexitem.guid.match(tmdbShowRegex);
|
||||
|
||||
if (imdbMatch) {
|
||||
tmdbMovie = await this.tmdb.getMovieByImdbId({
|
||||
imdbId: imdbMatch[1],
|
||||
});
|
||||
tmdbMovieId = tmdbMovie.id;
|
||||
} else if (tmdbMatch) {
|
||||
tmdbMovieId = Number(tmdbMatch[1]);
|
||||
}
|
||||
|
||||
const existing = await this.getExisting(tmdbMovie.id);
|
||||
if (existing && existing.status === MediaStatus.AVAILABLE) {
|
||||
this.log(`Title exists and is already available ${plexitem.title}`);
|
||||
} else if (existing && existing.status !== MediaStatus.AVAILABLE) {
|
||||
existing.status = MediaStatus.AVAILABLE;
|
||||
await mediaRepository.save(existing);
|
||||
this.log(
|
||||
`Request for ${plexitem.title} exists. Setting status AVAILABLE`,
|
||||
'info'
|
||||
);
|
||||
} else if (tmdbMovie) {
|
||||
const newMedia = new Media();
|
||||
newMedia.imdbId = tmdbMovie.external_ids.imdb_id;
|
||||
newMedia.tmdbId = tmdbMovie.id;
|
||||
newMedia.status = MediaStatus.AVAILABLE;
|
||||
newMedia.mediaType = MediaType.MOVIE;
|
||||
await mediaRepository.save(newMedia);
|
||||
this.log(`Saved ${tmdbMovie.title}`);
|
||||
if (!tmdbMovieId) {
|
||||
throw new Error('Unable to find TMDB ID');
|
||||
}
|
||||
|
||||
const existing = await this.getExisting(tmdbMovieId);
|
||||
if (existing && existing.status === MediaStatus.AVAILABLE) {
|
||||
this.log(`Title exists and is already available ${plexitem.title}`);
|
||||
} else if (existing && existing.status !== MediaStatus.AVAILABLE) {
|
||||
existing.status = MediaStatus.AVAILABLE;
|
||||
await mediaRepository.save(existing);
|
||||
this.log(
|
||||
`Request for ${plexitem.title} exists. Setting status AVAILABLE`,
|
||||
'info'
|
||||
);
|
||||
} else {
|
||||
// If we have a tmdb movie guid but it didn't already exist, only then
|
||||
// do we request the movie from tmdb (to reduce api requests)
|
||||
if (!tmdbMovie) {
|
||||
tmdbMovie = await this.tmdb.getMovie({ movieId: tmdbMovieId });
|
||||
}
|
||||
const newMedia = new Media();
|
||||
newMedia.imdbId = tmdbMovie.external_ids.imdb_id;
|
||||
newMedia.tmdbId = tmdbMovie.id;
|
||||
newMedia.status = MediaStatus.AVAILABLE;
|
||||
newMedia.mediaType = MediaType.MOVIE;
|
||||
await mediaRepository.save(newMedia);
|
||||
this.log(`Saved ${tmdbMovie.title}`);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.log(
|
||||
`Failed to process plex item. ratingKey: ${
|
||||
plexitem.parentRatingKey ?? plexitem.ratingKey
|
||||
}`,
|
||||
'error'
|
||||
`Failed to process plex item. ratingKey: ${plexitem.ratingKey}`,
|
||||
'error',
|
||||
{
|
||||
errorMessage: e.message,
|
||||
plexitem,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -169,6 +190,12 @@ class JobPlexSync {
|
||||
|
||||
const newSeasons: Season[] = [];
|
||||
|
||||
const currentSeasonAvailable = (
|
||||
media?.seasons.filter(
|
||||
(season) => season.status === MediaStatus.AVAILABLE
|
||||
) ?? []
|
||||
).length;
|
||||
|
||||
seasons.forEach((season) => {
|
||||
const matchedPlexSeason = metadata.Children?.Metadata.find(
|
||||
(md) => Number(md.index) === season.season_number
|
||||
@@ -219,6 +246,25 @@ class JobPlexSync {
|
||||
if (media) {
|
||||
// Update existing
|
||||
media.seasons = [...media.seasons, ...newSeasons];
|
||||
|
||||
const newSeasonAvailable = (
|
||||
media.seasons.filter(
|
||||
(season) => season.status === MediaStatus.AVAILABLE
|
||||
) ?? []
|
||||
).length;
|
||||
|
||||
// If at least one new season has become available, update
|
||||
// the lastSeasonChange field so we can trigger notifications
|
||||
if (newSeasonAvailable > currentSeasonAvailable) {
|
||||
this.log(
|
||||
`Detected ${
|
||||
newSeasonAvailable - currentSeasonAvailable
|
||||
} new season(s) for ${tvShow.name}`,
|
||||
'debug'
|
||||
);
|
||||
media.lastSeasonChange = new Date();
|
||||
}
|
||||
|
||||
media.status = isAllSeasons
|
||||
? MediaStatus.AVAILABLE
|
||||
: MediaStatus.PARTIALLY_AVAILABLE;
|
||||
|
||||
@@ -20,7 +20,7 @@ export const startJobs = (): void => {
|
||||
jobPlexRecentSync.run();
|
||||
}),
|
||||
});
|
||||
// Run full plex sync every 6 hours
|
||||
// Run full plex sync every 24 hours
|
||||
scheduledJobs.push({
|
||||
name: 'Plex Full Library Sync',
|
||||
job: schedule.scheduleJob('0 0 3 * * *', () => {
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
import { Notification } from '..';
|
||||
import Media from '../../../entity/Media';
|
||||
import { User } from '../../../entity/User';
|
||||
import { NotificationAgentConfig } from '../../settings';
|
||||
|
||||
export interface NotificationPayload {
|
||||
subject: string;
|
||||
notifyUser: User;
|
||||
media?: Media;
|
||||
image?: string;
|
||||
message?: string;
|
||||
extra?: { name: string; value: string }[];
|
||||
}
|
||||
|
||||
export abstract class BaseAgent<T extends NotificationAgentConfig> {
|
||||
protected settings?: T;
|
||||
public constructor(settings?: T) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
protected abstract getSettings(): T;
|
||||
}
|
||||
|
||||
export interface NotificationAgent {
|
||||
shouldSend(type: Notification): boolean;
|
||||
send(type: Notification, payload: NotificationPayload): Promise<boolean>;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'axios';
|
||||
import { Notification } from '..';
|
||||
import logger from '../../../logger';
|
||||
import { getSettings } from '../../settings';
|
||||
import type { NotificationAgent, NotificationPayload } from './agent';
|
||||
import { getSettings, NotificationAgentDiscord } from '../../settings';
|
||||
import { BaseAgent, NotificationAgent, NotificationPayload } from './agent';
|
||||
|
||||
enum EmbedColors {
|
||||
DEFAULT = 0,
|
||||
@@ -37,6 +37,11 @@ interface DiscordImageEmbed {
|
||||
width?: number;
|
||||
}
|
||||
|
||||
interface Field {
|
||||
name: string;
|
||||
value: string;
|
||||
inline?: boolean;
|
||||
}
|
||||
interface DiscordRichEmbed {
|
||||
title?: string;
|
||||
type?: 'rich'; // Always rich for webhooks
|
||||
@@ -61,11 +66,7 @@ interface DiscordRichEmbed {
|
||||
icon_url?: string;
|
||||
proxy_icon_url?: string;
|
||||
};
|
||||
fields?: {
|
||||
name: string;
|
||||
value: string;
|
||||
inline?: boolean;
|
||||
}[];
|
||||
fields?: Field[];
|
||||
}
|
||||
|
||||
interface DiscordWebhookPayload {
|
||||
@@ -75,26 +76,103 @@ interface DiscordWebhookPayload {
|
||||
tts: boolean;
|
||||
}
|
||||
|
||||
class DiscordAgent implements NotificationAgent {
|
||||
class DiscordAgent
|
||||
extends BaseAgent<NotificationAgentDiscord>
|
||||
implements NotificationAgent {
|
||||
protected getSettings(): NotificationAgentDiscord {
|
||||
if (this.settings) {
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
const settings = getSettings();
|
||||
|
||||
return settings.notifications.agents.discord;
|
||||
}
|
||||
|
||||
public buildEmbed(
|
||||
type: Notification,
|
||||
payload: NotificationPayload
|
||||
): DiscordRichEmbed {
|
||||
let color = EmbedColors.DEFAULT;
|
||||
let status = 'Unknown';
|
||||
const settings = getSettings();
|
||||
let color = EmbedColors.DARK_PURPLE;
|
||||
|
||||
const fields: Field[] = [];
|
||||
|
||||
switch (type) {
|
||||
case Notification.MEDIA_PENDING:
|
||||
color = EmbedColors.ORANGE;
|
||||
status = 'Pending Approval';
|
||||
fields.push(
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
value: 'Pending Approval',
|
||||
inline: true,
|
||||
}
|
||||
);
|
||||
|
||||
if (settings.main.applicationUrl) {
|
||||
fields.push({
|
||||
name: 'View Media',
|
||||
value: `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`,
|
||||
});
|
||||
}
|
||||
break;
|
||||
case Notification.MEDIA_APPROVED:
|
||||
color = EmbedColors.PURPLE;
|
||||
status = 'Processing Request';
|
||||
fields.push(
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
value: 'Processing Request',
|
||||
inline: true,
|
||||
}
|
||||
);
|
||||
|
||||
if (settings.main.applicationUrl) {
|
||||
fields.push({
|
||||
name: 'View Media',
|
||||
value: `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`,
|
||||
});
|
||||
}
|
||||
break;
|
||||
case Notification.MEDIA_AVAILABLE:
|
||||
color = EmbedColors.GREEN;
|
||||
status = 'Available';
|
||||
fields.push(
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
value: 'Available',
|
||||
inline: true,
|
||||
}
|
||||
);
|
||||
|
||||
if (settings.main.applicationUrl) {
|
||||
fields.push({
|
||||
name: 'View Media',
|
||||
value: `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`,
|
||||
});
|
||||
}
|
||||
break;
|
||||
case Notification.MEDIA_FAILED:
|
||||
color = EmbedColors.RED;
|
||||
if (settings.main.applicationUrl) {
|
||||
fields.push({
|
||||
name: 'View Media',
|
||||
value: `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`,
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -103,18 +181,9 @@ class DiscordAgent implements NotificationAgent {
|
||||
description: payload.message,
|
||||
color,
|
||||
timestamp: new Date().toISOString(),
|
||||
author: { name: 'Overseerr' },
|
||||
author: { name: 'Overseerr', url: settings.main.applicationUrl },
|
||||
fields: [
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
value: status,
|
||||
inline: true,
|
||||
},
|
||||
...fields,
|
||||
// If we have extra data, map it to fields for discord notifications
|
||||
...(payload.extra ?? []).map((extra) => ({
|
||||
name: extra.name,
|
||||
@@ -130,12 +199,7 @@ class DiscordAgent implements NotificationAgent {
|
||||
// TODO: Add checking for type here once we add notification type filters for agents
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public shouldSend(_type: Notification): boolean {
|
||||
const settings = getSettings();
|
||||
|
||||
if (
|
||||
settings.notifications.agents.discord?.enabled &&
|
||||
settings.notifications.agents.discord?.options?.webhookUrl
|
||||
) {
|
||||
if (this.getSettings().enabled && this.getSettings().options.webhookUrl) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -146,11 +210,9 @@ class DiscordAgent implements NotificationAgent {
|
||||
type: Notification,
|
||||
payload: NotificationPayload
|
||||
): Promise<boolean> {
|
||||
const settings = getSettings();
|
||||
logger.debug('Sending discord notification', { label: 'Notifications' });
|
||||
try {
|
||||
const webhookUrl =
|
||||
settings.notifications.agents.discord?.options?.webhookUrl;
|
||||
const webhookUrl = this.getSettings().options.webhookUrl;
|
||||
|
||||
if (!webhookUrl) {
|
||||
return false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { NotificationAgent, NotificationPayload } from './agent';
|
||||
import { BaseAgent, NotificationAgent, NotificationPayload } from './agent';
|
||||
import { Notification } from '..';
|
||||
import path from 'path';
|
||||
import { getSettings } from '../../settings';
|
||||
import { getSettings, NotificationAgentEmail } from '../../settings';
|
||||
import nodemailer from 'nodemailer';
|
||||
import Email from 'email-templates';
|
||||
import logger from '../../../logger';
|
||||
@@ -9,13 +9,25 @@ import { getRepository } from 'typeorm';
|
||||
import { User } from '../../../entity/User';
|
||||
import { Permission } from '../../permissions';
|
||||
|
||||
class EmailAgent implements NotificationAgent {
|
||||
class EmailAgent
|
||||
extends BaseAgent<NotificationAgentEmail>
|
||||
implements NotificationAgent {
|
||||
protected getSettings(): NotificationAgentEmail {
|
||||
if (this.settings) {
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
const settings = getSettings();
|
||||
|
||||
return settings.notifications.agents.email;
|
||||
}
|
||||
|
||||
// TODO: Add checking for type here once we add notification type filters for agents
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public shouldSend(_type: Notification): boolean {
|
||||
const settings = getSettings();
|
||||
const settings = this.getSettings();
|
||||
|
||||
if (settings.notifications.agents.email.enabled) {
|
||||
if (settings.enabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -23,12 +35,17 @@ class EmailAgent implements NotificationAgent {
|
||||
}
|
||||
|
||||
private getSmtpTransport() {
|
||||
const emailSettings = getSettings().notifications.agents.email.options;
|
||||
const emailSettings = this.getSettings().options;
|
||||
|
||||
return nodemailer.createTransport({
|
||||
host: emailSettings.smtpHost,
|
||||
port: emailSettings.smtpPort,
|
||||
secure: emailSettings.secure,
|
||||
tls: emailSettings.allowSelfSigned
|
||||
? {
|
||||
rejectUnauthorized: false,
|
||||
}
|
||||
: undefined,
|
||||
auth:
|
||||
emailSettings.authUser && emailSettings.authPass
|
||||
? {
|
||||
@@ -40,7 +57,7 @@ class EmailAgent implements NotificationAgent {
|
||||
}
|
||||
|
||||
private getNewEmail() {
|
||||
const settings = getSettings().notifications.agents.email;
|
||||
const settings = this.getSettings();
|
||||
return new Email({
|
||||
message: {
|
||||
from: settings.options.emailFrom,
|
||||
@@ -51,7 +68,8 @@ class EmailAgent implements NotificationAgent {
|
||||
}
|
||||
|
||||
private async sendMediaRequestEmail(payload: NotificationPayload) {
|
||||
const settings = getSettings().main;
|
||||
// This is getting main settings for the whole app
|
||||
const applicationUrl = getSettings().main.applicationUrl;
|
||||
try {
|
||||
const userRepository = getRepository(User);
|
||||
const users = await userRepository.find();
|
||||
@@ -76,7 +94,10 @@ class EmailAgent implements NotificationAgent {
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
actionUrl: settings.applicationUrl,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
applicationUrl,
|
||||
requestType: 'New Request',
|
||||
},
|
||||
});
|
||||
@@ -91,12 +112,59 @@ class EmailAgent implements NotificationAgent {
|
||||
}
|
||||
}
|
||||
|
||||
private async sendMediaFailedEmail(payload: NotificationPayload) {
|
||||
// This is getting main settings for the whole app
|
||||
const applicationUrl = getSettings().main.applicationUrl;
|
||||
try {
|
||||
const userRepository = getRepository(User);
|
||||
const users = await userRepository.find();
|
||||
|
||||
// Send to all users with the manage requests permission (or admins)
|
||||
users
|
||||
.filter((user) => user.hasPermission(Permission.MANAGE_REQUESTS))
|
||||
.forEach((user) => {
|
||||
const email = this.getNewEmail();
|
||||
|
||||
email.send({
|
||||
template: path.join(
|
||||
__dirname,
|
||||
'../../../templates/email/media-request'
|
||||
),
|
||||
message: {
|
||||
to: user.email,
|
||||
},
|
||||
locals: {
|
||||
body:
|
||||
"A user's new request has failed to add to Sonarr or Radarr",
|
||||
mediaName: payload.subject,
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
applicationUrl,
|
||||
requestType: 'Failed Request',
|
||||
},
|
||||
});
|
||||
});
|
||||
return true;
|
||||
} catch (e) {
|
||||
logger.error('Mail notification failed to send', {
|
||||
label: 'Notifications',
|
||||
message: e.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private async sendMediaApprovedEmail(payload: NotificationPayload) {
|
||||
const settings = getSettings().main;
|
||||
// This is getting main settings for the whole app
|
||||
const applicationUrl = getSettings().main.applicationUrl;
|
||||
try {
|
||||
const email = this.getNewEmail();
|
||||
|
||||
email.send({
|
||||
await email.send({
|
||||
template: path.join(
|
||||
__dirname,
|
||||
'../../../templates/email/media-request'
|
||||
@@ -110,7 +178,10 @@ class EmailAgent implements NotificationAgent {
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
actionUrl: settings.applicationUrl,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
applicationUrl,
|
||||
requestType: 'Request Approved',
|
||||
},
|
||||
});
|
||||
@@ -125,11 +196,12 @@ class EmailAgent implements NotificationAgent {
|
||||
}
|
||||
|
||||
private async sendMediaAvailableEmail(payload: NotificationPayload) {
|
||||
const settings = getSettings().main;
|
||||
// This is getting main settings for the whole app
|
||||
const applicationUrl = getSettings().main.applicationUrl;
|
||||
try {
|
||||
const email = this.getNewEmail();
|
||||
|
||||
email.send({
|
||||
await email.send({
|
||||
template: path.join(
|
||||
__dirname,
|
||||
'../../../templates/email/media-request'
|
||||
@@ -143,7 +215,10 @@ class EmailAgent implements NotificationAgent {
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
actionUrl: settings.applicationUrl,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
applicationUrl,
|
||||
requestType: 'Now Available',
|
||||
},
|
||||
});
|
||||
@@ -157,6 +232,32 @@ class EmailAgent implements NotificationAgent {
|
||||
}
|
||||
}
|
||||
|
||||
private async sendTestEmail(payload: NotificationPayload) {
|
||||
// This is getting main settings for the whole app
|
||||
const applicationUrl = getSettings().main.applicationUrl;
|
||||
try {
|
||||
const email = this.getNewEmail();
|
||||
|
||||
await email.send({
|
||||
template: path.join(__dirname, '../../../templates/email/test-email'),
|
||||
message: {
|
||||
to: payload.notifyUser.email,
|
||||
},
|
||||
locals: {
|
||||
body: payload.message,
|
||||
applicationUrl,
|
||||
},
|
||||
});
|
||||
return true;
|
||||
} catch (e) {
|
||||
logger.error('Mail notification failed to send', {
|
||||
label: 'Notifications',
|
||||
message: e.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public async send(
|
||||
type: Notification,
|
||||
payload: NotificationPayload
|
||||
@@ -173,6 +274,12 @@ class EmailAgent implements NotificationAgent {
|
||||
case Notification.MEDIA_AVAILABLE:
|
||||
this.sendMediaAvailableEmail(payload);
|
||||
break;
|
||||
case Notification.MEDIA_FAILED:
|
||||
this.sendMediaFailedEmail(payload);
|
||||
break;
|
||||
case Notification.TEST_NOTIFICATION:
|
||||
this.sendTestEmail(payload);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
225
server/lib/notifications/agents/slack.ts
Normal file
@@ -0,0 +1,225 @@
|
||||
import axios from 'axios';
|
||||
import { Notification } from '..';
|
||||
import logger from '../../../logger';
|
||||
import { getSettings, NotificationAgentSlack } from '../../settings';
|
||||
import { BaseAgent, NotificationAgent, NotificationPayload } from './agent';
|
||||
|
||||
interface EmbedField {
|
||||
type: 'plain_text' | 'mrkdwn';
|
||||
text: string;
|
||||
}
|
||||
|
||||
interface TextItem {
|
||||
type: 'plain_text' | 'mrkdwn';
|
||||
text: string;
|
||||
emoji?: boolean;
|
||||
}
|
||||
|
||||
interface Element {
|
||||
type: 'button';
|
||||
text?: TextItem;
|
||||
value: string;
|
||||
url: string;
|
||||
action_id: 'button-action';
|
||||
}
|
||||
|
||||
interface EmbedBlock {
|
||||
type: 'header' | 'actions' | 'section' | 'context';
|
||||
block_id?: 'section789';
|
||||
text?: TextItem;
|
||||
fields?: EmbedField[];
|
||||
accessory?: {
|
||||
type: 'image';
|
||||
image_url: string;
|
||||
alt_text: string;
|
||||
};
|
||||
elements?: Element[];
|
||||
}
|
||||
|
||||
interface SlackBlockEmbed {
|
||||
blocks: EmbedBlock[];
|
||||
}
|
||||
|
||||
class SlackAgent
|
||||
extends BaseAgent<NotificationAgentSlack>
|
||||
implements NotificationAgent {
|
||||
protected getSettings(): NotificationAgentSlack {
|
||||
if (this.settings) {
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
const settings = getSettings();
|
||||
|
||||
return settings.notifications.agents.slack;
|
||||
}
|
||||
|
||||
public buildEmbed(
|
||||
type: Notification,
|
||||
payload: NotificationPayload
|
||||
): SlackBlockEmbed {
|
||||
const settings = getSettings();
|
||||
let header = 'Overseerr';
|
||||
let actionUrl: string | undefined;
|
||||
|
||||
const fields: EmbedField[] = [];
|
||||
|
||||
switch (type) {
|
||||
case Notification.MEDIA_PENDING:
|
||||
header = 'New Request';
|
||||
fields.push(
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: `*Requested By*\n${payload.notifyUser.username ?? ''}`,
|
||||
},
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: '*Status*\nPending Approval',
|
||||
}
|
||||
);
|
||||
if (settings.main.applicationUrl) {
|
||||
actionUrl = `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`;
|
||||
}
|
||||
break;
|
||||
case Notification.MEDIA_APPROVED:
|
||||
header = 'Request Approved';
|
||||
fields.push(
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: `*Requested By*\n${payload.notifyUser.username ?? ''}`,
|
||||
},
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: '*Status*\nProcessing Request',
|
||||
}
|
||||
);
|
||||
if (settings.main.applicationUrl) {
|
||||
actionUrl = `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`;
|
||||
}
|
||||
break;
|
||||
case Notification.MEDIA_AVAILABLE:
|
||||
header = 'Now available!';
|
||||
fields.push(
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: `*Requested By*\n${payload.notifyUser.username ?? ''}`,
|
||||
},
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: '*Status*\nAvailable',
|
||||
}
|
||||
);
|
||||
|
||||
if (settings.main.applicationUrl) {
|
||||
actionUrl = `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
const blocks: EmbedBlock[] = [
|
||||
{
|
||||
type: 'header',
|
||||
text: {
|
||||
type: 'plain_text',
|
||||
text: header,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'section',
|
||||
text: {
|
||||
type: 'mrkdwn',
|
||||
text: `*${payload.subject}*`,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
if (payload.message) {
|
||||
blocks.push({
|
||||
type: 'section',
|
||||
text: {
|
||||
type: 'mrkdwn',
|
||||
text: payload.message,
|
||||
},
|
||||
accessory: payload.image
|
||||
? {
|
||||
type: 'image',
|
||||
image_url: payload.image,
|
||||
alt_text: payload.subject,
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
if (fields.length > 0) {
|
||||
blocks.push({
|
||||
type: 'section',
|
||||
fields: [
|
||||
...fields,
|
||||
...(payload.extra ?? []).map(
|
||||
(extra): EmbedField => ({
|
||||
type: 'mrkdwn',
|
||||
text: `*${extra.name}*\n${extra.value}`,
|
||||
})
|
||||
),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
if (actionUrl) {
|
||||
blocks.push({
|
||||
type: 'actions',
|
||||
elements: [
|
||||
{
|
||||
action_id: 'button-action',
|
||||
type: 'button',
|
||||
url: actionUrl,
|
||||
value: 'open_overseerr',
|
||||
text: {
|
||||
type: 'plain_text',
|
||||
text: 'Open Overseerr',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
blocks,
|
||||
};
|
||||
}
|
||||
|
||||
// TODO: Add checking for type here once we add notification type filters for agents
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public shouldSend(_type: Notification): boolean {
|
||||
if (this.getSettings().enabled && this.getSettings().options.webhookUrl) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public async send(
|
||||
type: Notification,
|
||||
payload: NotificationPayload
|
||||
): Promise<boolean> {
|
||||
logger.debug('Sending slack notification', { label: 'Notifications' });
|
||||
try {
|
||||
const webhookUrl = this.getSettings().options.webhookUrl;
|
||||
|
||||
if (!webhookUrl) {
|
||||
return false;
|
||||
}
|
||||
|
||||
await axios.post(webhookUrl, this.buildEmbed(type, payload));
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
logger.error('Error sending Slack notification', {
|
||||
label: 'Notifications',
|
||||
message: e.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default SlackAgent;
|
||||
@@ -5,6 +5,8 @@ export enum Notification {
|
||||
MEDIA_PENDING = 2,
|
||||
MEDIA_APPROVED = 4,
|
||||
MEDIA_AVAILABLE = 8,
|
||||
MEDIA_FAILED = 16,
|
||||
TEST_NOTIFICATION = 32,
|
||||
}
|
||||
|
||||
class NotificationManager {
|
||||
|
||||
@@ -7,6 +7,8 @@ export enum Permission {
|
||||
REQUEST = 32,
|
||||
VOTE = 64,
|
||||
AUTO_APPROVE = 128,
|
||||
AUTO_APPROVE_MOVIE = 256,
|
||||
AUTO_APPROVE_TV = 512,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { merge } from 'lodash';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { Permission } from './permissions';
|
||||
|
||||
export interface Library {
|
||||
id: string;
|
||||
@@ -47,24 +48,31 @@ export interface SonarrSettings extends DVRSettings {
|
||||
export interface MainSettings {
|
||||
apiKey: string;
|
||||
applicationUrl: string;
|
||||
defaultPermissions: number;
|
||||
}
|
||||
|
||||
interface PublicSettings {
|
||||
initialized: boolean;
|
||||
}
|
||||
|
||||
interface NotificationAgent {
|
||||
export interface NotificationAgentConfig {
|
||||
enabled: boolean;
|
||||
types: number;
|
||||
options: Record<string, unknown>;
|
||||
}
|
||||
interface NotificationAgentDiscord extends NotificationAgent {
|
||||
export interface NotificationAgentDiscord extends NotificationAgentConfig {
|
||||
options: {
|
||||
webhookUrl: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface NotificationAgentEmail extends NotificationAgent {
|
||||
export interface NotificationAgentSlack extends NotificationAgentConfig {
|
||||
options: {
|
||||
webhookUrl: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface NotificationAgentEmail extends NotificationAgentConfig {
|
||||
options: {
|
||||
emailFrom: string;
|
||||
smtpHost: string;
|
||||
@@ -72,12 +80,14 @@ interface NotificationAgentEmail extends NotificationAgent {
|
||||
secure: boolean;
|
||||
authUser?: string;
|
||||
authPass?: string;
|
||||
allowSelfSigned: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
interface NotificationAgents {
|
||||
email: NotificationAgentEmail;
|
||||
discord: NotificationAgentDiscord;
|
||||
slack: NotificationAgentSlack;
|
||||
}
|
||||
|
||||
interface NotificationSettings {
|
||||
@@ -105,6 +115,7 @@ class Settings {
|
||||
main: {
|
||||
apiKey: '',
|
||||
applicationUrl: '',
|
||||
defaultPermissions: Permission.REQUEST,
|
||||
},
|
||||
plex: {
|
||||
name: '',
|
||||
@@ -126,8 +137,9 @@ class Settings {
|
||||
options: {
|
||||
emailFrom: '',
|
||||
smtpHost: '127.0.0.1',
|
||||
smtpPort: 465,
|
||||
smtpPort: 587,
|
||||
secure: false,
|
||||
allowSelfSigned: false,
|
||||
},
|
||||
},
|
||||
discord: {
|
||||
@@ -137,6 +149,13 @@ class Settings {
|
||||
webhookUrl: '',
|
||||
},
|
||||
},
|
||||
slack: {
|
||||
enabled: false,
|
||||
types: 0,
|
||||
options: {
|
||||
webhookUrl: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
import * as winston from 'winston';
|
||||
import 'winston-daily-rotate-file';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
|
||||
// Migrate away from old log
|
||||
const OLD_LOG_FILE = path.join(__dirname, '../config/logs/overseerr.log');
|
||||
if (fs.existsSync(OLD_LOG_FILE)) {
|
||||
const file = fs.lstatSync(OLD_LOG_FILE);
|
||||
|
||||
if (!file.isSymbolicLink()) {
|
||||
fs.unlinkSync(OLD_LOG_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
const hformat = winston.format.printf(
|
||||
({ level, label, message, timestamp, ...metadata }) => {
|
||||
@@ -16,15 +28,27 @@ const hformat = winston.format.printf(
|
||||
const logger = winston.createLogger({
|
||||
level: process.env.LOG_LEVEL || 'debug',
|
||||
format: winston.format.combine(
|
||||
winston.format.colorize(),
|
||||
winston.format.splat(),
|
||||
winston.format.timestamp(),
|
||||
hformat
|
||||
),
|
||||
transports: [
|
||||
new winston.transports.Console(),
|
||||
new winston.transports.File({
|
||||
filename: path.join(__dirname, '../config/logs/overseerr.log'),
|
||||
new winston.transports.Console({
|
||||
format: winston.format.combine(
|
||||
winston.format.colorize(),
|
||||
winston.format.splat(),
|
||||
winston.format.timestamp(),
|
||||
hformat
|
||||
),
|
||||
}),
|
||||
new winston.transports.DailyRotateFile({
|
||||
filename: path.join(__dirname, '../config/logs/overseerr-%DATE%.log'),
|
||||
datePattern: 'YYYY-MM-DD',
|
||||
zippedArchive: true,
|
||||
maxSize: '20m',
|
||||
maxFiles: '7d',
|
||||
createSymlink: true,
|
||||
symlinkName: 'overseerr.log',
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
52
server/migration/1608477467935-AddLastSeasonChangeMedia.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddLastSeasonChangeMedia1608477467935
|
||||
implements MigrationInterface {
|
||||
name = 'AddLastSeasonChangeMedia1608477467935';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_41a289eb1fa489c1bc6f38d9c3"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_7ff2d11f6a83cb52386eaebe74"`);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "temporary_media" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "mediaType" varchar NOT NULL, "tmdbId" integer NOT NULL, "tvdbId" integer, "imdbId" varchar, "status" integer NOT NULL DEFAULT (1), "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')), "lastSeasonChange" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP), CONSTRAINT "UQ_7157aad07c73f6a6ae3bbd5ef5e" UNIQUE ("tmdbId"), CONSTRAINT "UQ_41a289eb1fa489c1bc6f38d9c3c" UNIQUE ("tvdbId"))`
|
||||
);
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "temporary_media"("id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt", "lastSeasonChange") SELECT "id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt", "lastSeasonChange" FROM "media"`
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "media"`);
|
||||
await queryRunner.query(`ALTER TABLE "temporary_media" RENAME TO "media"`);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5" ON "media" ("tmdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_41a289eb1fa489c1bc6f38d9c3" ON "media" ("tvdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7ff2d11f6a83cb52386eaebe74" ON "media" ("imdbId") `
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "IDX_7ff2d11f6a83cb52386eaebe74"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_41a289eb1fa489c1bc6f38d9c3"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5"`);
|
||||
await queryRunner.query(`ALTER TABLE "media" RENAME TO "temporary_media"`);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "media" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "mediaType" varchar NOT NULL, "tmdbId" integer NOT NULL, "tvdbId" integer, "imdbId" varchar, "status" integer NOT NULL DEFAULT (1), "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "UQ_7157aad07c73f6a6ae3bbd5ef5e" UNIQUE ("tmdbId"), CONSTRAINT "UQ_41a289eb1fa489c1bc6f38d9c3c" UNIQUE ("tvdbId"))`
|
||||
);
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "media"("id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt") SELECT "id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt" FROM "temporary_media"`
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "temporary_media"`);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7ff2d11f6a83cb52386eaebe74" ON "media" ("imdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_41a289eb1fa489c1bc6f38d9c3" ON "media" ("tvdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5" ON "media" ("tmdbId") `
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class ForceDropImdbUniqueConstraint1608477467935
|
||||
implements MigrationInterface {
|
||||
name = 'ForceDropImdbUniqueConstraint1608477467936';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_41a289eb1fa489c1bc6f38d9c3"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_7ff2d11f6a83cb52386eaebe74"`);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "temporary_media" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "mediaType" varchar NOT NULL, "tmdbId" integer NOT NULL, "tvdbId" integer, "imdbId" varchar, "status" integer NOT NULL DEFAULT (1), "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')), "lastSeasonChange" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP), CONSTRAINT "UQ_7157aad07c73f6a6ae3bbd5ef5e" UNIQUE ("tmdbId"), CONSTRAINT "UQ_41a289eb1fa489c1bc6f38d9c3c" UNIQUE ("tvdbId"))`
|
||||
);
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "temporary_media"("id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt", "lastSeasonChange") SELECT "id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt", "lastSeasonChange" FROM "media"`
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "media"`);
|
||||
await queryRunner.query(`ALTER TABLE "temporary_media" RENAME TO "media"`);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5" ON "media" ("tmdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_41a289eb1fa489c1bc6f38d9c3" ON "media" ("tvdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7ff2d11f6a83cb52386eaebe74" ON "media" ("imdbId") `
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "IDX_7ff2d11f6a83cb52386eaebe74"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_41a289eb1fa489c1bc6f38d9c3"`);
|
||||
await queryRunner.query(`DROP INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5"`);
|
||||
await queryRunner.query(`ALTER TABLE "media" RENAME TO "temporary_media"`);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "media" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "mediaType" varchar NOT NULL, "tmdbId" integer NOT NULL, "tvdbId" integer, "imdbId" varchar, "status" integer NOT NULL DEFAULT (1), "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "UQ_7157aad07c73f6a6ae3bbd5ef5e" UNIQUE ("tmdbId"), CONSTRAINT "UQ_41a289eb1fa489c1bc6f38d9c3c" UNIQUE ("tvdbId"))`
|
||||
);
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "media"("id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt") SELECT "id", "mediaType", "tmdbId", "tvdbId", "imdbId", "status", "createdAt", "updatedAt" FROM "temporary_media"`
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "temporary_media"`);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7ff2d11f6a83cb52386eaebe74" ON "media" ("imdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_41a289eb1fa489c1bc6f38d9c3" ON "media" ("tvdbId") `
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7157aad07c73f6a6ae3bbd5ef5" ON "media" ("tmdbId") `
|
||||
);
|
||||
}
|
||||
}
|
||||
29
server/models/Collection.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { TmdbCollection } from '../api/themoviedb';
|
||||
import Media from '../entity/Media';
|
||||
import { mapMovieResult, MovieResult } from './Search';
|
||||
|
||||
export interface Collection {
|
||||
id: number;
|
||||
name: string;
|
||||
overview?: string;
|
||||
posterPath?: string;
|
||||
backdropPath?: string;
|
||||
parts: MovieResult[];
|
||||
}
|
||||
|
||||
export const mapCollection = (
|
||||
collection: TmdbCollection,
|
||||
media: Media[]
|
||||
): Collection => ({
|
||||
id: collection.id,
|
||||
name: collection.name,
|
||||
overview: collection.overview,
|
||||
posterPath: collection.poster_path,
|
||||
backdropPath: collection.backdrop_path,
|
||||
parts: collection.parts.map((part) =>
|
||||
mapMovieResult(
|
||||
part,
|
||||
media?.find((req) => req.tmdbId === part.id)
|
||||
)
|
||||
),
|
||||
});
|
||||
@@ -8,9 +8,26 @@ import {
|
||||
mapCrew,
|
||||
ExternalIds,
|
||||
mapExternalIds,
|
||||
mapVideos,
|
||||
} from './common';
|
||||
import Media from '../entity/Media';
|
||||
|
||||
export interface Video {
|
||||
url?: string;
|
||||
site: 'YouTube';
|
||||
key: string;
|
||||
name: string;
|
||||
size: number;
|
||||
type:
|
||||
| 'Clip'
|
||||
| 'Teaser'
|
||||
| 'Trailer'
|
||||
| 'Featurette'
|
||||
| 'Opening Credits'
|
||||
| 'Behind the Scenes'
|
||||
| 'Bloopers';
|
||||
}
|
||||
|
||||
export interface MovieDetails {
|
||||
id: number;
|
||||
imdbId?: string;
|
||||
@@ -23,6 +40,7 @@ export interface MovieDetails {
|
||||
originalTitle: string;
|
||||
overview?: string;
|
||||
popularity: number;
|
||||
relatedVideos?: Video[];
|
||||
posterPath?: string;
|
||||
productionCompanies: ProductionCompany[];
|
||||
productionCountries: {
|
||||
@@ -46,6 +64,12 @@ export interface MovieDetails {
|
||||
cast: Cast[];
|
||||
crew: Crew[];
|
||||
};
|
||||
collection?: {
|
||||
id: number;
|
||||
name: string;
|
||||
posterPath?: string;
|
||||
backdropPath?: string;
|
||||
};
|
||||
mediaInfo?: Media;
|
||||
externalIds: ExternalIds;
|
||||
}
|
||||
@@ -58,6 +82,7 @@ export const mapMovieDetails = (
|
||||
adult: movie.adult,
|
||||
budget: movie.budget,
|
||||
genres: movie.genres,
|
||||
relatedVideos: mapVideos(movie.videos),
|
||||
originalLanguage: movie.original_language,
|
||||
originalTitle: movie.original_title,
|
||||
popularity: movie.popularity,
|
||||
@@ -87,6 +112,14 @@ export const mapMovieDetails = (
|
||||
cast: movie.credits.cast.map(mapCast),
|
||||
crew: movie.credits.crew.map(mapCrew),
|
||||
},
|
||||
collection: movie.belongs_to_collection
|
||||
? {
|
||||
id: movie.belongs_to_collection.id,
|
||||
name: movie.belongs_to_collection.name,
|
||||
posterPath: movie.belongs_to_collection.poster_path,
|
||||
backdropPath: movie.belongs_to_collection.backdrop_path,
|
||||
}
|
||||
: undefined,
|
||||
externalIds: mapExternalIds(movie.external_ids),
|
||||
mediaInfo: media,
|
||||
});
|
||||
|
||||
@@ -78,7 +78,7 @@ export const mapTvResult = (
|
||||
media?: Media
|
||||
): TvResult => ({
|
||||
id: tvResult.id,
|
||||
firstAirDate: tvResult.first_air_Date,
|
||||
firstAirDate: tvResult.first_air_date,
|
||||
genreIds: tvResult.genre_ids,
|
||||
// Some results from tmdb dont return the mediaType so we force it here!
|
||||
mediaType: tvResult.media_type || 'tv',
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
ExternalIds,
|
||||
mapExternalIds,
|
||||
Keyword,
|
||||
mapVideos,
|
||||
} from './common';
|
||||
import {
|
||||
TmdbTvEpisodeResult,
|
||||
@@ -16,6 +17,7 @@ import {
|
||||
TmdbSeasonWithEpisodes,
|
||||
} from '../api/themoviedb';
|
||||
import type Media from '../entity/Media';
|
||||
import { Video } from './Movie';
|
||||
|
||||
interface Episode {
|
||||
id: number;
|
||||
@@ -67,6 +69,7 @@ export interface TvDetails {
|
||||
genres: Genre[];
|
||||
homepage: string;
|
||||
inProduction: boolean;
|
||||
relatedVideos?: Video[];
|
||||
languages: string[];
|
||||
lastAirDate: string;
|
||||
lastEpisodeToAir?: Episode;
|
||||
@@ -145,6 +148,7 @@ export const mapTvDetails = (
|
||||
id: genre.id,
|
||||
name: genre.name,
|
||||
})),
|
||||
relatedVideos: mapVideos(show.videos),
|
||||
homepage: show.homepage,
|
||||
id: show.id,
|
||||
inProduction: show.in_production,
|
||||
|
||||
@@ -2,8 +2,12 @@ import {
|
||||
TmdbCreditCast,
|
||||
TmdbCreditCrew,
|
||||
TmdbExternalIds,
|
||||
TmdbVideo,
|
||||
TmdbVideoResult,
|
||||
} from '../api/themoviedb';
|
||||
|
||||
import { Video } from '../models/Movie';
|
||||
|
||||
export interface ProductionCompany {
|
||||
id: number;
|
||||
logoPath?: string;
|
||||
@@ -84,3 +88,18 @@ export const mapExternalIds = (eids: TmdbExternalIds): ExternalIds => ({
|
||||
tvrageId: eids.tvrage_id,
|
||||
twitterId: eids.twitter_id,
|
||||
});
|
||||
|
||||
export const mapVideos = (videoResult: TmdbVideoResult): Video[] =>
|
||||
videoResult?.results.map(({ key, name, size, type, site }: TmdbVideo) => ({
|
||||
site,
|
||||
key,
|
||||
name,
|
||||
size,
|
||||
type,
|
||||
url: siteUrlCreator(site, key),
|
||||
}));
|
||||
|
||||
const siteUrlCreator = (site: Video['site'], key: string): string =>
|
||||
({
|
||||
YouTube: `https://www.youtube.com/watch?v=${key}/`,
|
||||
}[site]);
|
||||
|
||||
@@ -5,6 +5,7 @@ import PlexTvAPI from '../api/plextv';
|
||||
import { isAuthenticated } from '../middleware/auth';
|
||||
import { Permission } from '../lib/permissions';
|
||||
import logger from '../logger';
|
||||
import { getSettings } from '../lib/settings';
|
||||
|
||||
const authRoutes = Router();
|
||||
|
||||
@@ -25,6 +26,7 @@ authRoutes.get('/me', isAuthenticated(), async (req, res) => {
|
||||
});
|
||||
|
||||
authRoutes.post('/login', async (req, res, next) => {
|
||||
const settings = getSettings();
|
||||
const userRepository = getRepository(User);
|
||||
const body = req.body as { authToken?: string };
|
||||
|
||||
@@ -69,44 +71,48 @@ authRoutes.post('/login', async (req, res, next) => {
|
||||
await userRepository.save(user);
|
||||
}
|
||||
|
||||
// If we get to this point, the user does not already exist so we need to create the
|
||||
// user _assuming_ they have access to the plex server
|
||||
const mainUser = await userRepository.findOneOrFail({
|
||||
select: ['id', 'plexToken'],
|
||||
order: { id: 'ASC' },
|
||||
});
|
||||
const mainPlexTv = new PlexTvAPI(mainUser.plexToken ?? '');
|
||||
if (await mainPlexTv.checkUserAccess(account)) {
|
||||
user = new User({
|
||||
email: account.email,
|
||||
username: account.username,
|
||||
plexId: account.id,
|
||||
plexToken: account.authToken,
|
||||
permissions: Permission.REQUEST,
|
||||
avatar: account.thumb,
|
||||
});
|
||||
await userRepository.save(user);
|
||||
} else {
|
||||
logger.info(
|
||||
'Failed login attempt from user without access to plex server',
|
||||
{
|
||||
label: 'Auth',
|
||||
account: {
|
||||
...account,
|
||||
authentication_token: '__REDACTED__',
|
||||
authToken: '__REDACTED__',
|
||||
},
|
||||
}
|
||||
);
|
||||
return next({
|
||||
status: 403,
|
||||
message: 'You do not have access to this Plex server',
|
||||
// Double check that we didn't create the first admin user before running this
|
||||
if (!user) {
|
||||
// If we get to this point, the user does not already exist so we need to create the
|
||||
// user _assuming_ they have access to the plex server
|
||||
const mainUser = await userRepository.findOneOrFail({
|
||||
select: ['id', 'plexToken'],
|
||||
order: { id: 'ASC' },
|
||||
});
|
||||
const mainPlexTv = new PlexTvAPI(mainUser.plexToken ?? '');
|
||||
|
||||
if (await mainPlexTv.checkUserAccess(account)) {
|
||||
user = new User({
|
||||
email: account.email,
|
||||
username: account.username,
|
||||
plexId: account.id,
|
||||
plexToken: account.authToken,
|
||||
permissions: settings.main.defaultPermissions,
|
||||
avatar: account.thumb,
|
||||
});
|
||||
await userRepository.save(user);
|
||||
} else {
|
||||
logger.info(
|
||||
'Failed login attempt from user without access to plex server',
|
||||
{
|
||||
label: 'Auth',
|
||||
account: {
|
||||
...account,
|
||||
authentication_token: '__REDACTED__',
|
||||
authToken: '__REDACTED__',
|
||||
},
|
||||
}
|
||||
);
|
||||
return next({
|
||||
status: 403,
|
||||
message: 'You do not have access to this Plex server',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set logged in session
|
||||
if (req.session && user) {
|
||||
if (req.session) {
|
||||
req.session.userId = user.id;
|
||||
}
|
||||
|
||||
|
||||
27
server/routes/collection.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Router } from 'express';
|
||||
import TheMovieDb from '../api/themoviedb';
|
||||
import Media from '../entity/Media';
|
||||
import { mapCollection } from '../models/Collection';
|
||||
|
||||
const collectionRoutes = Router();
|
||||
|
||||
collectionRoutes.get<{ id: string }>('/:id', async (req, res, next) => {
|
||||
const tmdb = new TheMovieDb();
|
||||
|
||||
try {
|
||||
const collection = await tmdb.getCollection({
|
||||
collectionId: Number(req.params.id),
|
||||
language: req.query.language as string,
|
||||
});
|
||||
|
||||
const media = await Media.getRelatedMedia(
|
||||
collection.parts.map((part) => part.id)
|
||||
);
|
||||
|
||||
return res.status(200).json(mapCollection(collection, media));
|
||||
} catch (e) {
|
||||
return next({ status: 404, message: 'Collection does not exist' });
|
||||
}
|
||||
});
|
||||
|
||||
export default collectionRoutes;
|
||||
@@ -12,6 +12,7 @@ import movieRoutes from './movie';
|
||||
import tvRoutes from './tv';
|
||||
import mediaRoutes from './media';
|
||||
import personRoutes from './person';
|
||||
import collectionRoutes from './collection';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -34,6 +35,7 @@ router.use('/movie', isAuthenticated(), movieRoutes);
|
||||
router.use('/tv', isAuthenticated(), tvRoutes);
|
||||
router.use('/media', isAuthenticated(), mediaRoutes);
|
||||
router.use('/person', isAuthenticated(), personRoutes);
|
||||
router.use('/collection', isAuthenticated(), collectionRoutes);
|
||||
router.use('/auth', authRoutes);
|
||||
|
||||
router.get('/', (_req, res) => {
|
||||
|
||||
@@ -4,6 +4,7 @@ import { mapMovieDetails } from '../models/Movie';
|
||||
import { mapMovieResult } from '../models/Search';
|
||||
import Media from '../entity/Media';
|
||||
import RottenTomatoes from '../api/rottentomatoes';
|
||||
import logger from '../logger';
|
||||
|
||||
const movieRoutes = Router();
|
||||
|
||||
@@ -11,15 +12,19 @@ movieRoutes.get('/:id', async (req, res, next) => {
|
||||
const tmdb = new TheMovieDb();
|
||||
|
||||
try {
|
||||
const movie = await tmdb.getMovie({
|
||||
const tmdbMovie = await tmdb.getMovie({
|
||||
movieId: Number(req.params.id),
|
||||
language: req.query.language as string,
|
||||
});
|
||||
|
||||
const media = await Media.getMedia(movie.id);
|
||||
const media = await Media.getMedia(tmdbMovie.id);
|
||||
|
||||
return res.status(200).json(mapMovieDetails(movie, media));
|
||||
return res.status(200).json(mapMovieDetails(tmdbMovie, media));
|
||||
} catch (e) {
|
||||
logger.error('Something went wrong getting movie', {
|
||||
label: 'Movie',
|
||||
message: e.message,
|
||||
});
|
||||
return next({ status: 404, message: 'Movie does not exist' });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -127,12 +127,16 @@ requestRoutes.post(
|
||||
media,
|
||||
requestedBy: req.user,
|
||||
// If the user is an admin or has the "auto approve" permission, automatically approve the request
|
||||
status: req.user?.hasPermission(Permission.AUTO_APPROVE)
|
||||
? MediaRequestStatus.APPROVED
|
||||
: MediaRequestStatus.PENDING,
|
||||
modifiedBy: req.user?.hasPermission(Permission.AUTO_APPROVE)
|
||||
? req.user
|
||||
: undefined,
|
||||
status:
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE) ||
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE_MOVIE)
|
||||
? MediaRequestStatus.APPROVED
|
||||
: MediaRequestStatus.PENDING,
|
||||
modifiedBy:
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE) ||
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE_MOVIE)
|
||||
? req.user
|
||||
: undefined,
|
||||
});
|
||||
|
||||
await requestRepository.save(request);
|
||||
@@ -172,19 +176,25 @@ requestRoutes.post(
|
||||
} as Media,
|
||||
requestedBy: req.user,
|
||||
// If the user is an admin or has the "auto approve" permission, automatically approve the request
|
||||
status: req.user?.hasPermission(Permission.AUTO_APPROVE)
|
||||
? MediaRequestStatus.APPROVED
|
||||
: MediaRequestStatus.PENDING,
|
||||
modifiedBy: req.user?.hasPermission(Permission.AUTO_APPROVE)
|
||||
? req.user
|
||||
: undefined,
|
||||
status:
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE) ||
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE_TV)
|
||||
? MediaRequestStatus.APPROVED
|
||||
: MediaRequestStatus.PENDING,
|
||||
modifiedBy:
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE) ||
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE_TV)
|
||||
? req.user
|
||||
: undefined,
|
||||
seasons: finalSeasons.map(
|
||||
(sn) =>
|
||||
new SeasonRequest({
|
||||
seasonNumber: sn,
|
||||
status: req.user?.hasPermission(Permission.AUTO_APPROVE)
|
||||
? MediaRequestStatus.APPROVED
|
||||
: MediaRequestStatus.PENDING,
|
||||
status:
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE) ||
|
||||
req.user?.hasPermission(Permission.AUTO_APPROVE_TV)
|
||||
? MediaRequestStatus.APPROVED
|
||||
: MediaRequestStatus.PENDING,
|
||||
})
|
||||
),
|
||||
});
|
||||
@@ -244,6 +254,32 @@ requestRoutes.delete('/:requestId', async (req, res, next) => {
|
||||
}
|
||||
});
|
||||
|
||||
requestRoutes.post<{
|
||||
requestId: string;
|
||||
}>(
|
||||
'/:requestId/retry',
|
||||
isAuthenticated(Permission.MANAGE_REQUESTS),
|
||||
async (req, res, next) => {
|
||||
const requestRepository = getRepository(MediaRequest);
|
||||
|
||||
try {
|
||||
const request = await requestRepository.findOneOrFail({
|
||||
where: { id: Number(req.params.requestId) },
|
||||
relations: ['requestedBy', 'modifiedBy'],
|
||||
});
|
||||
|
||||
await request.updateParentStatus();
|
||||
await request.sendMedia();
|
||||
return res.status(200).json(request);
|
||||
} catch (e) {
|
||||
logger.error('Error processing request retry', {
|
||||
label: 'Media Request',
|
||||
message: e.message,
|
||||
});
|
||||
next({ status: 404, message: 'Request not found' });
|
||||
}
|
||||
}
|
||||
);
|
||||
requestRoutes.get<{
|
||||
requestId: string;
|
||||
status: 'pending' | 'approve' | 'decline';
|
||||
|
||||
@@ -16,11 +16,15 @@ import logger from '../logger';
|
||||
import { scheduledJobs } from '../job/schedule';
|
||||
import { Permission } from '../lib/permissions';
|
||||
import { isAuthenticated } from '../middleware/auth';
|
||||
import { merge } from 'lodash';
|
||||
import { merge, omit } from 'lodash';
|
||||
import Media from '../entity/Media';
|
||||
import { MediaRequest } from '../entity/MediaRequest';
|
||||
import { getAppVersion } from '../utils/appVersion';
|
||||
import { SettingsAboutResponse } from '../interfaces/api/settingsInterfaces';
|
||||
import { Notification } from '../lib/notifications';
|
||||
import DiscordAgent from '../lib/notifications/agents/discord';
|
||||
import EmailAgent from '../lib/notifications/agents/email';
|
||||
import SlackAgent from '../lib/notifications/agents/slack';
|
||||
|
||||
const settingsRoutes = Router();
|
||||
|
||||
@@ -29,9 +33,7 @@ const filteredMainSettings = (
|
||||
main: MainSettings
|
||||
): Partial<MainSettings> => {
|
||||
if (!user?.hasPermission(Permission.ADMIN)) {
|
||||
return {
|
||||
applicationUrl: main.applicationUrl,
|
||||
};
|
||||
return omit(main, 'apiKey');
|
||||
}
|
||||
|
||||
return main;
|
||||
@@ -448,6 +450,59 @@ settingsRoutes.post('/notifications/discord', (req, res) => {
|
||||
res.status(200).json(settings.notifications.agents.discord);
|
||||
});
|
||||
|
||||
settingsRoutes.post('/notifications/discord/test', (req, res, next) => {
|
||||
if (!req.user) {
|
||||
return next({
|
||||
status: 500,
|
||||
message: 'User information missing from request',
|
||||
});
|
||||
}
|
||||
|
||||
const discordAgent = new DiscordAgent(req.body);
|
||||
discordAgent.send(Notification.TEST_NOTIFICATION, {
|
||||
notifyUser: req.user,
|
||||
subject: 'Test Notification',
|
||||
message:
|
||||
'This is a test notification! Check check, 1, 2, 3. Are we coming in clear?',
|
||||
});
|
||||
|
||||
return res.status(204).send();
|
||||
});
|
||||
|
||||
settingsRoutes.get('/notifications/slack', (_req, res) => {
|
||||
const settings = getSettings();
|
||||
|
||||
res.status(200).json(settings.notifications.agents.slack);
|
||||
});
|
||||
|
||||
settingsRoutes.post('/notifications/slack', (req, res) => {
|
||||
const settings = getSettings();
|
||||
|
||||
settings.notifications.agents.slack = req.body;
|
||||
settings.save();
|
||||
|
||||
res.status(200).json(settings.notifications.agents.slack);
|
||||
});
|
||||
|
||||
settingsRoutes.post('/notifications/slack/test', (req, res, next) => {
|
||||
if (!req.user) {
|
||||
return next({
|
||||
status: 500,
|
||||
message: 'User information missing from request',
|
||||
});
|
||||
}
|
||||
|
||||
const slackAgent = new SlackAgent(req.body);
|
||||
slackAgent.send(Notification.TEST_NOTIFICATION, {
|
||||
notifyUser: req.user,
|
||||
subject: 'Test Notification',
|
||||
message:
|
||||
'This is a test notification! Check check, 1, 2, 3. Are we coming in clear?',
|
||||
});
|
||||
|
||||
return res.status(204).send();
|
||||
});
|
||||
|
||||
settingsRoutes.get('/notifications/email', (_req, res) => {
|
||||
const settings = getSettings();
|
||||
|
||||
@@ -463,6 +518,25 @@ settingsRoutes.post('/notifications/email', (req, res) => {
|
||||
res.status(200).json(settings.notifications.agents.email);
|
||||
});
|
||||
|
||||
settingsRoutes.post('/notifications/email/test', (req, res, next) => {
|
||||
if (!req.user) {
|
||||
return next({
|
||||
status: 500,
|
||||
message: 'User information missing from request',
|
||||
});
|
||||
}
|
||||
|
||||
const emailAgent = new EmailAgent(req.body);
|
||||
emailAgent.send(Notification.TEST_NOTIFICATION, {
|
||||
notifyUser: req.user,
|
||||
subject: 'Test Notification',
|
||||
message:
|
||||
'This is a test notification! Check check, 1, 2, 3. Are we coming in clear?',
|
||||
});
|
||||
|
||||
return res.status(204).send();
|
||||
});
|
||||
|
||||
settingsRoutes.get('/about', async (req, res) => {
|
||||
const mediaRepository = getRepository(Media);
|
||||
const mediaRequestRepository = getRepository(MediaRequest);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Router } from 'express';
|
||||
import { getRepository } from 'typeorm';
|
||||
import PlexTvAPI from '../api/plextv';
|
||||
import { MediaRequest } from '../entity/MediaRequest';
|
||||
import { User } from '../entity/User';
|
||||
import { hasPermission, Permission } from '../lib/permissions';
|
||||
import { getSettings } from '../lib/settings';
|
||||
import logger from '../logger';
|
||||
|
||||
const router = Router();
|
||||
@@ -142,4 +144,51 @@ router.delete<{ id: string }>('/:id', async (req, res, next) => {
|
||||
}
|
||||
});
|
||||
|
||||
router.post('/import-from-plex', async (req, res, next) => {
|
||||
try {
|
||||
const settings = getSettings();
|
||||
const userRepository = getRepository(User);
|
||||
|
||||
// taken from auth.ts
|
||||
const mainUser = await userRepository.findOneOrFail({
|
||||
select: ['id', 'plexToken'],
|
||||
order: { id: 'ASC' },
|
||||
});
|
||||
const mainPlexTv = new PlexTvAPI(mainUser.plexToken ?? '');
|
||||
|
||||
const plexUsersResponse = await mainPlexTv.getUsers();
|
||||
const createdUsers: User[] = [];
|
||||
for (const rawUser of plexUsersResponse.MediaContainer.User) {
|
||||
const account = rawUser.$;
|
||||
const user = await userRepository.findOne({
|
||||
where: { plexId: account.id },
|
||||
});
|
||||
if (user) {
|
||||
// Update the users avatar with their plex thumbnail (incase it changed)
|
||||
user.avatar = account.thumb;
|
||||
user.email = account.email;
|
||||
user.username = account.username;
|
||||
await userRepository.save(user);
|
||||
} else {
|
||||
// Check to make sure it's a real account
|
||||
if (account.email && account.username) {
|
||||
const newUser = new User({
|
||||
username: account.username,
|
||||
email: account.email,
|
||||
permissions: settings.main.defaultPermissions,
|
||||
plexId: parseInt(account.id),
|
||||
plexToken: '',
|
||||
avatar: account.thumb,
|
||||
});
|
||||
await userRepository.save(newUser);
|
||||
createdUsers.push(newUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
return res.status(201).json(User.filterMany(createdUsers));
|
||||
} catch (e) {
|
||||
next({ status: 500, message: e.message });
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -29,6 +29,7 @@ export class MediaSubscriber implements EntitySubscriberInterface {
|
||||
notifyUser: request.requestedBy,
|
||||
subject: movie.title,
|
||||
message: movie.overview,
|
||||
media: entity,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${movie.poster_path}`,
|
||||
});
|
||||
});
|
||||
@@ -79,6 +80,7 @@ export class MediaSubscriber implements EntitySubscriberInterface {
|
||||
message: tv.overview,
|
||||
notifyUser: request.requestedBy,
|
||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${tv.poster_path}`,
|
||||
media: entity,
|
||||
extra: [
|
||||
{
|
||||
name: 'Seasons',
|
||||
|
||||
@@ -47,7 +47,7 @@ div(role='article' aria-roledescription='email' aria-label='' lang='en')
|
||||
padding-bottom: 25px;\
|
||||
text-align: center;\
|
||||
')
|
||||
a(href=actionUrl style='\
|
||||
a(href=applicationUrl style='\
|
||||
text-shadow: 0 1px 0 #ffffff;\
|
||||
font-weight: 700;\
|
||||
font-size: 16px;\
|
||||
@@ -92,7 +92,7 @@ div(role='article' aria-roledescription='email' aria-label='' lang='en')
|
||||
margin-bottom: 20px;\
|
||||
color: #51545e;\
|
||||
')
|
||||
a(href=actionUrl style='color: #3869d4') Open Overseerr
|
||||
a(href=actionUrl style='color: #3869d4') Open Media in Overseerr
|
||||
tr
|
||||
td
|
||||
table.sm-w-full(align='center' style='\
|
||||
|
||||
96
server/templates/email/test-email/html.pug
Normal file
@@ -0,0 +1,96 @@
|
||||
doctype html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(name='x-apple-disable-message-reformatting')
|
||||
meta(http-equiv='x-ua-compatible' content='ie=edge')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
meta(name='format-detection' content='telephone=no, date=no, address=no, email=no')
|
||||
link(href='https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap' rel='stylesheet' media='screen')
|
||||
//if mso
|
||||
xml
|
||||
o:officedocumentsettings
|
||||
o:pixelsperinch 96
|
||||
style.
|
||||
td,
|
||||
th,
|
||||
div,
|
||||
p,
|
||||
a,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Segoe UI', sans-serif;
|
||||
mso-line-height-rule: exactly;
|
||||
}
|
||||
style.
|
||||
@media (max-width: 600px) {
|
||||
.sm-w-full {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
div(role='article' aria-roledescription='email' aria-label='' lang='en')
|
||||
table(style="\
|
||||
background-color: #f2f4f6;\
|
||||
font-family: 'Nunito Sans', -apple-system, 'Segoe UI', sans-serif;\
|
||||
width: 100%;\
|
||||
" width='100%' bgcolor='#f2f4f6' cellpadding='0' cellspacing='0' role='presentation')
|
||||
tr
|
||||
td(align='center')
|
||||
table(style='width: 100%' width='100%' cellpadding='0' cellspacing='0' role='presentation')
|
||||
tr
|
||||
td(align='center' style='\
|
||||
font-size: 16px;\
|
||||
padding-top: 25px;\
|
||||
padding-bottom: 25px;\
|
||||
text-align: center;\
|
||||
')
|
||||
a(href=applicationUrl style='\
|
||||
text-shadow: 0 1px 0 #ffffff;\
|
||||
font-weight: 700;\
|
||||
font-size: 16px;\
|
||||
color: #a8aaaf;\
|
||||
text-decoration: none;\
|
||||
')
|
||||
| Overseerr
|
||||
tr
|
||||
td(style='width: 100%' width='100%')
|
||||
table.sm-w-full(align='center' style='\
|
||||
background-color: #ffffff;\
|
||||
margin-left: auto;\
|
||||
margin-right: auto;\
|
||||
width: 570px;\
|
||||
' width='570' bgcolor='#ffffff' cellpadding='0' cellspacing='0' role='presentation')
|
||||
tr
|
||||
td(style='padding: 45px')
|
||||
div(style='font-size: 16px')
|
||||
| #{body}
|
||||
p(style='\
|
||||
font-size: 13px;\
|
||||
line-height: 24px;\
|
||||
margin-top: 6px;\
|
||||
margin-bottom: 20px;\
|
||||
color: #51545e;\
|
||||
')
|
||||
a(href=applicationUrl style='color: #3869d4') Open Overseerr
|
||||
tr
|
||||
td
|
||||
table.sm-w-full(align='center' style='\
|
||||
margin-left: auto;\
|
||||
margin-right: auto;\
|
||||
text-align: center;\
|
||||
width: 570px;\
|
||||
' width='570' cellpadding='0' cellspacing='0' role='presentation')
|
||||
tr
|
||||
td(align='center' style='font-size: 16px; padding: 45px')
|
||||
p(style='\
|
||||
font-size: 13px;\
|
||||
line-height: 24px;\
|
||||
margin-top: 6px;\
|
||||
margin-bottom: 20px;\
|
||||
text-align: center;\
|
||||
color: #a8aaaf;\
|
||||
')
|
||||
| Overseerr.
|
||||
1
server/templates/email/test-email/subject.pug
Normal file
@@ -0,0 +1 @@
|
||||
= `Test Notification - Overseerr`
|
||||
6
src/assets/ellipsis.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg width="22" height="10" viewBox="0 0 22 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="22" height="10" rx="2" fill="#718096"/>
|
||||
<circle cx="5" cy="5" r="2" fill="#E2E8F0"/>
|
||||
<circle cx="11" cy="5" r="2" fill="#E2E8F0"/>
|
||||
<circle cx="17" cy="5" r="2" fill="#E2E8F0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 293 B |
1
src/assets/extlogos/discord_white.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="discord" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M297.216 243.2c0 15.616-11.52 28.416-26.112 28.416-14.336 0-26.112-12.8-26.112-28.416s11.52-28.416 26.112-28.416c14.592 0 26.112 12.8 26.112 28.416zm-119.552-28.416c-14.592 0-26.112 12.8-26.112 28.416s11.776 28.416 26.112 28.416c14.592 0 26.112-12.8 26.112-28.416.256-15.616-11.52-28.416-26.112-28.416zM448 52.736V512c-64.494-56.994-43.868-38.128-118.784-107.776l13.568 47.36H52.48C23.552 451.584 0 428.032 0 398.848V52.736C0 23.552 23.552 0 52.48 0h343.04C424.448 0 448 23.552 448 52.736zm-72.96 242.688c0-82.432-36.864-149.248-36.864-149.248-36.864-27.648-71.936-26.88-71.936-26.88l-3.584 4.096c43.52 13.312 63.744 32.512 63.744 32.512-60.811-33.329-132.244-33.335-191.232-7.424-9.472 4.352-15.104 7.424-15.104 7.424s21.248-20.224 67.328-33.536l-2.56-3.072s-35.072-.768-71.936 26.88c0 0-36.864 66.816-36.864 149.248 0 0 21.504 37.12 78.08 38.912 0 0 9.472-11.52 17.152-21.248-32.512-9.728-44.8-30.208-44.8-30.208 3.766 2.636 9.976 6.053 10.496 6.4 43.21 24.198 104.588 32.126 159.744 8.96 8.96-3.328 18.944-8.192 29.44-15.104 0 0-12.8 20.992-46.336 30.464 7.68 9.728 16.896 20.736 16.896 20.736 56.576-1.792 78.336-38.912 78.336-38.912z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
src/assets/extlogos/slack.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="slack" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M43.5 0H0L43.5 43.5V0Z" fill="#E53E3E"/>
|
||||
<path d="M43.5 0H0L43.5 43.5V0Z" fill="#667EEA"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M31 20.2C32.9096 20.2 34.7409 19.4414 36.0912 18.0912C37.4414 16.7409 38.2 14.9095 38.2 13C38.2 11.0904 37.4414 9.25908 36.0912 7.90882C34.7409 6.55856 32.9096 5.79999 31 5.79999C29.0904 5.79999 27.2591 6.55856 25.9088 7.90882C24.5586 9.25908 23.8 11.0904 23.8 13C23.8 14.9095 24.5586 16.7409 25.9088 18.0912C27.2591 19.4414 29.0904 20.2 31 20.2ZM31.9 9.39999C31.9 9.16129 31.8052 8.93237 31.6364 8.76359C31.4676 8.59481 31.2387 8.49999 31 8.49999C30.7613 8.49999 30.5324 8.59481 30.3636 8.76359C30.1948 8.93237 30.1 9.16129 30.1 9.39999V13C30.1 13.2387 30.1949 13.4675 30.3637 13.6363L32.9089 16.1824C32.9925 16.266 33.0918 16.3323 33.201 16.3776C33.3103 16.4228 33.4274 16.4461 33.5456 16.4461C33.6639 16.4461 33.781 16.4228 33.8903 16.3776C33.9995 16.3323 34.0988 16.266 34.1824 16.1824C34.266 16.0988 34.3323 15.9995 34.3776 15.8902C34.4229 15.781 34.4461 15.6639 34.4461 15.5456C34.4461 15.4274 34.4229 15.3103 34.3776 15.201C34.3323 15.0918 34.266 14.9925 34.1824 14.9089L31.9 12.6274V9.39999Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
267
src/components/CollectionDetails/index.tsx
Normal file
@@ -0,0 +1,267 @@
|
||||
import axios from 'axios';
|
||||
import Head from 'next/head';
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useContext, useState } from 'react';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
import useSWR from 'swr';
|
||||
import { MediaStatus } from '../../../server/constants/media';
|
||||
import type { MediaRequest } from '../../../server/entity/MediaRequest';
|
||||
import type { Collection } from '../../../server/models/Collection';
|
||||
import { LanguageContext } from '../../context/LanguageContext';
|
||||
import globalMessages from '../../i18n/globalMessages';
|
||||
import Error from '../../pages/_error';
|
||||
import Badge from '../Common/Badge';
|
||||
import Button from '../Common/Button';
|
||||
import LoadingSpinner from '../Common/LoadingSpinner';
|
||||
import Modal from '../Common/Modal';
|
||||
import Slider from '../Slider';
|
||||
import TitleCard from '../TitleCard';
|
||||
import Transition from '../Transition';
|
||||
|
||||
const messages = defineMessages({
|
||||
overviewunavailable: 'Overview unavailable',
|
||||
overview: 'Overview',
|
||||
movies: 'Movies',
|
||||
numberofmovies: 'Number of Movies: {count}',
|
||||
requesting: 'Requesting…',
|
||||
request: 'Request',
|
||||
requestcollection: 'Request Collection',
|
||||
requestswillbecreated:
|
||||
'The following titles will have requests created for them:',
|
||||
requestSuccess: '<strong>{title}</strong> successfully requested!',
|
||||
});
|
||||
|
||||
interface CollectionDetailsProps {
|
||||
collection?: Collection;
|
||||
}
|
||||
|
||||
const CollectionDetails: React.FC<CollectionDetailsProps> = ({
|
||||
collection,
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const router = useRouter();
|
||||
const { addToast } = useToasts();
|
||||
const { locale } = useContext(LanguageContext);
|
||||
const [requestModal, setRequestModal] = useState(false);
|
||||
const [isRequesting, setRequesting] = useState(false);
|
||||
const { data, error, revalidate } = useSWR<Collection>(
|
||||
`/api/v1/collection/${router.query.collectionId}?language=${locale}`,
|
||||
{
|
||||
initialData: collection,
|
||||
revalidateOnMount: true,
|
||||
}
|
||||
);
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return <Error statusCode={404} />;
|
||||
}
|
||||
|
||||
const requestableParts = data.parts.filter(
|
||||
(part) => !part.mediaInfo || part.mediaInfo.status === MediaStatus.UNKNOWN
|
||||
);
|
||||
|
||||
const requestBundle = async () => {
|
||||
try {
|
||||
setRequesting(true);
|
||||
await Promise.all(
|
||||
requestableParts.map(async (part) => {
|
||||
await axios.post<MediaRequest>('/api/v1/request', {
|
||||
mediaId: part.id,
|
||||
mediaType: 'movie',
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
addToast(
|
||||
<span>
|
||||
{intl.formatMessage(messages.requestSuccess, {
|
||||
title: data?.name,
|
||||
strong: function strong(msg) {
|
||||
return <strong>{msg}</strong>;
|
||||
},
|
||||
})}
|
||||
</span>,
|
||||
{ appearance: 'success', autoDismiss: true }
|
||||
);
|
||||
} catch (e) {
|
||||
addToast('Something went wrong requesting the collection.', {
|
||||
appearance: 'error',
|
||||
autoDismiss: true,
|
||||
});
|
||||
} finally {
|
||||
setRequesting(false);
|
||||
setRequestModal(false);
|
||||
revalidate();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className="px-4 pt-4 -mx-4 -mt-2 bg-center bg-cover sm:px-8 "
|
||||
style={{
|
||||
height: 493,
|
||||
backgroundImage: `linear-gradient(180deg, rgba(17, 24, 39, 0.47) 0%, rgba(17, 24, 39, 1) 100%), url(//image.tmdb.org/t/p/w1920_and_h800_multi_faces/${data.backdropPath})`,
|
||||
}}
|
||||
>
|
||||
<Head>
|
||||
<title>{data.name} - Overseerr</title>
|
||||
</Head>
|
||||
<Transition
|
||||
enter="opacity-0 transition duration-300"
|
||||
enterFrom="opacity-0"
|
||||
enterTo="opacity-100"
|
||||
leave="opacity-100 transition duration-300"
|
||||
leaveFrom="opacity-100"
|
||||
leaveTo="opacity-0"
|
||||
show={requestModal}
|
||||
>
|
||||
<Modal
|
||||
onOk={() => requestBundle()}
|
||||
okText={
|
||||
isRequesting
|
||||
? intl.formatMessage(messages.requesting)
|
||||
: intl.formatMessage(messages.request)
|
||||
}
|
||||
okDisabled={isRequesting}
|
||||
okButtonType="primary"
|
||||
onCancel={() => setRequestModal(false)}
|
||||
title={intl.formatMessage(messages.requestcollection)}
|
||||
iconSvg={
|
||||
<svg
|
||||
className="w-6 h-6"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
>
|
||||
<p>{intl.formatMessage(messages.requestswillbecreated)}</p>
|
||||
<ul className="py-4 pl-8 list-disc">
|
||||
{data.parts
|
||||
.filter(
|
||||
(part) =>
|
||||
!part.mediaInfo ||
|
||||
part.mediaInfo?.status === MediaStatus.UNKNOWN
|
||||
)
|
||||
.map((part) => (
|
||||
<li key={`request-part-${part.id}`}>{part.title}</li>
|
||||
))}
|
||||
</ul>
|
||||
</Modal>
|
||||
</Transition>
|
||||
<div className="flex flex-col items-center pt-4 md:flex-row md:items-end">
|
||||
<div className="flex-shrink-0 md:mr-4">
|
||||
<img
|
||||
src={`//image.tmdb.org/t/p/w600_and_h900_bestv2${data.posterPath}`}
|
||||
alt=""
|
||||
className="w-32 rounded shadow md:rounded-lg md:shadow-2xl md:w-52"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col mt-4 text-center text-white md:mr-4 md:mt-0 md:text-left">
|
||||
<div className="mb-2">
|
||||
{data.parts.every(
|
||||
(part) => part.mediaInfo?.status === MediaStatus.AVAILABLE
|
||||
) && (
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.available)}
|
||||
</Badge>
|
||||
)}
|
||||
{!data.parts.every(
|
||||
(part) => part.mediaInfo?.status === MediaStatus.AVAILABLE
|
||||
) &&
|
||||
data.parts.some(
|
||||
(part) => part.mediaInfo?.status === MediaStatus.AVAILABLE
|
||||
) && (
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.partiallyavailable)}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
<h1 className="text-2xl md:text-4xl">{data.name}</h1>
|
||||
<span className="mt-1 text-xs md:text-base md:mt-0">
|
||||
{intl.formatMessage(messages.numberofmovies, {
|
||||
count: data.parts.length,
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex justify-end flex-1 mt-4 md:mt-0">
|
||||
{data.parts.some(
|
||||
(part) =>
|
||||
!part.mediaInfo || part.mediaInfo?.status === MediaStatus.UNKNOWN
|
||||
) && (
|
||||
<Button buttonType="primary" onClick={() => setRequestModal(true)}>
|
||||
<svg
|
||||
className="w-4 mr-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
||||
/>
|
||||
</svg>
|
||||
{intl.formatMessage(messages.requestcollection)}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col pt-8 pb-4 text-white md:flex-row">
|
||||
<div className="flex-1 md:mr-8">
|
||||
<h2 className="text-xl md:text-2xl">
|
||||
{intl.formatMessage(messages.overview)}
|
||||
</h2>
|
||||
<p className="pt-2 text-sm md:text-base">
|
||||
{data.overview
|
||||
? data.overview
|
||||
: intl.formatMessage(messages.overviewunavailable)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="inline-flex items-center text-xl leading-7 text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>{intl.formatMessage(messages.movies)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Slider
|
||||
sliderKey="collection-movies"
|
||||
isLoading={false}
|
||||
isEmpty={data.parts.length === 0}
|
||||
items={data.parts.map((title) => (
|
||||
<TitleCard
|
||||
key={`collection-movie-${title.id}`}
|
||||
id={title.id}
|
||||
image={title.posterPath}
|
||||
status={title.mediaInfo?.status}
|
||||
summary={title.overview}
|
||||
title={title.title}
|
||||
userScore={title.voteAverage}
|
||||
year={title.releaseDate}
|
||||
mediaType={title.mediaType}
|
||||
/>
|
||||
))}
|
||||
/>
|
||||
<div className="pb-8" />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CollectionDetails;
|
||||
@@ -2,31 +2,66 @@ import React from 'react';
|
||||
|
||||
interface AlertProps {
|
||||
title: string;
|
||||
type?: 'warning';
|
||||
type?: 'warning' | 'info';
|
||||
}
|
||||
|
||||
const Alert: React.FC<AlertProps> = ({ title, children }) => {
|
||||
return (
|
||||
<div className="rounded-md bg-yellow-600 p-4 mb-8">
|
||||
<div className="flex">
|
||||
<div className="flex-shrink-0">
|
||||
const Alert: React.FC<AlertProps> = ({ title, children, type }) => {
|
||||
let design = {
|
||||
bgColor: 'bg-yellow-600',
|
||||
titleColor: 'text-yellow-200',
|
||||
textColor: 'text-yellow-300',
|
||||
svg: (
|
||||
<svg
|
||||
className="w-5 h-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z"
|
||||
clipRule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
case 'info':
|
||||
design = {
|
||||
bgColor: 'bg-indigo-600',
|
||||
titleColor: 'text-indigo-200',
|
||||
textColor: 'text-indigo-300',
|
||||
svg: (
|
||||
<svg
|
||||
className="h-5 w-5 text-yellow-200"
|
||||
className="w-5 h-5"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z"
|
||||
clipRule="evenodd"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`rounded-md p-4 mb-8 ${design.bgColor}`}>
|
||||
<div className="flex">
|
||||
<div className={`flex-shrink-0 ${design.titleColor}`}>{design.svg}</div>
|
||||
<div className="ml-3">
|
||||
<h3 className="text-sm font-medium text-yellow-200">{title}</h3>
|
||||
<div className="mt-2 text-sm text-yellow-300">{children}</div>
|
||||
<h3 className={`text-sm font-medium ${design.titleColor}`}>
|
||||
{title}
|
||||
</h3>
|
||||
<div className={`mt-2 text-sm ${design.textColor}`}>{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@ const Button: React.FC<ButtonProps> = ({
|
||||
break;
|
||||
default:
|
||||
buttonStyle.push(
|
||||
'leading-5 font-medium rounded-md text-gray-200 bg-gray-500 hover:bg-gray-400 hover:text-white focus:border-blue-300 focus:ring-blue active:text-gray-200 active:bg-gray-400 disabled:opacity-50'
|
||||
'leading-5 font-medium rounded-md text-gray-200 bg-gray-500 hover:bg-gray-400 group-hover:bg-gray-400 hover:text-white group-hover:text-white focus:border-blue-300 focus:ring-blue active:text-gray-200 active:bg-gray-400 disabled:opacity-50'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const DropdownItem: React.FC<AnchorHTMLAttributes<HTMLAnchorElement>> = ({
|
||||
...props
|
||||
}) => (
|
||||
<a
|
||||
className="cursor-pointer flex items-center px-4 py-2 text-sm leading-5 text-white bg-indigo-600 hover:bg-indigo-500 hover:text-white focus:outline-none focus:border-indigo-700 focus:text-white"
|
||||
className="flex items-center px-4 py-2 text-sm leading-5 text-white bg-indigo-600 cursor-pointer hover:bg-indigo-500 hover:text-white focus:outline-none focus:border-indigo-700 focus:text-white"
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
@@ -31,6 +31,7 @@ const ButtonWithDropdown: React.FC<ButtonWithDropdownProps> = ({
|
||||
text,
|
||||
children,
|
||||
dropdownIcon,
|
||||
className,
|
||||
...props
|
||||
}) => {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
@@ -38,22 +39,22 @@ const ButtonWithDropdown: React.FC<ButtonWithDropdownProps> = ({
|
||||
useClickOutside(buttonRef, () => setIsOpen(false));
|
||||
|
||||
return (
|
||||
<span className="relative z-0 inline-flex shadow-sm rounded-md">
|
||||
<span className="relative z-0 inline-flex rounded-md shadow-sm">
|
||||
<button
|
||||
type="button"
|
||||
className={`relative inline-flex items-center px-4 py-2 text-white bg-indigo-600 hover:bg-indigo-500 text-sm leading-5 font-medium hover:text-white focus:ring-indigo active:bg-indigo-700 focus:z-10 focus:outline-none focus:ring-blue transition ease-in-out duration-150 ${
|
||||
children ? 'rounded-l-md' : 'rounded-md'
|
||||
}`}
|
||||
} ${className}`}
|
||||
ref={buttonRef}
|
||||
{...props}
|
||||
>
|
||||
{text}
|
||||
</button>
|
||||
<span className="-ml-px relative block">
|
||||
<span className="relative block -ml-px">
|
||||
{children && (
|
||||
<button
|
||||
type="button"
|
||||
className="relative inline-flex items-center px-2 py-2 rounded-r-md bg-indigo-700 hover:bg-indigo-500 text-sm leading-5 font-medium text-white focus:z-10 focus:outline-none active:bg-indigo-700 border border-indigo-600 focus:ring-blue transition ease-in-out duration-150"
|
||||
className="relative inline-flex items-center px-2 py-2 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-700 border border-indigo-600 rounded-r-md hover:bg-indigo-500 focus:z-10 focus:outline-none active:bg-indigo-700 focus:ring-blue"
|
||||
aria-label="Expand"
|
||||
onClick={() => setIsOpen((state) => !state)}
|
||||
>
|
||||
@@ -61,7 +62,7 @@ const ButtonWithDropdown: React.FC<ButtonWithDropdownProps> = ({
|
||||
dropdownIcon
|
||||
) : (
|
||||
<svg
|
||||
className="h-5 w-5"
|
||||
className="w-5 h-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
@@ -84,8 +85,8 @@ const ButtonWithDropdown: React.FC<ButtonWithDropdownProps> = ({
|
||||
leaveFrom="transform opacity-100 scale-100"
|
||||
leaveTo="transform opacity-0 scale-95"
|
||||
>
|
||||
<div className="origin-top-right absolute right-0 mt-2 -mr-1 w-56 rounded-md shadow-lg">
|
||||
<div className="rounded-md bg-indigo-600 ring-1 ring-black ring-opacity-5">
|
||||
<div className="absolute right-0 w-56 mt-2 -mr-1 origin-top-right rounded-md shadow-lg">
|
||||
<div className="bg-indigo-600 rounded-md ring-1 ring-black ring-opacity-5">
|
||||
<div className="py-1">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,12 +8,18 @@ import React, {
|
||||
interface ImageFaderProps extends HTMLAttributes<HTMLDivElement> {
|
||||
backgroundImages: string[];
|
||||
rotationSpeed?: number;
|
||||
isDarker?: boolean;
|
||||
}
|
||||
|
||||
const DEFAULT_ROTATION_SPEED = 6000;
|
||||
|
||||
const ImageFader: ForwardRefRenderFunction<HTMLDivElement, ImageFaderProps> = (
|
||||
{ backgroundImages, rotationSpeed = DEFAULT_ROTATION_SPEED, ...props },
|
||||
{
|
||||
backgroundImages,
|
||||
rotationSpeed = DEFAULT_ROTATION_SPEED,
|
||||
isDarker,
|
||||
...props
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
const [activeIndex, setIndex] = useState(0);
|
||||
@@ -29,6 +35,14 @@ const ImageFader: ForwardRefRenderFunction<HTMLDivElement, ImageFaderProps> = (
|
||||
};
|
||||
}, [backgroundImages, rotationSpeed]);
|
||||
|
||||
let gradient =
|
||||
'linear-gradient(180deg, rgba(45, 55, 72, 0.47) 0%, #1A202E 100%)';
|
||||
|
||||
if (isDarker) {
|
||||
gradient =
|
||||
'linear-gradient(180deg, rgba(17, 24, 39, 0.47) 0%, rgba(17, 24, 39, 1) 100%)';
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref={ref}>
|
||||
{backgroundImages.map((imageUrl, i) => (
|
||||
@@ -38,7 +52,7 @@ const ImageFader: ForwardRefRenderFunction<HTMLDivElement, ImageFaderProps> = (
|
||||
i === activeIndex ? 'opacity-100' : 'opacity-0'
|
||||
}`}
|
||||
style={{
|
||||
backgroundImage: `linear-gradient(180deg, rgba(45, 55, 72, 0.47) 0%, #1A202E 100%), url(${imageUrl})`,
|
||||
backgroundImage: `${gradient}, url(${imageUrl})`,
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Transition from '../../Transition';
|
||||
@@ -49,7 +48,7 @@ const SlideOver: React.FC<SlideOverProps> = ({
|
||||
className={`z-50 fixed inset-0 overflow-hidden bg-opacity-50 bg-gray-800`}
|
||||
>
|
||||
<div className="absolute inset-0 overflow-hidden">
|
||||
<section className="absolute inset-y-0 right-0 pl-10 max-w-full flex">
|
||||
<section className="absolute inset-y-0 right-0 flex max-w-full pl-10">
|
||||
<Transition
|
||||
show={show}
|
||||
appear
|
||||
@@ -61,20 +60,20 @@ const SlideOver: React.FC<SlideOverProps> = ({
|
||||
leaveTo="translate-x-full"
|
||||
>
|
||||
<div className="w-screen max-w-md" ref={slideoverRef}>
|
||||
<div className="h-full flex flex-col bg-gray-700 shadow-xl overflow-y-scroll">
|
||||
<header className="space-y-1 py-6 px-4 bg-indigo-600 sm:px-6">
|
||||
<div className="flex flex-col h-full overflow-y-scroll bg-gray-700 shadow-xl">
|
||||
<header className="px-4 py-6 space-y-1 bg-indigo-600 sm:px-6">
|
||||
<div className="flex items-center justify-between space-x-3">
|
||||
<h2 className="text-lg leading-7 font-medium text-white">
|
||||
<h2 className="text-lg font-medium leading-7 text-white">
|
||||
{title}
|
||||
</h2>
|
||||
<div className="h-7 flex items-center">
|
||||
<div className="flex items-center h-7">
|
||||
<button
|
||||
aria-label="Close panel"
|
||||
className="text-indigo-200 hover:text-white transition ease-in-out duration-150"
|
||||
className="text-indigo-200 transition duration-150 ease-in-out hover:text-white"
|
||||
onClick={() => onClose()}
|
||||
>
|
||||
<svg
|
||||
className="h-6 w-6"
|
||||
className="w-6 h-6"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -98,7 +97,7 @@ const SlideOver: React.FC<SlideOverProps> = ({
|
||||
</div>
|
||||
)}
|
||||
</header>
|
||||
<div className="relative flex-1 py-6 px-4 sm:px-6 text-white">
|
||||
<div className="relative flex-1 px-4 py-6 text-white sm:px-6">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,11 +42,11 @@ const MovieCast: React.FC = () => {
|
||||
{intl.formatMessage(messages.fullcast)}
|
||||
</Header>
|
||||
<ul className="grid grid-cols-2 gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 2xl:grid-cols-8">
|
||||
{data?.credits.cast.map((person) => {
|
||||
{data?.credits.cast.map((person, index) => {
|
||||
return (
|
||||
<li
|
||||
key={person.id}
|
||||
className="col-span-1 flex flex-col text-center items-center"
|
||||
key={`cast-${person.id}-${index}`}
|
||||
className="flex flex-col items-center col-span-1 text-center"
|
||||
>
|
||||
<PersonCard
|
||||
name={person.name}
|
||||
|
||||
66
src/components/MovieDetails/MovieCrew/index.tsx
Normal file
@@ -0,0 +1,66 @@
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useContext } from 'react';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import useSWR from 'swr';
|
||||
import { MovieDetails } from '../../../../server/models/Movie';
|
||||
import { LanguageContext } from '../../../context/LanguageContext';
|
||||
import Error from '../../../pages/_error';
|
||||
import Header from '../../Common/Header';
|
||||
import LoadingSpinner from '../../Common/LoadingSpinner';
|
||||
import PersonCard from '../../PersonCard';
|
||||
|
||||
const messages = defineMessages({
|
||||
fullcrew: 'Full Crew',
|
||||
});
|
||||
|
||||
const MovieCrew: React.FC = () => {
|
||||
const router = useRouter();
|
||||
const intl = useIntl();
|
||||
const { locale } = useContext(LanguageContext);
|
||||
const { data, error } = useSWR<MovieDetails>(
|
||||
`/api/v1/movie/${router.query.movieId}?language=${locale}`
|
||||
);
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return <Error statusCode={404} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header
|
||||
subtext={
|
||||
<Link href={`/movie/${data.id}`}>
|
||||
<a className="hover:underline">{data.title}</a>
|
||||
</Link>
|
||||
}
|
||||
>
|
||||
{intl.formatMessage(messages.fullcrew)}
|
||||
</Header>
|
||||
<ul className="grid grid-cols-2 gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 2xl:grid-cols-8">
|
||||
{data?.credits.crew.map((person, index) => {
|
||||
return (
|
||||
<li
|
||||
key={`crew-${person.id}-${index}`}
|
||||
className="flex flex-col items-center col-span-1 text-center"
|
||||
>
|
||||
<PersonCard
|
||||
name={person.name}
|
||||
personId={person.id}
|
||||
subName={person.job}
|
||||
profilePath={person.profilePath}
|
||||
canExpand
|
||||
/>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default MovieCrew;
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useContext } from 'react';
|
||||
import React, { useState, useContext, useMemo } from 'react';
|
||||
import {
|
||||
FormattedMessage,
|
||||
defineMessages,
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
MediaRequestStatus,
|
||||
} from '../../../server/constants/media';
|
||||
import RequestModal from '../RequestModal';
|
||||
import Badge from '../Common/Badge';
|
||||
import ButtonWithDropdown from '../Common/ButtonWithDropdown';
|
||||
import axios from 'axios';
|
||||
import SlideOver from '../Common/SlideOver';
|
||||
@@ -36,8 +35,9 @@ import RTAudRotten from '../../assets/rt_aud_rotten.svg';
|
||||
import type { RTRating } from '../../../server/api/rottentomatoes';
|
||||
import Error from '../../pages/_error';
|
||||
import Head from 'next/head';
|
||||
import globalMessages from '../../i18n/globalMessages';
|
||||
import ExternalLinkBlock from '../ExternalLinkBlock';
|
||||
import { sortCrewPriority } from '../../utils/creditHelpers';
|
||||
import StatusBadge from '../StatusBadge';
|
||||
|
||||
const messages = defineMessages({
|
||||
releasedate: 'Release Date',
|
||||
@@ -45,6 +45,7 @@ const messages = defineMessages({
|
||||
status: 'Status',
|
||||
revenue: 'Revenue',
|
||||
budget: 'Budget',
|
||||
watchtrailer: 'Watch Trailer',
|
||||
originallanguage: 'Original Language',
|
||||
overview: 'Overview',
|
||||
runtime: '{minutes} minutes',
|
||||
@@ -67,6 +68,8 @@ const messages = defineMessages({
|
||||
approve: 'Approve',
|
||||
decline: 'Decline',
|
||||
studio: 'Studio',
|
||||
viewfullcrew: 'View Full Crew',
|
||||
view: 'View',
|
||||
});
|
||||
|
||||
interface MovieDetailsProps {
|
||||
@@ -103,6 +106,10 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
`/api/v1/movie/${router.query.movieId}/ratings`
|
||||
);
|
||||
|
||||
const sortedCrew = useMemo(() => sortCrewPriority(data?.credits.crew ?? []), [
|
||||
data,
|
||||
]);
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
@@ -115,6 +122,11 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
(request) => request.status === MediaRequestStatus.PENDING
|
||||
);
|
||||
|
||||
const trailerUrl = data.relatedVideos
|
||||
?.filter((r) => r.type === 'Trailer')
|
||||
.sort((a, b) => a.size - b.size)
|
||||
.pop()?.url;
|
||||
|
||||
const modifyRequest = async (type: 'approve' | 'decline') => {
|
||||
const response = await axios.get(
|
||||
`/api/v1/request/${activeRequest?.id}/${type}`
|
||||
@@ -134,7 +146,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="bg-cover bg-center -mx-4 -mt-2 px-4 sm:px-8 pt-4 "
|
||||
className="px-4 pt-4 -mx-4 -mt-2 bg-center bg-cover sm:px-8 "
|
||||
style={{
|
||||
height: 493,
|
||||
backgroundImage: `linear-gradient(180deg, rgba(17, 24, 39, 0.47) 0%, rgba(17, 24, 39, 1) 100%), url(//image.tmdb.org/t/p/w1920_and_h800_multi_faces/${data.backdropPath})`,
|
||||
@@ -159,21 +171,21 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
onClose={() => setShowManager(false)}
|
||||
subText={data.title}
|
||||
>
|
||||
<h3 className="text-xl mb-2">
|
||||
<h3 className="mb-2 text-xl">
|
||||
{intl.formatMessage(messages.manageModalRequests)}
|
||||
</h3>
|
||||
<div className="bg-gray-600 shadow overflow-hidden rounded-md">
|
||||
<div className="overflow-hidden bg-gray-600 rounded-md shadow">
|
||||
<ul>
|
||||
{data.mediaInfo?.requests?.map((request) => (
|
||||
<li
|
||||
key={`manage-request-${request.id}`}
|
||||
className="border-b last:border-b-0 border-gray-700"
|
||||
className="border-b border-gray-700 last:border-b-0"
|
||||
>
|
||||
<RequestBlock request={request} onUpdate={() => revalidate()} />
|
||||
</li>
|
||||
))}
|
||||
{(data.mediaInfo?.requests ?? []).length === 0 && (
|
||||
<li className="text-center py-4 text-gray-400">
|
||||
<li className="py-4 text-center text-gray-400">
|
||||
{intl.formatMessage(messages.manageModalNoRequests)}
|
||||
</li>
|
||||
)}
|
||||
@@ -188,43 +200,29 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
>
|
||||
{intl.formatMessage(messages.manageModalClearMedia)}
|
||||
</Button>
|
||||
<div className="text-sm text-gray-400 mt-2">
|
||||
<div className="mt-2 text-sm text-gray-400">
|
||||
{intl.formatMessage(messages.manageModalClearMediaWarning)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</SlideOver>
|
||||
<div className="flex flex-col items-center md:flex-row md:items-end pt-4">
|
||||
<div className="md:mr-4 flex-shrink-0">
|
||||
<div className="flex flex-col items-center pt-4 lg:flex-row lg:items-end">
|
||||
<div className="lg:mr-4">
|
||||
<img
|
||||
src={`//image.tmdb.org/t/p/w600_and_h900_bestv2${data.posterPath}`}
|
||||
alt=""
|
||||
className="rounded md:rounded-lg shadow md:shadow-2xl w-32 md:w-52"
|
||||
className="w-32 rounded shadow md:rounded-lg md:shadow-2xl md:w-44 lg:w-52"
|
||||
/>
|
||||
</div>
|
||||
<div className="text-white flex flex-col md:mr-4 mt-4 md:mt-0 text-center md:text-left">
|
||||
<div className="flex flex-col flex-1 mt-4 text-center text-white lg:mr-4 lg:mt-0 lg:text-left">
|
||||
<div className="mb-2">
|
||||
{data.mediaInfo?.status === MediaStatus.AVAILABLE && (
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.available)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PROCESSING && (
|
||||
<Badge badgeType="danger">
|
||||
{intl.formatMessage(globalMessages.unavailable)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PENDING && (
|
||||
<Badge badgeType="warning">
|
||||
{intl.formatMessage(globalMessages.pending)}
|
||||
</Badge>
|
||||
)}
|
||||
<StatusBadge status={data.mediaInfo?.status} />
|
||||
</div>
|
||||
<h1 className="text-2xl md:text-4xl">
|
||||
<h1 className="text-2xl lg:text-4xl">
|
||||
{data.title}{' '}
|
||||
<span className="text-2xl">({data.releaseDate.slice(0, 4)})</span>
|
||||
</h1>
|
||||
<span className="text-xs md:text-base mt-1 md:mt-0">
|
||||
<span className="mt-1 text-xs lg:text-base lg:mt-0">
|
||||
{(data.runtime ?? 0) > 0 && (
|
||||
<>
|
||||
<FormattedMessage
|
||||
@@ -237,16 +235,44 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
{data.genres.map((g) => g.name).join(', ')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex-1 flex justify-end mt-4 md:mt-0">
|
||||
<div className="flex justify-end flex-shrink-0 mt-4 lg:mt-0">
|
||||
{trailerUrl && (
|
||||
<a href={trailerUrl} target={'_blank'} rel="noreferrer">
|
||||
<Button buttonType="ghost">
|
||||
<svg
|
||||
className="w-5 h-5 mr-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"
|
||||
/>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
<FormattedMessage {...messages.watchtrailer} />
|
||||
</Button>
|
||||
</a>
|
||||
)}
|
||||
{(!data.mediaInfo ||
|
||||
data.mediaInfo?.status === MediaStatus.UNKNOWN) && (
|
||||
<Button
|
||||
buttonType="primary"
|
||||
className="ml-2"
|
||||
onClick={() => setShowRequestModal(true)}
|
||||
>
|
||||
{activeRequest ? (
|
||||
<svg
|
||||
className="w-4 mr-1"
|
||||
className="w-5 mr-1"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -259,7 +285,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
</svg>
|
||||
) : (
|
||||
<svg
|
||||
className="w-4 mr-1"
|
||||
className="w-5 mr-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -310,6 +336,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
</>
|
||||
}
|
||||
onClick={() => setShowRequestModal(true)}
|
||||
className="ml-2"
|
||||
>
|
||||
{hasPermission(Permission.MANAGE_REQUESTS) && (
|
||||
<>
|
||||
@@ -382,7 +409,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex pt-8 text-white flex-col md:flex-row pb-4">
|
||||
<div className="flex flex-col pt-8 pb-4 text-white md:flex-row">
|
||||
<div className="flex-1 md:mr-8">
|
||||
<h2 className="text-xl md:text-2xl">
|
||||
<FormattedMessage {...messages.overview} />
|
||||
@@ -392,11 +419,70 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
? data.overview
|
||||
: intl.formatMessage(messages.overviewunavailable)}
|
||||
</p>
|
||||
<ul className="grid grid-cols-2 gap-6 mt-6 sm:grid-cols-3">
|
||||
{sortedCrew.slice(0, 6).map((person) => (
|
||||
<li
|
||||
className="flex flex-col col-span-1"
|
||||
key={`crew-${person.job}-${person.id}`}
|
||||
>
|
||||
<span className="font-bold">{person.job}</span>
|
||||
<Link href={`/person/${person.id}`}>
|
||||
<a className="text-gray-400 transition duration-300 hover:text-underline hover:text-gray-100">
|
||||
{person.name}
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{sortedCrew.length > 0 && (
|
||||
<div className="flex justify-end mt-4">
|
||||
<Link href={`/movie/${data.id}/crew`}>
|
||||
<a className="flex items-center text-gray-400 transition duration-300 hover:text-gray-100">
|
||||
<span>{intl.formatMessage(messages.viewfullcrew)}</span>
|
||||
<svg
|
||||
className="inline-block w-5 h-5 ml-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="w-full md:w-80 mt-8 md:mt-0">
|
||||
<div className="bg-gray-900 rounded-lg shadow border border-gray-800">
|
||||
<div className="w-full mt-8 md:w-80 md:mt-0">
|
||||
{data.collection && (
|
||||
<div className="mb-6">
|
||||
<Link href={`/collection/${data.collection.id}`}>
|
||||
<a>
|
||||
<div
|
||||
className="relative transition duration-300 transform scale-100 bg-gray-800 bg-center bg-cover rounded-lg shadow-md cursor-pointer group hover:scale-105"
|
||||
style={{
|
||||
backgroundImage: `linear-gradient(180deg, rgba(31, 41, 55, 0.47) 0%, rgba(31, 41, 55, 0.80) 100%), url(//image.tmdb.org/t/p/w1440_and_h320_multi_faces/${data.collection.backdropPath})`,
|
||||
}}
|
||||
>
|
||||
<div className="flex items-center justify-between p-4 text-gray-200 transition duration-300 h-14 group-hover:text-white">
|
||||
<div>{data.collection.name}</div>
|
||||
<Button buttonSize="sm">
|
||||
{intl.formatMessage(messages.view)}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
<div className="bg-gray-900 border border-gray-800 rounded-lg shadow">
|
||||
{(data.voteCount > 0 || ratingData) && (
|
||||
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0 items-center justify-center">
|
||||
<div className="flex items-center justify-center px-4 py-2 border-b border-gray-800 last:border-b-0">
|
||||
{ratingData?.criticsRating &&
|
||||
(ratingData?.criticsScore ?? 0) > 0 && (
|
||||
<>
|
||||
@@ -407,7 +493,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<RTFresh className="w-6 mr-1" />
|
||||
)}
|
||||
</span>
|
||||
<span className="text-gray-400 text-sm mr-4 last:mr-0">
|
||||
<span className="mr-4 text-sm text-gray-400 last:mr-0">
|
||||
{ratingData.criticsScore}%
|
||||
</span>
|
||||
</>
|
||||
@@ -422,7 +508,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<RTAudFresh className="w-6 mr-1" />
|
||||
)}
|
||||
</span>
|
||||
<span className="text-gray-400 text-sm mr-4 last:mr-0">
|
||||
<span className="mr-4 text-sm text-gray-400 last:mr-0">
|
||||
{ratingData.audienceScore}%
|
||||
</span>
|
||||
</>
|
||||
@@ -432,7 +518,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<span className="text-sm">
|
||||
<TmdbLogo className="w-6 mr-2" />
|
||||
</span>
|
||||
<span className="text-gray-400 text-sm">
|
||||
<span className="text-sm text-gray-400">
|
||||
{data.voteAverage}/10
|
||||
</span>
|
||||
</>
|
||||
@@ -443,7 +529,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.releasedate} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
<FormattedDate
|
||||
value={new Date(data.releaseDate)}
|
||||
year="numeric"
|
||||
@@ -456,7 +542,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.status} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
{data.status}
|
||||
</span>
|
||||
</div>
|
||||
@@ -465,7 +551,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.revenue} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
<FormattedNumber
|
||||
currency="USD"
|
||||
style="currency"
|
||||
@@ -479,7 +565,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.budget} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
<FormattedNumber
|
||||
currency="USD"
|
||||
style="currency"
|
||||
@@ -495,7 +581,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.originallanguage} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
{
|
||||
data.spokenLanguages.find(
|
||||
(lng) => lng.iso_639_1 === data.originalLanguage
|
||||
@@ -509,7 +595,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.studio} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
{data.productionCompanies[0]?.name}
|
||||
</span>
|
||||
</div>
|
||||
@@ -525,10 +611,10 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
|
||||
<div className="mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<Link href="/movie/[movieId]/cast" as={`/movie/${data.id}/cast`}>
|
||||
<a className="inline-flex text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate items-center">
|
||||
<a className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>
|
||||
<FormattedMessage {...messages.cast} />
|
||||
</span>
|
||||
@@ -566,13 +652,13 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
/>
|
||||
{(recommended?.results ?? []).length > 0 && (
|
||||
<>
|
||||
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
|
||||
<div className="mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<Link
|
||||
href="/movie/[movieId]/recommendations"
|
||||
as={`/movie/${data.id}/recommendations`}
|
||||
>
|
||||
<a className="inline-flex text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate items-center">
|
||||
<a className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>
|
||||
<FormattedMessage {...messages.recommendations} />
|
||||
</span>
|
||||
@@ -616,13 +702,13 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
)}
|
||||
{(similar?.results ?? []).length > 0 && (
|
||||
<>
|
||||
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
|
||||
<div className="mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<Link
|
||||
href="/movie/[movieId]/similar"
|
||||
as={`/movie/${data.id}/similar`}
|
||||
>
|
||||
<a className="inline-flex text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate items-center">
|
||||
<a className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>
|
||||
<FormattedMessage {...messages.similar} />
|
||||
</span>
|
||||
|
||||
97
src/components/PermissionOption/index.tsx
Normal file
@@ -0,0 +1,97 @@
|
||||
import React from 'react';
|
||||
import { hasPermission } from '../../../server/lib/permissions';
|
||||
import { Permission, User } from '../../hooks/useUser';
|
||||
|
||||
export interface PermissionItem {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
permission: Permission;
|
||||
children?: PermissionItem[];
|
||||
}
|
||||
|
||||
interface PermissionOptionProps {
|
||||
option: PermissionItem;
|
||||
currentPermission: number;
|
||||
user?: User;
|
||||
parent?: PermissionItem;
|
||||
onUpdate: (newPermissions: number) => void;
|
||||
}
|
||||
|
||||
const PermissionOption: React.FC<PermissionOptionProps> = ({
|
||||
option,
|
||||
currentPermission,
|
||||
onUpdate,
|
||||
user,
|
||||
parent,
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={`relative flex items-start first:mt-0 mt-4 ${
|
||||
(option.permission !== Permission.ADMIN &&
|
||||
hasPermission(Permission.ADMIN, currentPermission)) ||
|
||||
(!!parent?.permission &&
|
||||
hasPermission(parent.permission, currentPermission)) ||
|
||||
(user && user.id !== 1 && option.permission === Permission.ADMIN) ||
|
||||
(user &&
|
||||
!hasPermission(Permission.MANAGE_SETTINGS, user.permissions) &&
|
||||
option.permission === Permission.MANAGE_SETTINGS)
|
||||
? 'opacity-50'
|
||||
: ''
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-center h-5">
|
||||
<input
|
||||
id={option.id}
|
||||
name="permissions"
|
||||
type="checkbox"
|
||||
className="w-4 h-4 text-indigo-600 transition duration-150 ease-in-out rounded-md form-checkbox"
|
||||
disabled={
|
||||
(option.permission !== Permission.ADMIN &&
|
||||
hasPermission(Permission.ADMIN, currentPermission)) ||
|
||||
(!!parent?.permission &&
|
||||
hasPermission(parent.permission, currentPermission)) ||
|
||||
(user &&
|
||||
user.id !== 1 &&
|
||||
option.permission === Permission.ADMIN) ||
|
||||
(user &&
|
||||
!hasPermission(Permission.MANAGE_SETTINGS, user.permissions) &&
|
||||
option.permission === Permission.MANAGE_SETTINGS)
|
||||
}
|
||||
onClick={() => {
|
||||
onUpdate(
|
||||
hasPermission(option.permission, currentPermission)
|
||||
? currentPermission - option.permission
|
||||
: currentPermission + option.permission
|
||||
);
|
||||
}}
|
||||
checked={
|
||||
hasPermission(option.permission, currentPermission) ||
|
||||
(!!parent?.permission &&
|
||||
hasPermission(parent.permission, currentPermission))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="ml-3 text-sm leading-5">
|
||||
<label htmlFor={option.id} className="font-medium">
|
||||
{option.name}
|
||||
</label>
|
||||
<p className="text-gray-500">{option.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
{(option.children ?? []).map((child) => (
|
||||
<div key={`permission-child-${child.id}`} className="pl-6 mt-4">
|
||||
<PermissionOption
|
||||
option={child}
|
||||
currentPermission={currentPermission}
|
||||
onUpdate={(newPermission) => onUpdate(newPermission)}
|
||||
parent={option}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default PermissionOption;
|
||||
@@ -25,18 +25,19 @@ const PersonCard: React.FC<PersonCardProps> = ({
|
||||
} bg-gray-600 rounded-lg text-white shadow-lg hover:bg-gray-500 transition ease-in-out duration-150 cursor-pointer`}
|
||||
>
|
||||
<div style={{ paddingBottom: '150%' }}>
|
||||
<div className="absolute inset-0 flex flex-col items-center justify-center">
|
||||
<div className="absolute inset-0 flex flex-col items-center w-full h-full p-2">
|
||||
{profilePath && (
|
||||
<div
|
||||
style={{
|
||||
backgroundImage: `url(https://image.tmdb.org/t/p/w600_and_h900_bestv2${profilePath})`,
|
||||
}}
|
||||
className="rounded-full w-28 h-28 md:w-32 md:h-32 bg-cover bg-center mb-6"
|
||||
/>
|
||||
<div className="relative flex justify-center w-full mt-2 mb-4 h-1/2">
|
||||
<img
|
||||
src={`https://image.tmdb.org/t/p/w600_and_h900_bestv2${profilePath}`}
|
||||
className="object-cover w-3/4 h-full bg-center bg-cover rounded-full"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{!profilePath && (
|
||||
<svg
|
||||
className="w-28 h-28 md:w-32 md:h-32 mb-6"
|
||||
className="mb-6 w-28 h-28 md:w-32 md:h-32"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -48,12 +49,21 @@ const PersonCard: React.FC<PersonCardProps> = ({
|
||||
/>
|
||||
</svg>
|
||||
)}
|
||||
<div className="whitespace-normal text-center">{name}</div>
|
||||
<div className="w-full text-center truncate">{name}</div>
|
||||
{subName && (
|
||||
<div className="whitespace-normal text-center text-sm text-gray-300">
|
||||
<div
|
||||
className="overflow-hidden text-sm text-center text-gray-300 whitespace-normal"
|
||||
style={{
|
||||
WebkitLineClamp: 2,
|
||||
display: '-webkit-box',
|
||||
overflow: 'hidden',
|
||||
WebkitBoxOrient: 'vertical',
|
||||
}}
|
||||
>
|
||||
{subName}
|
||||
</div>
|
||||
)}
|
||||
<div className="absolute bottom-0 left-0 right-0 h-12 rounded-b-lg bg-gradient-to-t from-gray-600" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useContext } from 'react';
|
||||
import React, { useContext, useState } from 'react';
|
||||
import TruncateMarkup from 'react-truncate-markup';
|
||||
import useSWR from 'swr';
|
||||
import type { PersonDetail } from '../../../server/models/Person';
|
||||
import type { PersonCombinedCreditsResponse } from '../../../server/interfaces/api/personInterfaces';
|
||||
@@ -8,9 +9,12 @@ import LoadingSpinner from '../Common/LoadingSpinner';
|
||||
import TitleCard from '../TitleCard';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import { LanguageContext } from '../../context/LanguageContext';
|
||||
import ImageFader from '../Common/ImageFader';
|
||||
import Ellipsis from '../../assets/ellipsis.svg';
|
||||
|
||||
const messages = defineMessages({
|
||||
appearsin: 'Appears in',
|
||||
crewmember: 'Crew Member',
|
||||
ascharacter: 'as {character}',
|
||||
nobiography: 'No biography available.',
|
||||
});
|
||||
@@ -22,6 +26,7 @@ const PersonDetails: React.FC = () => {
|
||||
const { data, error } = useSWR<PersonDetail>(
|
||||
`/api/v1/person/${router.query.personId}`
|
||||
);
|
||||
const [showBio, setShowBio] = useState(false);
|
||||
|
||||
const {
|
||||
data: combinedCredits,
|
||||
@@ -39,15 +44,18 @@ const PersonDetails: React.FC = () => {
|
||||
}
|
||||
|
||||
const sortedCast = combinedCredits?.cast.sort((a, b) => {
|
||||
const aDate =
|
||||
a.mediaType === 'movie'
|
||||
? a.releaseDate?.slice(0, 4) ?? 0
|
||||
: a.firstAirDate?.slice(0, 4) ?? 0;
|
||||
const bDate =
|
||||
b.mediaType === 'movie'
|
||||
? b.releaseDate?.slice(0, 4) ?? 0
|
||||
: b.firstAirDate?.slice(0, 4) ?? 0;
|
||||
if (aDate > bDate) {
|
||||
const aVotes = a.voteCount ?? 0;
|
||||
const bVotes = b.voteCount ?? 0;
|
||||
if (aVotes > bVotes) {
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
|
||||
const sortedCrew = combinedCredits?.crew.sort((a, b) => {
|
||||
const aVotes = a.voteCount ?? 0;
|
||||
const bVotes = b.voteCount ?? 0;
|
||||
if (aVotes > bVotes) {
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
@@ -55,39 +63,21 @@ const PersonDetails: React.FC = () => {
|
||||
|
||||
const isLoading = !combinedCredits && !errorCombinedCredits;
|
||||
|
||||
return (
|
||||
const cast = (sortedCast ?? []).length > 0 && (
|
||||
<>
|
||||
<div className="flex mt-8 mb-8 flex-col md:flex-row items-center md:items-start">
|
||||
{data.profilePath && (
|
||||
<div
|
||||
style={{
|
||||
backgroundImage: `url(https://image.tmdb.org/t/p/w600_and_h900_bestv2${data.profilePath})`,
|
||||
}}
|
||||
className="rounded-full w-36 h-36 md:w-44 md:h-44 bg-cover bg-center mb-6 md:mb-0 mr-0 md:mr-6 flex-shrink-0"
|
||||
/>
|
||||
)}
|
||||
<div className="text-gray-300 text-center md:text-left">
|
||||
<h1 className="text-3xl md:text-4xl text-white mb-4">{data.name}</h1>
|
||||
<div>
|
||||
{data.biography
|
||||
? data.biography
|
||||
: intl.formatMessage(messages.nobiography)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
|
||||
<div className="relative z-10 mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="inline-flex text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate items-center">
|
||||
<div className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>{intl.formatMessage(messages.appearsin)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul className="grid grid-cols-2 gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 2xl:grid-cols-8">
|
||||
{sortedCast?.map((media) => {
|
||||
{sortedCast?.map((media, index) => {
|
||||
return (
|
||||
<li
|
||||
key={`list-cast-item-${media.id}`}
|
||||
className="col-span-1 flex flex-col text-center items-center"
|
||||
key={`list-cast-item-${media.id}-${index}`}
|
||||
className="flex flex-col items-center col-span-1 text-center"
|
||||
>
|
||||
<TitleCard
|
||||
id={media.id}
|
||||
@@ -105,7 +95,7 @@ const PersonDetails: React.FC = () => {
|
||||
canExpand
|
||||
/>
|
||||
{media.character && (
|
||||
<div className="mt-2 text-gray-300 text-xs truncate w-36 sm:w-36 md:w-44 text-center">
|
||||
<div className="mt-2 text-xs text-center text-gray-300 truncate w-36 sm:w-36 md:w-44">
|
||||
{intl.formatMessage(messages.ascharacter, {
|
||||
character: media.character,
|
||||
})}
|
||||
@@ -114,18 +104,108 @@ const PersonDetails: React.FC = () => {
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
{isLoading &&
|
||||
[...Array(20)].map((_item, i) => (
|
||||
<li
|
||||
key={`placeholder-${i}`}
|
||||
className="col-span-1 flex flex-col text-center items-center"
|
||||
>
|
||||
<TitleCard.Placeholder canExpand />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
|
||||
const crew = (sortedCrew ?? []).length > 0 && (
|
||||
<>
|
||||
<div className="relative z-10 mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>{intl.formatMessage(messages.crewmember)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul className="grid grid-cols-2 gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 2xl:grid-cols-8">
|
||||
{sortedCrew?.map((media, index) => {
|
||||
return (
|
||||
<li
|
||||
key={`list-crew-item-${media.id}-${index}`}
|
||||
className="flex flex-col items-center col-span-1 text-center"
|
||||
>
|
||||
<TitleCard
|
||||
id={media.id}
|
||||
title={media.mediaType === 'movie' ? media.title : media.name}
|
||||
userScore={media.voteAverage}
|
||||
year={
|
||||
media.mediaType === 'movie'
|
||||
? media.releaseDate
|
||||
: media.firstAirDate
|
||||
}
|
||||
image={media.posterPath}
|
||||
summary={media.overview}
|
||||
mediaType={media.mediaType as 'movie' | 'tv'}
|
||||
status={media.mediaInfo?.status}
|
||||
canExpand
|
||||
/>
|
||||
{media.job && (
|
||||
<div className="mt-2 text-xs text-center text-gray-300 truncate w-36 sm:w-36 md:w-44">
|
||||
{media.job}
|
||||
</div>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
{(sortedCrew || sortedCast) && (
|
||||
<div className="absolute top-0 left-0 right-0 z-0 h-96">
|
||||
<ImageFader
|
||||
isDarker
|
||||
backgroundImages={[...(sortedCast ?? []), ...(sortedCrew ?? [])]
|
||||
.filter((media) => media.backdropPath)
|
||||
.map(
|
||||
(media) =>
|
||||
`//image.tmdb.org/t/p/w1920_and_h800_multi_faces/${media.backdropPath}`
|
||||
)
|
||||
.slice(0, 6)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className="relative z-10 flex flex-col items-center mt-8 mb-8 md:flex-row md:items-start">
|
||||
{data.profilePath && (
|
||||
<div
|
||||
style={{
|
||||
backgroundImage: `url(https://image.tmdb.org/t/p/w600_and_h900_bestv2${data.profilePath})`,
|
||||
}}
|
||||
className="flex-shrink-0 mb-6 mr-0 bg-center bg-cover rounded-full w-36 h-36 md:w-44 md:h-44 md:mb-0 md:mr-6"
|
||||
/>
|
||||
)}
|
||||
<div className="text-center text-gray-300 md:text-left">
|
||||
<h1 className="mb-4 text-3xl text-white md:text-4xl">{data.name}</h1>
|
||||
<div className="relative">
|
||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
|
||||
<div
|
||||
className="outline-none group ring-0"
|
||||
onClick={() => setShowBio((show) => !show)}
|
||||
role="button"
|
||||
tabIndex={-1}
|
||||
>
|
||||
<TruncateMarkup
|
||||
lines={showBio ? 200 : 6}
|
||||
ellipsis={
|
||||
<Ellipsis className="relative inline-block ml-2 -top-0.5 opacity-70 group-hover:opacity-100 transition duration-300" />
|
||||
}
|
||||
>
|
||||
<div>
|
||||
{data.biography
|
||||
? data.biography
|
||||
: intl.formatMessage(messages.nobiography)}
|
||||
</div>
|
||||
</TruncateMarkup>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{data.knownForDepartment === 'Acting' ? [cast, crew] : [crew, cast]}
|
||||
{isLoading && <LoadingSpinner />}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default PersonDetails;
|
||||
|
||||
@@ -84,7 +84,7 @@ const RequestBlock: React.FC<RequestBlockProps> = ({ request, onUpdate }) => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="ml-2 flex-shrink-0 flex">
|
||||
<div className="ml-2 flex-shrink-0 flex flex-wrap">
|
||||
{request.status === MediaRequestStatus.PENDING && (
|
||||
<>
|
||||
<span className="mr-1">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useContext } from 'react';
|
||||
import React, { useContext, useState } from 'react';
|
||||
import { useInView } from 'react-intersection-observer';
|
||||
import type { MediaRequest } from '../../../../server/entity/MediaRequest';
|
||||
import {
|
||||
@@ -15,16 +15,21 @@ import useSWR from 'swr';
|
||||
import Badge from '../../Common/Badge';
|
||||
import StatusBadge from '../../StatusBadge';
|
||||
import Table from '../../Common/Table';
|
||||
import { MediaRequestStatus } from '../../../../server/constants/media';
|
||||
import {
|
||||
MediaRequestStatus,
|
||||
MediaStatus,
|
||||
} from '../../../../server/constants/media';
|
||||
import Button from '../../Common/Button';
|
||||
import axios from 'axios';
|
||||
import globalMessages from '../../../i18n/globalMessages';
|
||||
import Link from 'next/link';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
|
||||
const messages = defineMessages({
|
||||
requestedby: 'Requested by {username}',
|
||||
seasons: 'Seasons',
|
||||
notavailable: 'N/A',
|
||||
failedretry: 'Something went wrong retrying the request',
|
||||
});
|
||||
|
||||
const isMovie = (movie: MovieDetails | TvDetails): movie is MovieDetails => {
|
||||
@@ -33,13 +38,17 @@ const isMovie = (movie: MovieDetails | TvDetails): movie is MovieDetails => {
|
||||
|
||||
interface RequestItemProps {
|
||||
request: MediaRequest;
|
||||
onDelete: () => void;
|
||||
revalidateList: () => void;
|
||||
}
|
||||
|
||||
const RequestItem: React.FC<RequestItemProps> = ({ request, onDelete }) => {
|
||||
const RequestItem: React.FC<RequestItemProps> = ({
|
||||
request,
|
||||
revalidateList,
|
||||
}) => {
|
||||
const { ref, inView } = useInView({
|
||||
triggerOnce: true,
|
||||
});
|
||||
const { addToast } = useToasts();
|
||||
const intl = useIntl();
|
||||
const { hasPermission } = useUser();
|
||||
const { locale } = useContext(LanguageContext);
|
||||
@@ -50,13 +59,15 @@ const RequestItem: React.FC<RequestItemProps> = ({ request, onDelete }) => {
|
||||
const { data: title, error } = useSWR<MovieDetails | TvDetails>(
|
||||
inView ? `${url}?language=${locale}` : null
|
||||
);
|
||||
const { data: requestData, revalidate } = useSWR<MediaRequest>(
|
||||
const { data: requestData, revalidate, mutate } = useSWR<MediaRequest>(
|
||||
`/api/v1/request/${request.id}`,
|
||||
{
|
||||
initialData: request,
|
||||
}
|
||||
);
|
||||
|
||||
const [isRetrying, setRetrying] = useState(false);
|
||||
|
||||
const modifyRequest = async (type: 'approve' | 'decline') => {
|
||||
const response = await axios.get(`/api/v1/request/${request.id}/${type}`);
|
||||
|
||||
@@ -68,7 +79,23 @@ const RequestItem: React.FC<RequestItemProps> = ({ request, onDelete }) => {
|
||||
const deleteRequest = async () => {
|
||||
await axios.delete(`/api/v1/request/${request.id}`);
|
||||
|
||||
onDelete();
|
||||
revalidateList();
|
||||
};
|
||||
|
||||
const retryRequest = async () => {
|
||||
setRetrying(true);
|
||||
|
||||
try {
|
||||
const result = await axios.post(`/api/v1/request/${request.id}/retry`);
|
||||
mutate(result.data);
|
||||
} catch (e) {
|
||||
addToast(intl.formatMessage(messages.failedretry), {
|
||||
autoDismiss: true,
|
||||
appearance: 'error',
|
||||
});
|
||||
} finally {
|
||||
setRetrying(false);
|
||||
}
|
||||
};
|
||||
|
||||
if (!title && !error) {
|
||||
@@ -138,7 +165,13 @@ const RequestItem: React.FC<RequestItemProps> = ({ request, onDelete }) => {
|
||||
)}
|
||||
</Table.TD>
|
||||
<Table.TD>
|
||||
<StatusBadge status={requestData.media.status} />
|
||||
{requestData.media.status === MediaStatus.UNKNOWN ? (
|
||||
<Badge badgeType="danger">
|
||||
{intl.formatMessage(globalMessages.failed)}
|
||||
</Badge>
|
||||
) : (
|
||||
<StatusBadge status={requestData.media.status} />
|
||||
)}
|
||||
</Table.TD>
|
||||
<Table.TD>
|
||||
<div className="flex flex-col">
|
||||
@@ -167,6 +200,31 @@ const RequestItem: React.FC<RequestItemProps> = ({ request, onDelete }) => {
|
||||
</div>
|
||||
</Table.TD>
|
||||
<Table.TD alignText="right">
|
||||
{requestData.media.status === MediaStatus.UNKNOWN &&
|
||||
hasPermission(Permission.MANAGE_REQUESTS) && (
|
||||
<Button
|
||||
className="mr-2"
|
||||
buttonType="primary"
|
||||
buttonSize="sm"
|
||||
disabled={isRetrying}
|
||||
onClick={() => retryRequest()}
|
||||
>
|
||||
<svg
|
||||
className="w-4 h-4 mr-0 sm:mr-1"
|
||||
fill="currentColor"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
width="18px"
|
||||
height="18px"
|
||||
>
|
||||
<path d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" />
|
||||
</svg>
|
||||
<span className="hidden sm:block">
|
||||
{intl.formatMessage(globalMessages.retry)}
|
||||
</span>
|
||||
</Button>
|
||||
)}
|
||||
{requestData.status !== MediaRequestStatus.PENDING &&
|
||||
hasPermission(Permission.MANAGE_REQUESTS) && (
|
||||
<Button
|
||||
|
||||
@@ -56,7 +56,7 @@ const RequestList: React.FC = () => {
|
||||
<RequestItem
|
||||
request={request}
|
||||
key={`request-list-${request.id}`}
|
||||
onDelete={() => revalidate()}
|
||||
revalidateList={() => revalidate()}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -67,7 +67,12 @@ const MovieRequestModal: React.FC<RequestModalProps> = ({
|
||||
|
||||
if (response.data) {
|
||||
if (onComplete) {
|
||||
onComplete(response.data.media.status);
|
||||
onComplete(
|
||||
hasPermission(Permission.AUTO_APPROVE) ||
|
||||
hasPermission(Permission.AUTO_APPROVE_MOVIE)
|
||||
? MediaStatus.PROCESSING
|
||||
: MediaStatus.PENDING
|
||||
);
|
||||
}
|
||||
addToast(
|
||||
<span>
|
||||
|
||||
@@ -223,13 +223,13 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
|
||||
}
|
||||
>
|
||||
<div className="flex flex-col">
|
||||
<div className="-mx-4 sm:mx-0 overflow-auto max-h-96">
|
||||
<div className="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
|
||||
<div className="shadow overflow-hidden sm:rounded-lg">
|
||||
<div className="-mx-4 overflow-auto sm:mx-0 max-h-96">
|
||||
<div className="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
||||
<div className="overflow-hidden shadow sm:rounded-lg">
|
||||
<table className="min-w-full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="px-4 py-3 bg-gray-500 w-16">
|
||||
<th className="w-16 px-4 py-3 bg-gray-500">
|
||||
<span
|
||||
role="checkbox"
|
||||
tabIndex={0}
|
||||
@@ -240,7 +240,7 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
|
||||
toggleAllSeasons();
|
||||
}
|
||||
}}
|
||||
className="group relative inline-flex items-center justify-center flex-shrink-0 h-5 w-10 cursor-pointer focus:outline-none"
|
||||
className="relative inline-flex items-center justify-center flex-shrink-0 w-10 h-5 cursor-pointer group focus:outline-none"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
@@ -256,13 +256,13 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
|
||||
></span>
|
||||
</span>
|
||||
</th>
|
||||
<th className="px-6 py-3 bg-gray-500 text-left text-xs leading-4 font-medium text-gray-200 uppercase tracking-wider">
|
||||
<th className="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-gray-200 uppercase bg-gray-500">
|
||||
{intl.formatMessage(messages.season)}
|
||||
</th>
|
||||
<th className="px-6 py-3 bg-gray-500 text-left text-xs leading-4 font-medium text-gray-200 uppercase tracking-wider">
|
||||
<th className="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-gray-200 uppercase bg-gray-500">
|
||||
{intl.formatMessage(messages.numberofepisodes)}
|
||||
</th>
|
||||
<th className="px-6 py-3 bg-gray-500 text-left text-xs leading-4 font-medium text-gray-200 uppercase tracking-wider">
|
||||
<th className="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-gray-200 uppercase bg-gray-500">
|
||||
{intl.formatMessage(messages.status)}
|
||||
</th>
|
||||
</tr>
|
||||
@@ -279,7 +279,7 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
|
||||
);
|
||||
return (
|
||||
<tr key={`season-${season.id}`}>
|
||||
<td className="px-4 py-4 whitespace-nowrap text-sm leading-5 font-medium text-gray-100">
|
||||
<td className="px-4 py-4 text-sm font-medium leading-5 text-gray-100 whitespace-nowrap">
|
||||
<span
|
||||
role="checkbox"
|
||||
tabIndex={0}
|
||||
@@ -320,17 +320,17 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
|
||||
></span>
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm leading-5 font-medium text-gray-100">
|
||||
<td className="px-6 py-4 text-sm font-medium leading-5 text-gray-100 whitespace-nowrap">
|
||||
{season.seasonNumber === 0
|
||||
? intl.formatMessage(messages.extras)
|
||||
: intl.formatMessage(messages.seasonnumber, {
|
||||
number: season.seasonNumber,
|
||||
})}
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-200">
|
||||
<td className="px-6 py-4 text-sm leading-5 text-gray-200 whitespace-nowrap">
|
||||
{season.episodeCount}
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-200">
|
||||
<td className="px-6 py-4 text-sm leading-5 text-gray-200 whitespace-nowrap">
|
||||
{!seasonRequest && !mediaSeason && (
|
||||
<Badge>
|
||||
{intl.formatMessage(messages.notrequested)}
|
||||
@@ -346,10 +346,8 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
|
||||
{!mediaSeason &&
|
||||
seasonRequest?.status ===
|
||||
MediaRequestStatus.APPROVED && (
|
||||
<Badge badgeType="danger">
|
||||
{intl.formatMessage(
|
||||
globalMessages.unavailable
|
||||
)}
|
||||
<Badge badgeType="primary">
|
||||
{intl.formatMessage(globalMessages.requested)}
|
||||
</Badge>
|
||||
)}
|
||||
{!mediaSeason &&
|
||||
|
||||
@@ -4,7 +4,7 @@ import useSWR from 'swr';
|
||||
import LoadingSpinner from '../../Common/LoadingSpinner';
|
||||
import Button from '../../Common/Button';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import Axios from 'axios';
|
||||
import axios from 'axios';
|
||||
import * as Yup from 'yup';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
|
||||
@@ -17,6 +17,8 @@ const messages = defineMessages({
|
||||
webhookUrlPlaceholder: 'Server Settings -> Integrations -> Webhooks',
|
||||
discordsettingssaved: 'Discord notification settings saved!',
|
||||
discordsettingsfailed: 'Discord notification settings failed to save.',
|
||||
testsent: 'Test notification sent!',
|
||||
test: 'Test',
|
||||
});
|
||||
|
||||
const NotificationsDiscord: React.FC = () => {
|
||||
@@ -46,7 +48,7 @@ const NotificationsDiscord: React.FC = () => {
|
||||
validationSchema={NotificationsDiscordSchema}
|
||||
onSubmit={async (values) => {
|
||||
try {
|
||||
await Axios.post('/api/v1/settings/notifications/discord', {
|
||||
await axios.post('/api/v1/settings/notifications/discord', {
|
||||
enabled: values.enabled,
|
||||
types: values.types,
|
||||
options: {
|
||||
@@ -67,7 +69,22 @@ const NotificationsDiscord: React.FC = () => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{({ errors, touched, isSubmitting }) => {
|
||||
{({ errors, touched, isSubmitting, values, isValid }) => {
|
||||
const testSettings = async () => {
|
||||
await axios.post('/api/v1/settings/notifications/discord/test', {
|
||||
enabled: true,
|
||||
types: values.types,
|
||||
options: {
|
||||
webhookUrl: values.webhookUrl,
|
||||
},
|
||||
});
|
||||
|
||||
addToast(intl.formatMessage(messages.testsent), {
|
||||
appearance: 'info',
|
||||
autoDismiss: true,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Form>
|
||||
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
||||
@@ -112,11 +129,24 @@ const NotificationsDiscord: React.FC = () => {
|
||||
</div>
|
||||
<div className="mt-8 border-t border-gray-700 pt-5">
|
||||
<div className="flex justify-end">
|
||||
<span className="ml-3 inline-flex rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="warning"
|
||||
disabled={isSubmitting || !isValid}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
testSettings();
|
||||
}}
|
||||
>
|
||||
{intl.formatMessage(messages.test)}
|
||||
</Button>
|
||||
</span>
|
||||
<span className="ml-3 inline-flex rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="primary"
|
||||
type="submit"
|
||||
disabled={isSubmitting}
|
||||
disabled={isSubmitting || !isValid}
|
||||
>
|
||||
{isSubmitting
|
||||
? intl.formatMessage(messages.saving)
|
||||
|
||||
@@ -4,7 +4,7 @@ import useSWR from 'swr';
|
||||
import LoadingSpinner from '../../Common/LoadingSpinner';
|
||||
import Button from '../../Common/Button';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import Axios from 'axios';
|
||||
import axios from 'axios';
|
||||
import * as Yup from 'yup';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
|
||||
@@ -23,6 +23,11 @@ const messages = defineMessages({
|
||||
authPass: 'Auth Pass',
|
||||
emailsettingssaved: 'Email notification settings saved!',
|
||||
emailsettingsfailed: 'Email notification settings failed to save.',
|
||||
test: 'Test',
|
||||
testsent: 'Test notification sent!',
|
||||
allowselfsigned: 'Allow Self-Signed Certificates',
|
||||
ssldisabletip:
|
||||
'SSL should be disabled on standard TLS connections (Port 587)',
|
||||
});
|
||||
|
||||
const NotificationsEmail: React.FC = () => {
|
||||
@@ -59,11 +64,12 @@ const NotificationsEmail: React.FC = () => {
|
||||
secure: data.options.secure,
|
||||
authUser: data.options.authUser,
|
||||
authPass: data.options.authPass,
|
||||
allowSelfSigned: data.options.allowSelfSigned,
|
||||
}}
|
||||
validationSchema={NotificationsDiscordSchema}
|
||||
onSubmit={async (values) => {
|
||||
try {
|
||||
await Axios.post('/api/v1/settings/notifications/email', {
|
||||
await axios.post('/api/v1/settings/notifications/email', {
|
||||
enabled: values.enabled,
|
||||
types: values.types,
|
||||
options: {
|
||||
@@ -73,6 +79,7 @@ const NotificationsEmail: React.FC = () => {
|
||||
secure: values.secure,
|
||||
authUser: values.authUser,
|
||||
authPass: values.authPass,
|
||||
allowSelfSigned: values.allowSelfSigned,
|
||||
},
|
||||
});
|
||||
addToast(intl.formatMessage(messages.emailsettingssaved), {
|
||||
@@ -89,12 +96,32 @@ const NotificationsEmail: React.FC = () => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{({ errors, touched, isSubmitting }) => {
|
||||
{({ errors, touched, isSubmitting, values, isValid }) => {
|
||||
const testSettings = async () => {
|
||||
await axios.post('/api/v1/settings/notifications/email/test', {
|
||||
enabled: true,
|
||||
types: values.types,
|
||||
options: {
|
||||
emailFrom: values.emailFrom,
|
||||
smtpHost: values.smtpHost,
|
||||
smtpPort: Number(values.smtpPort),
|
||||
secure: values.secure,
|
||||
authUser: values.authUser,
|
||||
authPass: values.authPass,
|
||||
},
|
||||
});
|
||||
|
||||
addToast(intl.formatMessage(messages.testsent), {
|
||||
appearance: 'info',
|
||||
autoDismiss: true,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Form>
|
||||
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
||||
<label
|
||||
htmlFor="isDefault"
|
||||
htmlFor="enabled"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.agentenabled)}
|
||||
@@ -104,135 +131,169 @@ const NotificationsEmail: React.FC = () => {
|
||||
type="checkbox"
|
||||
id="enabled"
|
||||
name="enabled"
|
||||
className="form-checkbox rounded-md h-6 w-6 text-indigo-600 transition duration-150 ease-in-out"
|
||||
className="w-6 h-6 text-indigo-600 transition duration-150 ease-in-out rounded-md form-checkbox"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
||||
<label
|
||||
htmlFor="name"
|
||||
htmlFor="emailFrom"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.emailsender)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<Field
|
||||
id="emailFrom"
|
||||
name="emailFrom"
|
||||
type="text"
|
||||
placeholder="no-reply@example.com"
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
{errors.emailFrom && touched.emailFrom && (
|
||||
<div className="text-red-500 mt-2">{errors.emailFrom}</div>
|
||||
<div className="mt-2 text-red-500">{errors.emailFrom}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
||||
<label
|
||||
htmlFor="name"
|
||||
htmlFor="smtpHost"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.smtpHost)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<Field
|
||||
id="smtpHost"
|
||||
name="smtpHost"
|
||||
type="text"
|
||||
placeholder="localhost"
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
{errors.smtpHost && touched.smtpHost && (
|
||||
<div className="text-red-500 mt-2">{errors.smtpHost}</div>
|
||||
<div className="mt-2 text-red-500">{errors.smtpHost}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
||||
<label
|
||||
htmlFor="name"
|
||||
htmlFor="smtpPort"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.smtpPort)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<Field
|
||||
id="smtpPort"
|
||||
name="smtpPort"
|
||||
type="text"
|
||||
placeholder="465"
|
||||
className="form-input block w-24 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="block w-24 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
{errors.smtpPort && touched.smtpPort && (
|
||||
<div className="text-red-500 mt-2">{errors.smtpPort}</div>
|
||||
<div className="mt-2 text-red-500">{errors.smtpPort}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
||||
<label
|
||||
htmlFor="isDefault"
|
||||
htmlFor="secure"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.enableSsl)}
|
||||
<div className="flex flex-col">
|
||||
<span>{intl.formatMessage(messages.enableSsl)}</span>
|
||||
<span className="text-gray-500">
|
||||
{intl.formatMessage(messages.ssldisabletip)}
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<Field
|
||||
type="checkbox"
|
||||
id="secure"
|
||||
name="secure"
|
||||
className="form-checkbox rounded-md h-6 w-6 text-indigo-600 transition duration-150 ease-in-out"
|
||||
className="w-6 h-6 text-indigo-600 transition duration-150 ease-in-out rounded-md form-checkbox"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
||||
<label
|
||||
htmlFor="allowSelfSigned"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.allowselfsigned)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<Field
|
||||
type="checkbox"
|
||||
id="allowSelfSigned"
|
||||
name="allowSelfSigned"
|
||||
className="w-6 h-6 text-indigo-600 transition duration-150 ease-in-out rounded-md form-checkbox"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
||||
<label
|
||||
htmlFor="name"
|
||||
htmlFor="authUser"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.authUser)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<Field
|
||||
id="authUser"
|
||||
name="authUser"
|
||||
type="text"
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
||||
<label
|
||||
htmlFor="name"
|
||||
htmlFor="authPass"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.authPass)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<Field
|
||||
id="authPass"
|
||||
name="authPass"
|
||||
type="password"
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-8 border-t border-gray-700 pt-5">
|
||||
<div className="pt-5 mt-8 border-t border-gray-700">
|
||||
<div className="flex justify-end">
|
||||
<span className="ml-3 inline-flex rounded-md shadow-sm">
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="warning"
|
||||
disabled={isSubmitting || !isValid}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
testSettings();
|
||||
}}
|
||||
>
|
||||
{intl.formatMessage(messages.test)}
|
||||
</Button>
|
||||
</span>
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="primary"
|
||||
type="submit"
|
||||
disabled={isSubmitting}
|
||||
disabled={isSubmitting || !isValid}
|
||||
>
|
||||
{isSubmitting
|
||||
? intl.formatMessage(messages.saving)
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
import React from 'react';
|
||||
import { Field, Form, Formik } from 'formik';
|
||||
import useSWR from 'swr';
|
||||
import LoadingSpinner from '../../../Common/LoadingSpinner';
|
||||
import Button from '../../../Common/Button';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import axios from 'axios';
|
||||
import * as Yup from 'yup';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
import Alert from '../../../Common/Alert';
|
||||
|
||||
const messages = defineMessages({
|
||||
save: 'Save Changes',
|
||||
saving: 'Saving...',
|
||||
agentenabled: 'Agent Enabled',
|
||||
webhookUrl: 'Webhook URL',
|
||||
validationWebhookUrlRequired: 'You must provide a webhook URL',
|
||||
webhookUrlPlaceholder: 'Webhook URL',
|
||||
slacksettingssaved: 'Slack notification settings saved!',
|
||||
slacksettingsfailed: 'Slack notification settings failed to save.',
|
||||
testsent: 'Test notification sent!',
|
||||
test: 'Test',
|
||||
settingupslack: 'Setting up Slack Notifications',
|
||||
settingupslackDescription:
|
||||
'To use Slack notifications, you will need to create an <WebhookLink>Incoming Webhook</WebhookLink> integration and use the provided webhook URL below.',
|
||||
});
|
||||
|
||||
const NotificationsSlack: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const { addToast } = useToasts();
|
||||
const { data, error, revalidate } = useSWR(
|
||||
'/api/v1/settings/notifications/slack'
|
||||
);
|
||||
|
||||
const NotificationsSlackSchema = Yup.object().shape({
|
||||
webhookUrl: Yup.string().required(
|
||||
intl.formatMessage(messages.validationWebhookUrlRequired)
|
||||
),
|
||||
});
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<p className="mb-">
|
||||
<Alert title={intl.formatMessage(messages.settingupslack)} type="info">
|
||||
{intl.formatMessage(messages.settingupslackDescription, {
|
||||
WebhookLink: function WebhookLink(msg) {
|
||||
return (
|
||||
<a
|
||||
href="https://my.slack.com/services/new/incoming-webhook/"
|
||||
className="text-indigo-100 hover:text-white hover:underline"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{msg}
|
||||
</a>
|
||||
);
|
||||
},
|
||||
})}
|
||||
</Alert>
|
||||
</p>
|
||||
<Formik
|
||||
initialValues={{
|
||||
enabled: data.enabled,
|
||||
types: data.types,
|
||||
webhookUrl: data.options.webhookUrl,
|
||||
}}
|
||||
validationSchema={NotificationsSlackSchema}
|
||||
onSubmit={async (values) => {
|
||||
try {
|
||||
await axios.post('/api/v1/settings/notifications/slack', {
|
||||
enabled: values.enabled,
|
||||
types: values.types,
|
||||
options: {
|
||||
webhookUrl: values.webhookUrl,
|
||||
},
|
||||
});
|
||||
addToast(intl.formatMessage(messages.slacksettingssaved), {
|
||||
appearance: 'success',
|
||||
autoDismiss: true,
|
||||
});
|
||||
} catch (e) {
|
||||
addToast(intl.formatMessage(messages.slacksettingsfailed), {
|
||||
appearance: 'error',
|
||||
autoDismiss: true,
|
||||
});
|
||||
} finally {
|
||||
revalidate();
|
||||
}
|
||||
}}
|
||||
>
|
||||
{({ errors, touched, isSubmitting, values, isValid }) => {
|
||||
const testSettings = async () => {
|
||||
await axios.post('/api/v1/settings/notifications/slack/test', {
|
||||
enabled: true,
|
||||
types: values.types,
|
||||
options: {
|
||||
webhookUrl: values.webhookUrl,
|
||||
},
|
||||
});
|
||||
|
||||
addToast(intl.formatMessage(messages.testsent), {
|
||||
appearance: 'info',
|
||||
autoDismiss: true,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Form>
|
||||
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
||||
<label
|
||||
htmlFor="isDefault"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.agentenabled)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<Field
|
||||
type="checkbox"
|
||||
id="enabled"
|
||||
name="enabled"
|
||||
className="w-6 h-6 text-indigo-600 transition duration-150 ease-in-out rounded-md form-checkbox"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
||||
<label
|
||||
htmlFor="name"
|
||||
className="block text-sm font-medium leading-5 text-gray-400 sm:mt-px sm:pt-2"
|
||||
>
|
||||
{intl.formatMessage(messages.webhookUrl)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<Field
|
||||
id="webhookUrl"
|
||||
name="webhookUrl"
|
||||
type="text"
|
||||
placeholder={intl.formatMessage(
|
||||
messages.webhookUrlPlaceholder
|
||||
)}
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
{errors.webhookUrl && touched.webhookUrl && (
|
||||
<div className="mt-2 text-red-500">{errors.webhookUrl}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="pt-5 mt-8 border-t border-gray-700">
|
||||
<div className="flex justify-end">
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="warning"
|
||||
disabled={isSubmitting || !isValid}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
testSettings();
|
||||
}}
|
||||
>
|
||||
{intl.formatMessage(messages.test)}
|
||||
</Button>
|
||||
</span>
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="primary"
|
||||
type="submit"
|
||||
disabled={isSubmitting || !isValid}
|
||||
>
|
||||
{isSubmitting
|
||||
? intl.formatMessage(messages.saving)
|
||||
: intl.formatMessage(messages.save)}
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
);
|
||||
}}
|
||||
</Formik>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default NotificationsSlack;
|
||||
@@ -7,7 +7,7 @@ import Badge from '../../../Common/Badge';
|
||||
import Button from '../../../Common/Button';
|
||||
import Modal from '../../../Common/Modal';
|
||||
import Transition from '../../../Transition';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl';
|
||||
import globalMessages from '../../../../i18n/globalMessages';
|
||||
|
||||
const messages = defineMessages({
|
||||
@@ -59,7 +59,7 @@ const Release: React.FC<ReleaseProps> = ({
|
||||
const intl = useIntl();
|
||||
const [isModalOpen, setModalOpen] = useState(false);
|
||||
return (
|
||||
<div className="bg-gray-800 rounded-md flex flex-col sm:flex-row px-4 py-2">
|
||||
<div className="flex flex-col px-4 py-2 bg-gray-800 rounded-md sm:flex-row">
|
||||
<Transition
|
||||
enter="opacity-0 transition duration-300"
|
||||
enterFrom="opacity-0"
|
||||
@@ -99,7 +99,16 @@ const Release: React.FC<ReleaseProps> = ({
|
||||
</div>
|
||||
</Modal>
|
||||
</Transition>
|
||||
<div className="flex mb-4 sm:mb-0 items-center justify-center sm:justify-start">
|
||||
<div className="flex items-center justify-center mb-4 sm:mb-0 sm:justify-start">
|
||||
<span className="mr-2 text-sm">
|
||||
<FormattedRelativeTime
|
||||
value={Math.floor(
|
||||
(new Date(release.created_at).getTime() - Date.now()) / 1000
|
||||
)}
|
||||
updateIntervalInSeconds={1}
|
||||
numeric="always"
|
||||
/>
|
||||
</span>
|
||||
<span className="text-xl">{release.name}</span>
|
||||
{isLatest && (
|
||||
<span className="ml-2">
|
||||
@@ -147,7 +156,7 @@ const Releases: React.FC<ReleasesProps> = ({ currentVersion }) => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="text-xl pb-4 mb-4 border-b border-gray-800">
|
||||
<div className="pb-4 mb-4 text-xl border-b border-gray-800">
|
||||
{intl.formatMessage(messages.releases)}
|
||||
</div>
|
||||
{currentVersion.startsWith('develop-') && (
|
||||
@@ -159,7 +168,7 @@ const Releases: React.FC<ReleasesProps> = ({ currentVersion }) => {
|
||||
href="https://github.com/sct/overseerr"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="text-yellow-100 underline hover:text-white transition duration-300"
|
||||
className="text-yellow-100 underline transition duration-300 hover:text-white"
|
||||
>
|
||||
{msg}
|
||||
</a>
|
||||
|
||||
@@ -26,16 +26,12 @@ const SettingsAbout: React.FC = () => {
|
||||
'/api/v1/settings/about'
|
||||
);
|
||||
|
||||
if (error) {
|
||||
return <Error statusCode={500} />;
|
||||
}
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return <LoadingSpinner />;
|
||||
return <Error statusCode={500} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -9,6 +9,8 @@ import Button from '../Common/Button';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import { useUser, Permission } from '../../hooks/useUser';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
import { messages as permissionMessages } from '../UserEdit';
|
||||
import PermissionOption, { PermissionItem } from '../PermissionOption';
|
||||
|
||||
const messages = defineMessages({
|
||||
generalsettings: 'General Settings',
|
||||
@@ -22,11 +24,12 @@ const messages = defineMessages({
|
||||
toastApiKeyFailure: 'Something went wrong generating a new API Key.',
|
||||
toastSettingsSuccess: 'Settings saved.',
|
||||
toastSettingsFailure: 'Something went wrong saving settings.',
|
||||
defaultPermissions: 'Default User Permissions',
|
||||
});
|
||||
|
||||
const SettingsMain: React.FC = () => {
|
||||
const { addToast } = useToasts();
|
||||
const { hasPermission } = useUser();
|
||||
const { hasPermission: userHasPermission } = useUser();
|
||||
const intl = useIntl();
|
||||
const { data, error, revalidate } = useSWR<MainSettings>(
|
||||
'/api/v1/settings/main'
|
||||
@@ -53,13 +56,74 @@ const SettingsMain: React.FC = () => {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
|
||||
const permissionList: PermissionItem[] = [
|
||||
{
|
||||
id: 'admin',
|
||||
name: intl.formatMessage(permissionMessages.admin),
|
||||
description: intl.formatMessage(permissionMessages.adminDescription),
|
||||
permission: Permission.ADMIN,
|
||||
},
|
||||
{
|
||||
id: 'settings',
|
||||
name: intl.formatMessage(permissionMessages.settings),
|
||||
description: intl.formatMessage(permissionMessages.settingsDescription),
|
||||
permission: Permission.MANAGE_SETTINGS,
|
||||
},
|
||||
{
|
||||
id: 'users',
|
||||
name: intl.formatMessage(permissionMessages.users),
|
||||
description: intl.formatMessage(permissionMessages.usersDescription),
|
||||
permission: Permission.MANAGE_USERS,
|
||||
},
|
||||
{
|
||||
id: 'managerequest',
|
||||
name: intl.formatMessage(permissionMessages.managerequests),
|
||||
description: intl.formatMessage(
|
||||
permissionMessages.managerequestsDescription
|
||||
),
|
||||
permission: Permission.MANAGE_REQUESTS,
|
||||
},
|
||||
{
|
||||
id: 'request',
|
||||
name: intl.formatMessage(permissionMessages.request),
|
||||
description: intl.formatMessage(permissionMessages.requestDescription),
|
||||
permission: Permission.REQUEST,
|
||||
},
|
||||
{
|
||||
id: 'autoapprove',
|
||||
name: intl.formatMessage(permissionMessages.autoapprove),
|
||||
description: intl.formatMessage(
|
||||
permissionMessages.autoapproveDescription
|
||||
),
|
||||
permission: Permission.AUTO_APPROVE,
|
||||
children: [
|
||||
{
|
||||
id: 'autoapprovemovies',
|
||||
name: intl.formatMessage(permissionMessages.autoapproveMovies),
|
||||
description: intl.formatMessage(
|
||||
permissionMessages.autoapproveMoviesDescription
|
||||
),
|
||||
permission: Permission.AUTO_APPROVE_MOVIE,
|
||||
},
|
||||
{
|
||||
id: 'autoapprovetv',
|
||||
name: intl.formatMessage(permissionMessages.autoapproveSeries),
|
||||
description: intl.formatMessage(
|
||||
permissionMessages.autoapproveSeriesDescription
|
||||
),
|
||||
permission: Permission.AUTO_APPROVE_TV,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<h3 className="text-lg leading-6 font-medium text-gray-200">
|
||||
<h3 className="text-lg font-medium leading-6 text-gray-200">
|
||||
{intl.formatMessage(messages.generalsettings)}
|
||||
</h3>
|
||||
<p className="mt-1 max-w-2xl text-sm leading-5 text-gray-500">
|
||||
<p className="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
||||
{intl.formatMessage(messages.generalsettingsDescription)}
|
||||
</p>
|
||||
</div>
|
||||
@@ -67,11 +131,14 @@ const SettingsMain: React.FC = () => {
|
||||
<Formik
|
||||
initialValues={{
|
||||
applicationUrl: data?.applicationUrl,
|
||||
defaultPermissions: data?.defaultPermissions ?? 0,
|
||||
}}
|
||||
enableReinitialize
|
||||
onSubmit={async (values) => {
|
||||
try {
|
||||
await axios.post('/api/v1/settings/main', {
|
||||
applicationUrl: values.applicationUrl,
|
||||
defaultPermissions: values.defaultPermissions,
|
||||
});
|
||||
|
||||
addToast(intl.formatMessage(messages.toastSettingsSuccess), {
|
||||
@@ -88,10 +155,10 @@ const SettingsMain: React.FC = () => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{({ isSubmitting }) => {
|
||||
{({ isSubmitting, values, setFieldValue }) => {
|
||||
return (
|
||||
<Form>
|
||||
{hasPermission(Permission.ADMIN) && (
|
||||
{userHasPermission(Permission.ADMIN) && (
|
||||
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
||||
<label
|
||||
htmlFor="username"
|
||||
@@ -100,11 +167,11 @@ const SettingsMain: React.FC = () => {
|
||||
{intl.formatMessage(messages.apikey)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<input
|
||||
type="text"
|
||||
id="apiKey"
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-none rounded-l-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-none form-input rounded-l-md sm:text-sm sm:leading-5"
|
||||
value={data?.apiKey}
|
||||
readOnly
|
||||
/>
|
||||
@@ -117,7 +184,7 @@ const SettingsMain: React.FC = () => {
|
||||
e.preventDefault();
|
||||
regenerate();
|
||||
}}
|
||||
className="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-500 text-sm leading-5 font-medium rounded-r-md text-white bg-indigo-500 hover:bg-indigo-400 focus:outline-none focus:ring-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150"
|
||||
className="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-500 border border-gray-500 rounded-r-md hover:bg-indigo-400 focus:outline-none focus:ring-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700"
|
||||
>
|
||||
<svg
|
||||
className="w-5 h-5"
|
||||
@@ -144,20 +211,51 @@ const SettingsMain: React.FC = () => {
|
||||
{intl.formatMessage(messages.applicationurl)}
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<Field
|
||||
id="applicationUrl"
|
||||
name="applicationUrl"
|
||||
type="text"
|
||||
placeholder="https://os.example.com"
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-8 border-t border-gray-700 pt-5">
|
||||
<div className="mt-6">
|
||||
<div role="group" aria-labelledby="label-permissions">
|
||||
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-baseline">
|
||||
<div>
|
||||
<div
|
||||
className="text-base font-medium leading-6 text-gray-400 sm:text-sm sm:leading-5"
|
||||
id="label-permissions"
|
||||
>
|
||||
{intl.formatMessage(messages.defaultPermissions)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-4 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg">
|
||||
{permissionList.map((permissionItem) => (
|
||||
<PermissionOption
|
||||
key={`permission-option-${permissionItem.id}`}
|
||||
option={permissionItem}
|
||||
currentPermission={values.defaultPermissions}
|
||||
onUpdate={(newPermissions) =>
|
||||
setFieldValue(
|
||||
'defaultPermissions',
|
||||
newPermissions
|
||||
)
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="pt-5 mt-8 border-t border-gray-700">
|
||||
<div className="flex justify-end">
|
||||
<span className="ml-3 inline-flex rounded-md shadow-sm">
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="primary"
|
||||
type="submit"
|
||||
|
||||
@@ -2,6 +2,8 @@ import Link from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import React from 'react';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import DiscordLogo from '../../assets/extlogos/discord_white.svg';
|
||||
import SlackLogo from '../../assets/extlogos/slack.svg';
|
||||
|
||||
const messages = defineMessages({
|
||||
notificationsettings: 'Notification Settings',
|
||||
@@ -11,6 +13,7 @@ const messages = defineMessages({
|
||||
|
||||
interface SettingsRoute {
|
||||
text: string;
|
||||
content: React.ReactNode;
|
||||
route: string;
|
||||
regex: RegExp;
|
||||
}
|
||||
@@ -18,23 +21,59 @@ interface SettingsRoute {
|
||||
const settingsRoutes: SettingsRoute[] = [
|
||||
{
|
||||
text: 'Email',
|
||||
content: (
|
||||
<span className="flex items-center">
|
||||
<svg
|
||||
className="h-4 mr-2"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"
|
||||
/>
|
||||
</svg>
|
||||
Email
|
||||
</span>
|
||||
),
|
||||
route: '/settings/notifications/email',
|
||||
regex: /^\/settings\/notifications\/email/,
|
||||
},
|
||||
{
|
||||
text: 'Discord',
|
||||
content: (
|
||||
<span className="flex items-center">
|
||||
<DiscordLogo className="h-4 mr-2" />
|
||||
Discord
|
||||
</span>
|
||||
),
|
||||
route: '/settings/notifications/discord',
|
||||
regex: /^\/settings\/notifications\/discord/,
|
||||
},
|
||||
{
|
||||
text: 'Slack',
|
||||
content: (
|
||||
<span className="flex items-center">
|
||||
<SlackLogo className="h-4 mr-2" />
|
||||
Slack
|
||||
</span>
|
||||
),
|
||||
route: '/settings/notifications/slack',
|
||||
regex: /^\/settings\/notifications\/slack/,
|
||||
},
|
||||
];
|
||||
|
||||
const SettingsNotifications: React.FC = ({ children }) => {
|
||||
const router = useRouter();
|
||||
const intl = useIntl();
|
||||
|
||||
const activeLinkColor = 'bg-gray-700';
|
||||
const activeLinkColor = 'bg-indigo-700';
|
||||
|
||||
const inactiveLinkColor = '';
|
||||
const inactiveLinkColor = 'bg-gray-800';
|
||||
|
||||
const SettingsLink: React.FC<{
|
||||
route: string;
|
||||
@@ -62,10 +101,10 @@ const SettingsNotifications: React.FC = ({ children }) => {
|
||||
return (
|
||||
<>
|
||||
<div className="mb-6">
|
||||
<h3 className="text-lg leading-6 font-medium text-gray-200">
|
||||
<h3 className="text-lg font-medium leading-6 text-gray-200">
|
||||
{intl.formatMessage(messages.notificationsettings)}
|
||||
</h3>
|
||||
<p className="mt-1 max-w-2xl text-sm leading-5 text-gray-500">
|
||||
<p className="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
||||
{intl.formatMessage(messages.notificationsettingsDescription)}
|
||||
</p>
|
||||
</div>
|
||||
@@ -87,7 +126,7 @@ const SettingsNotifications: React.FC = ({ children }) => {
|
||||
)?.route
|
||||
}
|
||||
aria-label="Selected tab"
|
||||
className="bg-gray-800 text-white mt-1 rounded-md form-select block w-full pl-3 pr-10 py-2 text-base leading-6 border-gray-700 focus:outline-none focus:ring-blue focus:border-blue-300 sm:text-sm sm:leading-5 transition ease-in-out duration-150"
|
||||
className="block w-full py-2 pl-3 pr-10 mt-1 text-base leading-6 text-white transition duration-150 ease-in-out bg-gray-800 border-gray-700 rounded-md form-select focus:outline-none focus:ring-blue focus:border-blue-300 sm:text-sm sm:leading-5"
|
||||
>
|
||||
{settingsRoutes.map((route, index) => (
|
||||
<SettingsLink
|
||||
@@ -109,7 +148,7 @@ const SettingsNotifications: React.FC = ({ children }) => {
|
||||
regex={route.regex}
|
||||
key={`standard-settings-link-${index}`}
|
||||
>
|
||||
{route.text}
|
||||
{route.content}
|
||||
</SettingsLink>
|
||||
))}
|
||||
</nav>
|
||||
|
||||
@@ -28,7 +28,7 @@ const messages = defineMessages({
|
||||
sync: 'Sync Plex Libraries',
|
||||
manualscan: 'Manual Library Scan',
|
||||
manualscanDescription:
|
||||
"Normally, this will only be run once every 6 hours. Overseerr will check your Plex server's recently added more aggressively. If this is your first time configuring Plex, a one time full manual library scan is recommended!",
|
||||
"Normally, this will only be run once every 24 hours. Overseerr will check your Plex server's recently added more aggressively. If this is your first time configuring Plex, a one time full manual library scan is recommended!",
|
||||
notrunning: 'Not Running',
|
||||
currentlibrary: 'Current Library: {name}',
|
||||
librariesRemaining: 'Libraries Remaining: {count}',
|
||||
@@ -143,10 +143,10 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<h3 className="text-lg leading-6 font-medium text-gray-200">
|
||||
<h3 className="text-lg font-medium leading-6 text-gray-200">
|
||||
<FormattedMessage {...messages.plexsettings} />
|
||||
</h3>
|
||||
<p className="mt-1 max-w-2xl text-sm leading-5 text-gray-500">
|
||||
<p className="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
||||
<FormattedMessage {...messages.plexsettingsDescription} />
|
||||
</p>
|
||||
</div>
|
||||
@@ -188,7 +188,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
<form onSubmit={handleSubmit}>
|
||||
<div className="mt-6 sm:mt-5">
|
||||
{submitError && (
|
||||
<div className="bg-red-700 text-white p-4 rounded-md mb-6">
|
||||
<div className="p-4 mb-6 text-white bg-red-700 rounded-md">
|
||||
{submitError}
|
||||
</div>
|
||||
)}
|
||||
@@ -200,7 +200,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
<FormattedMessage {...messages.servername} />
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<input
|
||||
type="text"
|
||||
id="name"
|
||||
@@ -210,7 +210,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
)}
|
||||
value={data?.name}
|
||||
readOnly
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -223,8 +223,8 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
<FormattedMessage {...messages.hostname} />
|
||||
</label>
|
||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||
<span className="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-500 bg-gray-800 text-gray-100 sm:text-sm cursor-default">
|
||||
<div className="flex max-w-lg rounded-md shadow-sm">
|
||||
<span className="inline-flex items-center px-3 text-gray-100 bg-gray-800 border border-r-0 border-gray-500 cursor-default rounded-l-md sm:text-sm">
|
||||
{values.useSsl ? 'https://' : 'http://'}
|
||||
</span>
|
||||
<Field
|
||||
@@ -232,11 +232,11 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
id="hostname"
|
||||
name="hostname"
|
||||
placeholder="127.0.0.1"
|
||||
className="flex-1 form-input block w-full min-w-0 rounded-r-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-1 block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 form-input rounded-r-md sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
{errors.hostname && touched.hostname && (
|
||||
<div className="text-red-500 mt-2">{errors.hostname}</div>
|
||||
<div className="mt-2 text-red-500">{errors.hostname}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -254,11 +254,11 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
id="port"
|
||||
name="port"
|
||||
placeholder="32400"
|
||||
className="form-input block w-24 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="block w-24 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
/>
|
||||
</div>
|
||||
{errors.port && touched.port && (
|
||||
<div className="text-red-500 mt-2">{errors.port}</div>
|
||||
<div className="mt-2 text-red-500">{errors.port}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -278,13 +278,13 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
onChange={() => {
|
||||
setFieldValue('useSsl', !values.useSsl);
|
||||
}}
|
||||
className="form-checkbox h-6 w-6 rounded-md text-indigo-600 transition duration-150 ease-in-out"
|
||||
className="w-6 h-6 text-indigo-600 transition duration-150 ease-in-out rounded-md form-checkbox"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-8 border-t border-gray-700 pt-5">
|
||||
<div className="pt-5 mt-8 border-t border-gray-700">
|
||||
<div className="flex justify-end">
|
||||
<span className="ml-3 inline-flex rounded-md shadow-sm">
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="primary"
|
||||
type="submit"
|
||||
@@ -302,10 +302,10 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
}}
|
||||
</Formik>
|
||||
<div className="mt-10">
|
||||
<h3 className="text-lg leading-6 font-medium text-gray-200">
|
||||
<h3 className="text-lg font-medium leading-6 text-gray-200">
|
||||
<FormattedMessage {...messages.plexlibraries} />
|
||||
</h3>
|
||||
<p className="mt-1 max-w-2xl text-sm leading-5 text-gray-500">
|
||||
<p className="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
||||
<FormattedMessage {...messages.plexlibrariesDescription} />
|
||||
</p>
|
||||
<div className="mt-6">
|
||||
@@ -327,7 +327,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
: intl.formatMessage(messages.sync)}
|
||||
</Button>
|
||||
</div>
|
||||
<ul className="mt-6 grid grid-cols-1 gap-5 sm:gap-6 sm:grid-cols-2 lg:grid-cols-4">
|
||||
<ul className="grid grid-cols-1 gap-5 mt-6 sm:gap-6 sm:grid-cols-2 lg:grid-cols-4">
|
||||
{data?.libraries.map((library) => (
|
||||
<LibraryItem
|
||||
name={library.name}
|
||||
@@ -339,18 +339,18 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
</ul>
|
||||
</div>
|
||||
<div className="mt-10">
|
||||
<h3 className="text-lg leading-6 font-medium text-gray-200">
|
||||
<h3 className="text-lg font-medium leading-6 text-gray-200">
|
||||
<FormattedMessage {...messages.manualscan} />
|
||||
</h3>
|
||||
<p className="mt-1 max-w-2xl text-sm leading-5 text-gray-500">
|
||||
<p className="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
||||
<FormattedMessage {...messages.manualscanDescription} />
|
||||
</p>
|
||||
<div className="mt-6">
|
||||
<div className="bg-gray-800 p-4 rounded-md">
|
||||
<div className="w-full h-8 rounded-full bg-gray-600 mb-6 relative overflow-hidden">
|
||||
<div className="p-4 bg-gray-800 rounded-md">
|
||||
<div className="relative w-full h-8 mb-6 overflow-hidden bg-gray-600 rounded-full">
|
||||
{dataSync?.running && (
|
||||
<div
|
||||
className="h-8 bg-indigo-600 transition-all ease-in-out duration-200"
|
||||
className="h-8 transition-all duration-200 ease-in-out bg-indigo-600"
|
||||
style={{
|
||||
width: `${Math.round(
|
||||
(dataSync.progress / dataSync.total) * 100
|
||||
@@ -358,7 +358,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<div className="absolute inset-0 text-sm w-full h-8 flex items-center justify-center">
|
||||
<div className="absolute inset-0 flex items-center justify-center w-full h-8 text-sm">
|
||||
<span>
|
||||
{dataSync?.running
|
||||
? `${dataSync.progress} of ${dataSync.total}`
|
||||
@@ -366,10 +366,10 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex w-full flex-col sm:flex-row">
|
||||
<div className="flex flex-col w-full sm:flex-row">
|
||||
{dataSync?.running && (
|
||||
<>
|
||||
<div className="flex items-center mr-0 mb-2 sm:mb-0 sm:mr-2">
|
||||
<div className="flex items-center mb-2 mr-0 sm:mb-0 sm:mr-2">
|
||||
<Badge>
|
||||
<FormattedMessage
|
||||
{...messages.currentlibrary}
|
||||
|
||||
@@ -99,7 +99,7 @@ const ServerInstance: React.FC<ServerInstanceProps> = ({
|
||||
</p>
|
||||
</div>
|
||||
<img
|
||||
className="w-10 h-10 bg-gray-300 rounded-full flex-shrink-0"
|
||||
className="w-10 h-10 flex-shrink-0"
|
||||
src={`/images/${isSonarr ? 'sonarr' : 'radarr'}_logo.png`}
|
||||
alt=""
|
||||
/>
|
||||
|
||||
@@ -5,36 +5,40 @@ import { useIntl } from 'react-intl';
|
||||
import globalMessages from '../../i18n/globalMessages';
|
||||
|
||||
interface StatusBadgeProps {
|
||||
status: MediaStatus;
|
||||
status?: MediaStatus;
|
||||
}
|
||||
|
||||
const StatusBadge: React.FC<StatusBadgeProps> = ({ status }) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<>
|
||||
{status === MediaStatus.AVAILABLE && (
|
||||
switch (status) {
|
||||
case MediaStatus.AVAILABLE:
|
||||
return (
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.available)}
|
||||
</Badge>
|
||||
)}
|
||||
{status === MediaStatus.PARTIALLY_AVAILABLE && (
|
||||
);
|
||||
case MediaStatus.PARTIALLY_AVAILABLE:
|
||||
return (
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.partiallyavailable)}
|
||||
</Badge>
|
||||
)}
|
||||
{status === MediaStatus.PROCESSING && (
|
||||
<Badge badgeType="danger">
|
||||
{intl.formatMessage(globalMessages.unavailable)}
|
||||
);
|
||||
case MediaStatus.PROCESSING:
|
||||
return (
|
||||
<Badge badgeType="primary">
|
||||
{intl.formatMessage(globalMessages.requested)}
|
||||
</Badge>
|
||||
)}
|
||||
{status === MediaStatus.PENDING && (
|
||||
);
|
||||
case MediaStatus.PENDING:
|
||||
return (
|
||||
<Badge badgeType="warning">
|
||||
{intl.formatMessage(globalMessages.pending)}
|
||||
</Badge>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export default StatusBadge;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useCallback } from 'react';
|
||||
import React, { useState, useCallback, useEffect } from 'react';
|
||||
import type { MediaType } from '../../../server/models/Search';
|
||||
import Available from '../../assets/available.svg';
|
||||
import Requested from '../../assets/requested.svg';
|
||||
@@ -51,6 +51,10 @@ const TitleCard: React.FC<TitleCardProps> = ({
|
||||
year = year.slice(0, 4);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setCurrentStatus(status);
|
||||
}, [status]);
|
||||
|
||||
const requestComplete = useCallback((newStatus: MediaStatus) => {
|
||||
setCurrentStatus(newStatus);
|
||||
setShowRequestModal(false);
|
||||
@@ -74,7 +78,7 @@ const TitleCard: React.FC<TitleCardProps> = ({
|
||||
onCancel={closeModal}
|
||||
/>
|
||||
<div
|
||||
className="titleCard outline-none cursor-default"
|
||||
className="outline-none cursor-default titleCard"
|
||||
style={{
|
||||
backgroundImage: `url(//image.tmdb.org/t/p/w300_and_h450_face${image})`,
|
||||
}}
|
||||
@@ -93,13 +97,13 @@ const TitleCard: React.FC<TitleCardProps> = ({
|
||||
role="link"
|
||||
tabIndex={0}
|
||||
>
|
||||
<div className="absolute top-0 h-full w-full bottom-0 left-0 right-0 overflow-hidden shadow-xl">
|
||||
<div className="absolute top-0 bottom-0 left-0 right-0 w-full h-full overflow-hidden shadow-xl">
|
||||
<div
|
||||
className={`absolute left-0 top-0 rounded-tl-md rounded-br-md z-40 ${
|
||||
mediaType === 'movie' ? 'bg-blue-500' : 'bg-purple-600'
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-center text-center text-xs text-white h-4 px-2 py-1 font-normal uppercase">
|
||||
<div className="flex items-center h-4 px-2 py-1 text-xs font-normal text-center text-white uppercase">
|
||||
{mediaType === 'movie'
|
||||
? intl.formatMessage(messages.movie)
|
||||
: intl.formatMessage(messages.tvshow)}
|
||||
@@ -107,7 +111,7 @@ const TitleCard: React.FC<TitleCardProps> = ({
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="absolute right-0 top-0 z-40"
|
||||
className="absolute top-0 right-0 z-40"
|
||||
style={{
|
||||
right: '-1px',
|
||||
}}
|
||||
@@ -132,7 +136,7 @@ const TitleCard: React.FC<TitleCardProps> = ({
|
||||
leaveFrom="opacity-100"
|
||||
leaveTo="opacity-0"
|
||||
>
|
||||
<div className="absolute top-0 left-0 right-0 bottom-0 bg-gray-800 bg-opacity-75 z-40 text-white flex items-center justify-center rounded-lg">
|
||||
<div className="absolute top-0 bottom-0 left-0 right-0 z-40 flex items-center justify-center text-white bg-gray-800 bg-opacity-75 rounded-lg">
|
||||
<svg
|
||||
className="w-10 h-10 animate-spin"
|
||||
fill="none"
|
||||
@@ -159,155 +163,155 @@ const TitleCard: React.FC<TitleCardProps> = ({
|
||||
leaveFrom="opacity-100"
|
||||
leaveTo="opacity-0"
|
||||
>
|
||||
<Link href={mediaType === 'movie' ? `/movie/${id}` : `/tv/${id}`}>
|
||||
<a
|
||||
className="absolute w-full text-left top-0 right-0 left-0 bottom-0 rounded-lg overflow-hidden cursor-pointer"
|
||||
style={{
|
||||
background:
|
||||
'linear-gradient(180deg, rgba(45, 55, 72, 0.4) 0%, rgba(45, 55, 72, 0.9) 100%)',
|
||||
}}
|
||||
>
|
||||
<div className="absolute bottom-0 w-full left-0 right-0">
|
||||
<div className="px-2 text-white">
|
||||
{year && <div className="text-sm">{year}</div>}
|
||||
<div className="absolute top-0 bottom-0 left-0 right-0">
|
||||
<Link href={mediaType === 'movie' ? `/movie/${id}` : `/tv/${id}`}>
|
||||
<a
|
||||
className="absolute top-0 bottom-0 left-0 right-0 w-full h-full overflow-hidden text-left rounded-lg cursor-pointer"
|
||||
style={{
|
||||
background:
|
||||
'linear-gradient(180deg, rgba(45, 55, 72, 0.4) 0%, rgba(45, 55, 72, 0.9) 100%)',
|
||||
}}
|
||||
>
|
||||
<div className="flex items-end w-full h-full">
|
||||
<div className="px-2 text-white pb-11">
|
||||
{year && <div className="text-sm">{year}</div>}
|
||||
|
||||
<h1 className="text-xl leading-tight whitespace-normal">
|
||||
{title}
|
||||
</h1>
|
||||
<div
|
||||
className="text-xs whitespace-normal"
|
||||
style={{
|
||||
WebkitLineClamp: 3,
|
||||
display: '-webkit-box',
|
||||
overflow: 'hidden',
|
||||
WebkitBoxOrient: 'vertical',
|
||||
}}
|
||||
>
|
||||
{summary}
|
||||
<h1 className="text-xl leading-tight whitespace-normal">
|
||||
{title}
|
||||
</h1>
|
||||
<div
|
||||
className="text-xs whitespace-normal"
|
||||
style={{
|
||||
WebkitLineClamp: 3,
|
||||
display: '-webkit-box',
|
||||
overflow: 'hidden',
|
||||
WebkitBoxOrient: 'vertical',
|
||||
}}
|
||||
>
|
||||
{summary}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-between left-0 bottom-0 right-0 top-0 px-2 py-2">
|
||||
<Link
|
||||
href={
|
||||
mediaType === 'movie' ? `/movie/${id}` : `/tv/${id}`
|
||||
}
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
<div className="absolute bottom-0 left-0 right-0 flex justify-between px-2 py-2">
|
||||
<Link
|
||||
href={mediaType === 'movie' ? `/movie/${id}` : `/tv/${id}`}
|
||||
>
|
||||
<a className="flex w-full text-center text-white transition duration-150 ease-in-out bg-indigo-500 rounded-sm cursor-pointer h-7 hover:bg-indigo-400 focus:border-indigo-700 focus:ring-indigo active:bg-indigo-700">
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<a className="cursor-pointer flex w-full h-7 text-center text-white bg-indigo-500 rounded-sm hover:bg-indigo-400 focus:border-indigo-700 focus:ring-indigo active:bg-indigo-700 transition ease-in-out duration-150">
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
||||
/>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</Link>
|
||||
{(!currentStatus ||
|
||||
currentStatus === MediaStatus.UNKNOWN) && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setShowRequestModal(true);
|
||||
}}
|
||||
className="w-full h-7 text-center text-white bg-indigo-500 rounded-sm ml-2 hover:bg-indigo-400 focus:border-indigo-700 focus:ring-indigo active:bg-indigo-700 transition ease-in-out duration-150"
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
{currentStatus === MediaStatus.PENDING && (
|
||||
<button
|
||||
className="w-full h-7 text-center text-yellow-500 border border-yellow-500 rounded-sm ml-2 cursor-default"
|
||||
disabled
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
{currentStatus === MediaStatus.PROCESSING && (
|
||||
<button
|
||||
className="w-full h-7 text-center text-red-500 border border-red-500 rounded-sm ml-2 cursor-default"
|
||||
disabled
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
{(currentStatus === MediaStatus.AVAILABLE ||
|
||||
currentStatus === MediaStatus.PARTIALLY_AVAILABLE) && (
|
||||
<button
|
||||
className="w-full h-7 text-center text-green-400 border border-green-400 rounded-sm ml-2 cursor-default"
|
||||
disabled
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M5 13l4 4L19 7"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</Link>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
||||
/>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</Link>
|
||||
{(!currentStatus || currentStatus === MediaStatus.UNKNOWN) && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setShowRequestModal(true);
|
||||
}}
|
||||
className="w-full ml-2 text-center text-white transition duration-150 ease-in-out bg-indigo-500 rounded-sm h-7 hover:bg-indigo-400 focus:border-indigo-700 focus:ring-indigo active:bg-indigo-700"
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
{currentStatus === MediaStatus.PENDING && (
|
||||
<button
|
||||
className="w-full ml-2 text-center text-yellow-500 border border-yellow-500 rounded-sm cursor-default h-7"
|
||||
disabled
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
{currentStatus === MediaStatus.PROCESSING && (
|
||||
<button
|
||||
className="w-full ml-2 text-center text-indigo-500 border border-indigo-500 rounded-sm cursor-default h-7"
|
||||
disabled
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
{(currentStatus === MediaStatus.AVAILABLE ||
|
||||
currentStatus === MediaStatus.PARTIALLY_AVAILABLE) && (
|
||||
<button
|
||||
className="w-full ml-2 text-center text-green-400 border border-green-400 rounded-sm cursor-default h-7"
|
||||
disabled
|
||||
>
|
||||
<svg
|
||||
className="w-4 mx-auto"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M5 13l4 4L19 7"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
66
src/components/TvDetails/TvCrew/index.tsx
Normal file
@@ -0,0 +1,66 @@
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useContext } from 'react';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import useSWR from 'swr';
|
||||
import type { TvDetails } from '../../../../server/models/Tv';
|
||||
import { LanguageContext } from '../../../context/LanguageContext';
|
||||
import Error from '../../../pages/_error';
|
||||
import Header from '../../Common/Header';
|
||||
import LoadingSpinner from '../../Common/LoadingSpinner';
|
||||
import PersonCard from '../../PersonCard';
|
||||
|
||||
const messages = defineMessages({
|
||||
fullseriescrew: 'Full Series Crew',
|
||||
});
|
||||
|
||||
const TvCrew: React.FC = () => {
|
||||
const router = useRouter();
|
||||
const intl = useIntl();
|
||||
const { locale } = useContext(LanguageContext);
|
||||
const { data, error } = useSWR<TvDetails>(
|
||||
`/api/v1/tv/${router.query.tvId}?language=${locale}`
|
||||
);
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return <Error statusCode={404} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header
|
||||
subtext={
|
||||
<Link href={`/tv/${data.id}`}>
|
||||
<a className="hover:underline">{data.name}</a>
|
||||
</Link>
|
||||
}
|
||||
>
|
||||
{intl.formatMessage(messages.fullseriescrew)}
|
||||
</Header>
|
||||
<ul className="grid grid-cols-2 gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 2xl:grid-cols-8">
|
||||
{data?.credits.crew.map((person, index) => {
|
||||
return (
|
||||
<li
|
||||
key={`crew-${person.id}-${index}`}
|
||||
className="flex flex-col items-center col-span-1 text-center"
|
||||
>
|
||||
<PersonCard
|
||||
name={person.name}
|
||||
personId={person.id}
|
||||
subName={person.job}
|
||||
profilePath={person.profilePath}
|
||||
canExpand
|
||||
/>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TvCrew;
|
||||
@@ -1,5 +1,10 @@
|
||||
import React, { useState, useContext } from 'react';
|
||||
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
|
||||
import React, { useState, useContext, useMemo } from 'react';
|
||||
import {
|
||||
FormattedMessage,
|
||||
FormattedDate,
|
||||
defineMessages,
|
||||
useIntl,
|
||||
} from 'react-intl';
|
||||
import useSWR from 'swr';
|
||||
import { useRouter } from 'next/router';
|
||||
import Button from '../Common/Button';
|
||||
@@ -14,7 +19,6 @@ import { useUser, Permission } from '../../hooks/useUser';
|
||||
import { TvDetails as TvDetailsType } from '../../../server/models/Tv';
|
||||
import { MediaStatus } from '../../../server/constants/media';
|
||||
import RequestModal from '../RequestModal';
|
||||
import Badge from '../Common/Badge';
|
||||
import ButtonWithDropdown from '../Common/ButtonWithDropdown';
|
||||
import axios from 'axios';
|
||||
import SlideOver from '../Common/SlideOver';
|
||||
@@ -27,11 +31,14 @@ import RTAudFresh from '../../assets/rt_aud_fresh.svg';
|
||||
import RTAudRotten from '../../assets/rt_aud_rotten.svg';
|
||||
import type { RTRating } from '../../../server/api/rottentomatoes';
|
||||
import Head from 'next/head';
|
||||
import globalMessages from '../../i18n/globalMessages';
|
||||
import { ANIME_KEYWORD_ID } from '../../../server/api/themoviedb';
|
||||
import ExternalLinkBlock from '../ExternalLinkBlock';
|
||||
import { sortCrewPriority } from '../../utils/creditHelpers';
|
||||
import { Crew } from '../../../server/models/common';
|
||||
import StatusBadge from '../StatusBadge';
|
||||
|
||||
const messages = defineMessages({
|
||||
firstAirDate: 'First Air Date',
|
||||
userrating: 'User Rating',
|
||||
status: 'Status',
|
||||
originallanguage: 'Original Language',
|
||||
@@ -40,6 +47,7 @@ const messages = defineMessages({
|
||||
recommendations: 'Recommendations',
|
||||
similar: 'Similar Series',
|
||||
cancelrequest: 'Cancel Request',
|
||||
watchtrailer: 'Watch Trailer',
|
||||
available: 'Available',
|
||||
unavailable: 'Unavailable',
|
||||
request: 'Request',
|
||||
@@ -61,6 +69,7 @@ const messages = defineMessages({
|
||||
showtype: 'Show Type',
|
||||
anime: 'Anime',
|
||||
network: 'Network',
|
||||
viewfullcrew: 'View Full Crew',
|
||||
});
|
||||
|
||||
interface TvDetailsProps {
|
||||
@@ -105,6 +114,10 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
`/api/v1/tv/${router.query.tvId}/ratings`
|
||||
);
|
||||
|
||||
const sortedCrew = useMemo(() => sortCrewPriority(data?.credits.crew ?? []), [
|
||||
data,
|
||||
]);
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
@@ -117,6 +130,11 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
(request) => request.status === MediaRequestStatus.PENDING
|
||||
);
|
||||
|
||||
const trailerUrl = data.relatedVideos
|
||||
?.filter((r) => r.type === 'Trailer')
|
||||
.sort((a, b) => a.size - b.size)
|
||||
.pop()?.url;
|
||||
|
||||
const modifyRequests = async (type: 'approve' | 'decline'): Promise<void> => {
|
||||
if (!activeRequests) {
|
||||
return;
|
||||
@@ -148,7 +166,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="bg-cover bg-center -mx-4 -mt-2 px-4 sm:px-8 pt-4 "
|
||||
className="px-4 pt-4 -mx-4 -mt-2 bg-center bg-cover sm:px-8 "
|
||||
style={{
|
||||
height: 493,
|
||||
backgroundImage: `linear-gradient(180deg, rgba(17, 24, 39, 0.47) 0%, rgba(17, 24, 39, 1) 100%), url(//image.tmdb.org/t/p/w1920_and_h800_multi_faces/${data.backdropPath})`,
|
||||
@@ -173,21 +191,21 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
onClose={() => setShowManager(false)}
|
||||
subText={data.name}
|
||||
>
|
||||
<h3 className="text-xl mb-2">
|
||||
<h3 className="mb-2 text-xl">
|
||||
{intl.formatMessage(messages.manageModalRequests)}
|
||||
</h3>
|
||||
<div className="bg-gray-600 shadow overflow-hidden rounded-md">
|
||||
<div className="overflow-hidden bg-gray-600 rounded-md shadow">
|
||||
<ul>
|
||||
{data.mediaInfo?.requests?.map((request) => (
|
||||
<li
|
||||
key={`manage-request-${request.id}`}
|
||||
className="border-b last:border-b-0 border-gray-700"
|
||||
className="border-b border-gray-700 last:border-b-0"
|
||||
>
|
||||
<RequestBlock request={request} onUpdate={() => revalidate()} />
|
||||
</li>
|
||||
))}
|
||||
{(data.mediaInfo?.requests ?? []).length === 0 && (
|
||||
<li className="text-center py-4 text-gray-400">
|
||||
<li className="py-4 text-center text-gray-400">
|
||||
{intl.formatMessage(messages.manageModalNoRequests)}
|
||||
</li>
|
||||
)}
|
||||
@@ -202,64 +220,73 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
>
|
||||
{intl.formatMessage(messages.manageModalClearMedia)}
|
||||
</Button>
|
||||
<div className="text-sm text-gray-400 mt-2">
|
||||
<div className="mt-2 text-sm text-gray-400">
|
||||
{intl.formatMessage(messages.manageModalClearMediaWarning)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</SlideOver>
|
||||
<div className="flex flex-col items-center md:flex-row md:items-end pt-4">
|
||||
<div className="md:mr-4 flex-shrink-0">
|
||||
<div className="flex flex-col items-center pt-4 lg:flex-row lg:items-end">
|
||||
<div className="lg:mr-4">
|
||||
<img
|
||||
src={`//image.tmdb.org/t/p/w600_and_h900_bestv2${data.posterPath}`}
|
||||
alt=""
|
||||
className="rounded md:rounded-lg shadow md:shadow-2xl w-32 md:w-52"
|
||||
className="w-32 rounded shadow md:rounded-lg md:shadow-2xl md:w-44 lg:w-52"
|
||||
/>
|
||||
</div>
|
||||
<div className="text-white flex flex-col md:mr-4 mt-4 md:mt-0 text-center md:text-left">
|
||||
<div className="flex flex-col flex-1 mt-4 text-center text-white lg:mr-4 lg:mt-0 lg:text-left">
|
||||
<div className="mb-2">
|
||||
{data.mediaInfo?.status === MediaStatus.AVAILABLE && (
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.available)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PARTIALLY_AVAILABLE && (
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.partiallyavailable)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PROCESSING && (
|
||||
<Badge badgeType="danger">
|
||||
{intl.formatMessage(globalMessages.unavailable)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PENDING && (
|
||||
<Badge badgeType="warning">
|
||||
{intl.formatMessage(globalMessages.pending)}
|
||||
</Badge>
|
||||
)}
|
||||
<StatusBadge status={data.mediaInfo?.status} />
|
||||
</div>
|
||||
<h1 className="text-2xl md:text-4xl">
|
||||
<h1 className="text-2xl lg:text-4xl">
|
||||
<span>{data.name}</span>
|
||||
{data.firstAirDate && (
|
||||
<span className="text-2xl ml-2">
|
||||
<span className="ml-2 text-2xl">
|
||||
({data.firstAirDate.slice(0, 4)})
|
||||
</span>
|
||||
)}
|
||||
</h1>
|
||||
<span className="text-xs md:text-base mt-1 md:mt-0">
|
||||
<span className="mt-1 text-xs lg:text-base lg:mt-0">
|
||||
{data.genres.map((g) => g.name).join(', ')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex-1 flex justify-end mt-4 md:mt-0">
|
||||
<div className="flex justify-end flex-shrink-0 mt-4 lg:mt-0">
|
||||
{trailerUrl && (
|
||||
<a href={trailerUrl} target="_blank" rel="noreferrer">
|
||||
<Button buttonType="ghost">
|
||||
<svg
|
||||
className="w-5 h-5 mr-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"
|
||||
/>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
<FormattedMessage {...messages.watchtrailer} />
|
||||
</Button>
|
||||
</a>
|
||||
)}
|
||||
{(!data.mediaInfo ||
|
||||
data.mediaInfo.status === MediaStatus.UNKNOWN) && (
|
||||
<Button
|
||||
className="ml-2"
|
||||
buttonType="primary"
|
||||
onClick={() => setShowRequestModal(true)}
|
||||
>
|
||||
<svg
|
||||
className="w-4 mr-1"
|
||||
className="w-5 mr-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -296,7 +323,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
text={
|
||||
<>
|
||||
<svg
|
||||
className="w-4 mr-1"
|
||||
className="w-5 mr-1"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -310,6 +337,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<FormattedMessage {...messages.requestmore} />
|
||||
</>
|
||||
}
|
||||
className="ml-2"
|
||||
onClick={() => setShowRequestModal(true)}
|
||||
>
|
||||
{hasPermission(Permission.MANAGE_REQUESTS) &&
|
||||
@@ -391,7 +419,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex pt-8 text-white flex-col md:flex-row pb-4">
|
||||
<div className="flex flex-col pt-8 pb-4 text-white md:flex-row">
|
||||
<div className="flex-1 md:mr-8">
|
||||
<h2 className="text-xl md:text-2xl">
|
||||
<FormattedMessage {...messages.overview} />
|
||||
@@ -401,11 +429,63 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
? data.overview
|
||||
: intl.formatMessage(messages.overviewunavailable)}
|
||||
</p>
|
||||
<ul className="grid grid-cols-2 gap-6 mt-6 sm:grid-cols-3">
|
||||
{(data.createdBy.length > 0
|
||||
? [
|
||||
...data.createdBy.map(
|
||||
(person): Partial<Crew> => ({
|
||||
id: person.id,
|
||||
job: 'Creator',
|
||||
name: person.name,
|
||||
})
|
||||
),
|
||||
...sortedCrew,
|
||||
]
|
||||
: sortedCrew
|
||||
)
|
||||
.slice(0, 6)
|
||||
.map((person) => (
|
||||
<li
|
||||
className="flex flex-col col-span-1"
|
||||
key={`crew-${person.job}-${person.id}`}
|
||||
>
|
||||
<span className="font-bold">{person.job}</span>
|
||||
<Link href={`/person/${person.id}`}>
|
||||
<a className="text-gray-400 transition duration-300 hover:text-underline hover:text-gray-100">
|
||||
{person.name}
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{sortedCrew.length > 0 && (
|
||||
<div className="flex justify-end mt-4">
|
||||
<Link href={`/tv/${data.id}/crew`}>
|
||||
<a className="flex items-center text-gray-400 transition duration-300 hover:text-gray-100">
|
||||
<span>{intl.formatMessage(messages.viewfullcrew)}</span>
|
||||
<svg
|
||||
className="inline-block w-5 h-5 ml-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="w-full md:w-80 mt-8 md:mt-0">
|
||||
<div className="bg-gray-900 rounded-lg shadow border border-gray-800">
|
||||
<div className="w-full mt-8 md:w-80 md:mt-0">
|
||||
<div className="bg-gray-900 border border-gray-800 rounded-lg shadow">
|
||||
{(data.voteCount > 0 || ratingData) && (
|
||||
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0 items-center justify-center">
|
||||
<div className="flex items-center justify-center px-4 py-2 border-b border-gray-800 last:border-b-0">
|
||||
{ratingData?.criticsRating &&
|
||||
(ratingData?.criticsScore ?? 0) > 0 && (
|
||||
<>
|
||||
@@ -416,7 +496,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<RTFresh className="w-6 mr-1" />
|
||||
)}
|
||||
</span>
|
||||
<span className="text-gray-400 text-sm mr-4 last:mr-0">
|
||||
<span className="mr-4 text-sm text-gray-400 last:mr-0">
|
||||
{ratingData.criticsScore}%
|
||||
</span>
|
||||
</>
|
||||
@@ -431,7 +511,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<RTAudFresh className="w-6 mr-1" />
|
||||
)}
|
||||
</span>
|
||||
<span className="text-gray-400 text-sm mr-4 last:mr-0">
|
||||
<span className="mr-4 text-sm text-gray-400 last:mr-0">
|
||||
{ratingData.audienceScore}%
|
||||
</span>
|
||||
</>
|
||||
@@ -441,7 +521,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<span className="text-sm">
|
||||
<TmdbLogo className="w-6 mr-2" />
|
||||
</span>
|
||||
<span className="text-gray-400 text-sm">
|
||||
<span className="text-sm text-gray-400">
|
||||
{data.voteAverage}/10
|
||||
</span>
|
||||
</>
|
||||
@@ -455,16 +535,31 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<span className="text-sm">
|
||||
{intl.formatMessage(messages.showtype)}
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
{intl.formatMessage(messages.anime)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{data.firstAirDate && (
|
||||
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0">
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.firstAirDate} />
|
||||
</span>
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
<FormattedDate
|
||||
value={new Date(data.firstAirDate)}
|
||||
year="numeric"
|
||||
month="long"
|
||||
day="numeric"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0">
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.status} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
{data.status}
|
||||
</span>
|
||||
</div>
|
||||
@@ -475,7 +570,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.originallanguage} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
{
|
||||
data.spokenLanguages.find(
|
||||
(lng) => lng.iso_639_1 === data.originalLanguage
|
||||
@@ -489,7 +584,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<span className="text-sm">
|
||||
<FormattedMessage {...messages.network} />
|
||||
</span>
|
||||
<span className="flex-1 text-right text-gray-400 text-sm">
|
||||
<span className="flex-1 text-sm text-right text-gray-400">
|
||||
{data.networks.map((n) => n.name).join(', ')}
|
||||
</span>
|
||||
</div>
|
||||
@@ -505,10 +600,10 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
|
||||
<div className="mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<Link href="/tv/[tvId]/cast" as={`/tv/${data.id}/cast`}>
|
||||
<a className="inline-flex text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate items-center">
|
||||
<a className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>
|
||||
<FormattedMessage {...messages.cast} />
|
||||
</span>
|
||||
@@ -546,13 +641,13 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
/>
|
||||
{(recommended?.results ?? []).length > 0 && (
|
||||
<>
|
||||
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
|
||||
<div className="mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<Link
|
||||
href="/tv/[tvId]/recommendations"
|
||||
as={`/tv/${data.id}/recommendations`}
|
||||
>
|
||||
<a className="inline-flex text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate items-center">
|
||||
<a className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>
|
||||
<FormattedMessage {...messages.recommendations} />
|
||||
</span>
|
||||
@@ -596,10 +691,10 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
)}
|
||||
{(similar?.results ?? []).length > 0 && (
|
||||
<>
|
||||
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
|
||||
<div className="mt-6 mb-4 md:flex md:items-center md:justify-between">
|
||||
<div className="flex-1 min-w-0">
|
||||
<Link href="/tv/[tvId]/similar" as={`/tv/${data.id}/similar`}>
|
||||
<a className="inline-flex text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate items-center">
|
||||
<a className="inline-flex items-center text-xl leading-7 text-gray-300 hover:text-white sm:text-2xl sm:leading-9 sm:truncate">
|
||||
<span>
|
||||
<FormattedMessage {...messages.similar} />
|
||||
</span>
|
||||
|
||||
@@ -2,14 +2,14 @@ import React, { useState, useEffect } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import LoadingSpinner from '../Common/LoadingSpinner';
|
||||
import { Permission, useUser } from '../../hooks/useUser';
|
||||
import { hasPermission } from '../../../server/lib/permissions';
|
||||
import Button from '../Common/Button';
|
||||
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
||||
import axios from 'axios';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
import Header from '../Common/Header';
|
||||
import PermissionOption, { PermissionItem } from '../PermissionOption';
|
||||
|
||||
const messages = defineMessages({
|
||||
export const messages = defineMessages({
|
||||
edituser: 'Edit User',
|
||||
username: 'Username',
|
||||
avatar: 'Avatar',
|
||||
@@ -35,25 +35,24 @@ const messages = defineMessages({
|
||||
autoapprove: 'Auto Approve',
|
||||
autoapproveDescription:
|
||||
'Grants auto approval for any requests made by this user.',
|
||||
autoapproveMovies: 'Auto Approve Movies',
|
||||
autoapproveMoviesDescription:
|
||||
'Grants auto approve for movie requests made by this user.',
|
||||
autoapproveSeries: 'Auto Approve Series',
|
||||
autoapproveSeriesDescription:
|
||||
'Grants auto approve for series requests made by this user.',
|
||||
save: 'Save',
|
||||
saving: 'Saving...',
|
||||
usersaved: 'User saved',
|
||||
userfail: 'Something went wrong saving the user.',
|
||||
});
|
||||
|
||||
interface PermissionOption {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
permission: Permission;
|
||||
}
|
||||
|
||||
const UserEdit: React.FC = () => {
|
||||
const router = useRouter();
|
||||
const intl = useIntl();
|
||||
const { addToast } = useToasts();
|
||||
const [isUpdating, setIsUpdating] = useState(false);
|
||||
const { user: currentUser, hasPermission: currentHasPermission } = useUser();
|
||||
const { user: currentUser } = useUser();
|
||||
const { user, error, revalidate } = useUser({
|
||||
id: Number(router.query.userId),
|
||||
});
|
||||
@@ -97,7 +96,7 @@ const UserEdit: React.FC = () => {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
|
||||
const permissionList: PermissionOption[] = [
|
||||
const permissionList: PermissionItem[] = [
|
||||
{
|
||||
id: 'admin',
|
||||
name: intl.formatMessage(messages.admin),
|
||||
@@ -128,17 +127,29 @@ const UserEdit: React.FC = () => {
|
||||
description: intl.formatMessage(messages.requestDescription),
|
||||
permission: Permission.REQUEST,
|
||||
},
|
||||
{
|
||||
id: 'vote',
|
||||
name: intl.formatMessage(messages.vote),
|
||||
description: intl.formatMessage(messages.voteDescription),
|
||||
permission: Permission.VOTE,
|
||||
},
|
||||
{
|
||||
id: 'autoapprove',
|
||||
name: intl.formatMessage(messages.autoapprove),
|
||||
description: intl.formatMessage(messages.autoapproveDescription),
|
||||
permission: Permission.AUTO_APPROVE,
|
||||
children: [
|
||||
{
|
||||
id: 'autoapprovemovies',
|
||||
name: intl.formatMessage(messages.autoapproveMovies),
|
||||
description: intl.formatMessage(
|
||||
messages.autoapproveMoviesDescription
|
||||
),
|
||||
permission: Permission.AUTO_APPROVE_MOVIE,
|
||||
},
|
||||
{
|
||||
id: 'autoapprovetv',
|
||||
name: intl.formatMessage(messages.autoapproveSeries),
|
||||
description: intl.formatMessage(
|
||||
messages.autoapproveSeriesDescription
|
||||
),
|
||||
permission: Permission.AUTO_APPROVE_TV,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -148,7 +159,7 @@ const UserEdit: React.FC = () => {
|
||||
<FormattedMessage {...messages.edituser} />
|
||||
</Header>
|
||||
<div className="px-4 space-y-6 sm:p-6 lg:pb-8">
|
||||
<div className="flex flex-col space-y-6 lg:flex-row lg:space-y-0 lg:space-x-6 text-white">
|
||||
<div className="flex flex-col space-y-6 text-white lg:flex-row lg:space-y-0 lg:space-x-6">
|
||||
<div className="flex-grow space-y-6">
|
||||
<div className="space-y-1">
|
||||
<label
|
||||
@@ -157,11 +168,11 @@ const UserEdit: React.FC = () => {
|
||||
>
|
||||
<FormattedMessage {...messages.username} />
|
||||
</label>
|
||||
<div className="rounded-md shadow-sm flex">
|
||||
<div className="flex rounded-md shadow-sm">
|
||||
<input
|
||||
id="username"
|
||||
type="text"
|
||||
className="form-input flex-grow block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-grow block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
value={user?.username}
|
||||
readOnly
|
||||
/>
|
||||
@@ -174,11 +185,11 @@ const UserEdit: React.FC = () => {
|
||||
>
|
||||
<FormattedMessage {...messages.email} />
|
||||
</label>
|
||||
<div className="rounded-md shadow-sm flex">
|
||||
<div className="flex rounded-md shadow-sm">
|
||||
<input
|
||||
id="email"
|
||||
type="text"
|
||||
className="form-input flex-grow block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500"
|
||||
className="flex-grow block w-full min-w-0 transition duration-150 ease-in-out bg-gray-700 border border-gray-500 rounded-md form-input sm:text-sm sm:leading-5"
|
||||
value={user?.email}
|
||||
readOnly
|
||||
/>
|
||||
@@ -188,7 +199,7 @@ const UserEdit: React.FC = () => {
|
||||
|
||||
<div className="flex-grow space-y-1 lg:flex-grow-0 lg:flex-shrink-0">
|
||||
<p
|
||||
className="block text-sm leading-5 font-medium text-gray-400"
|
||||
className="block text-sm font-medium leading-5 text-gray-400"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<FormattedMessage {...messages.avatar} />
|
||||
@@ -196,11 +207,11 @@ const UserEdit: React.FC = () => {
|
||||
<div className="lg:hidden">
|
||||
<div className="flex items-center">
|
||||
<div
|
||||
className="flex-shrink-0 inline-block rounded-full overflow-hidden h-12 w-12"
|
||||
className="flex-shrink-0 inline-block w-12 h-12 overflow-hidden rounded-full"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<img
|
||||
className="rounded-full h-full w-full"
|
||||
className="w-full h-full rounded-full"
|
||||
src={user?.avatar}
|
||||
alt=""
|
||||
/>
|
||||
@@ -208,9 +219,9 @@ const UserEdit: React.FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="hidden relative rounded-full overflow-hidden lg:block transition duration-150 ease-in-out">
|
||||
<div className="relative hidden overflow-hidden transition duration-150 ease-in-out rounded-full lg:block">
|
||||
<img
|
||||
className="relative rounded-full w-40 h-40"
|
||||
className="relative w-40 h-40 rounded-full"
|
||||
src={user?.avatar}
|
||||
alt=""
|
||||
/>
|
||||
@@ -223,7 +234,7 @@ const UserEdit: React.FC = () => {
|
||||
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-baseline">
|
||||
<div>
|
||||
<div
|
||||
className="text-base leading-6 font-medium sm:text-sm sm:leading-5"
|
||||
className="text-base font-medium leading-6 sm:text-sm sm:leading-5"
|
||||
id="label-permissions"
|
||||
>
|
||||
<FormattedMessage {...messages.permissions} />
|
||||
@@ -231,83 +242,25 @@ const UserEdit: React.FC = () => {
|
||||
</div>
|
||||
<div className="mt-4 sm:mt-0 sm:col-span-2">
|
||||
<div className="max-w-lg">
|
||||
{permissionList.map((permissionOption) => (
|
||||
<div
|
||||
className={`relative flex items-start first:mt-0 mt-4 ${
|
||||
(permissionOption.permission !== Permission.ADMIN &&
|
||||
hasPermission(
|
||||
Permission.ADMIN,
|
||||
currentPermission
|
||||
)) ||
|
||||
(currentUser?.id !== 1 &&
|
||||
permissionOption.permission === Permission.ADMIN) ||
|
||||
(!currentHasPermission(Permission.MANAGE_SETTINGS) &&
|
||||
permissionOption.permission ===
|
||||
Permission.MANAGE_SETTINGS)
|
||||
? 'opacity-50'
|
||||
: ''
|
||||
}`}
|
||||
key={`permission-option-${permissionOption.id}`}
|
||||
>
|
||||
<div className="flex items-center h-5">
|
||||
<input
|
||||
id={permissionOption.id}
|
||||
name="permissions"
|
||||
type="checkbox"
|
||||
className="form-checkbox h-4 w-4 rounded-md text-indigo-600 transition duration-150 ease-in-out"
|
||||
disabled={
|
||||
(permissionOption.permission !==
|
||||
Permission.ADMIN &&
|
||||
hasPermission(
|
||||
Permission.ADMIN,
|
||||
currentPermission
|
||||
)) ||
|
||||
(currentUser?.id !== 1 &&
|
||||
permissionOption.permission ===
|
||||
Permission.ADMIN) ||
|
||||
(!currentHasPermission(
|
||||
Permission.MANAGE_SETTINGS
|
||||
) &&
|
||||
permissionOption.permission ===
|
||||
Permission.MANAGE_SETTINGS)
|
||||
}
|
||||
onClick={() => {
|
||||
setCurrentPermission((current) =>
|
||||
hasPermission(
|
||||
permissionOption.permission,
|
||||
currentPermission
|
||||
)
|
||||
? current - permissionOption.permission
|
||||
: current + permissionOption.permission
|
||||
);
|
||||
}}
|
||||
checked={hasPermission(
|
||||
permissionOption.permission,
|
||||
currentPermission
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="ml-3 text-sm leading-5">
|
||||
<label
|
||||
htmlFor={permissionOption.id}
|
||||
className="font-medium"
|
||||
>
|
||||
{permissionOption.name}
|
||||
</label>
|
||||
<p className="text-gray-500">
|
||||
{permissionOption.description}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{permissionList.map((permissionItem) => (
|
||||
<PermissionOption
|
||||
key={`permission-option-${permissionItem.id}`}
|
||||
option={permissionItem}
|
||||
user={currentUser}
|
||||
currentPermission={currentPermission}
|
||||
onUpdate={(newPermission) =>
|
||||
setCurrentPermission(newPermission)
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-8 border-t border-gray-700 pt-5">
|
||||
<div className="pt-5 mt-8 border-t border-gray-700">
|
||||
<div className="flex justify-end">
|
||||
<span className="ml-3 inline-flex rounded-md shadow-sm">
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
<Button
|
||||
buttonType="primary"
|
||||
type="submit"
|
||||
|
||||
@@ -18,6 +18,10 @@ import globalMessages from '../../i18n/globalMessages';
|
||||
|
||||
const messages = defineMessages({
|
||||
userlist: 'User List',
|
||||
importfromplex: 'Import Users From Plex',
|
||||
importfromplexerror: 'Something went wrong importing users from Plex',
|
||||
importedfromplex:
|
||||
'{userCount, plural, =0 {No new users} one {# new user} other {# new users}} imported from Plex',
|
||||
username: 'Username',
|
||||
totalrequests: 'Total Requests',
|
||||
usertype: 'User Type',
|
||||
@@ -42,6 +46,7 @@ const UserList: React.FC = () => {
|
||||
const { addToast } = useToasts();
|
||||
const { data, error, revalidate } = useSWR<User[]>('/api/v1/user');
|
||||
const [isDeleting, setDeleting] = useState(false);
|
||||
const [isImporting, setImporting] = useState(false);
|
||||
const [deleteModal, setDeleteModal] = useState<{
|
||||
isOpen: boolean;
|
||||
user?: User;
|
||||
@@ -66,10 +71,38 @@ const UserList: React.FC = () => {
|
||||
appearance: 'error',
|
||||
});
|
||||
} finally {
|
||||
setDeleting(false);
|
||||
revalidate();
|
||||
}
|
||||
};
|
||||
|
||||
const importFromPlex = async () => {
|
||||
setImporting(true);
|
||||
|
||||
try {
|
||||
const { data: createdUsers } = await axios.post(
|
||||
'/api/v1/user/import-from-plex'
|
||||
);
|
||||
addToast(
|
||||
intl.formatMessage(messages.importedfromplex, {
|
||||
userCount: createdUsers.length,
|
||||
}),
|
||||
{
|
||||
autoDismiss: true,
|
||||
appearance: 'success',
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
addToast(intl.formatMessage(messages.importfromplexerror), {
|
||||
autoDismiss: true,
|
||||
appearance: 'error',
|
||||
});
|
||||
} finally {
|
||||
revalidate();
|
||||
setImporting(false);
|
||||
}
|
||||
};
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
}
|
||||
@@ -116,7 +149,17 @@ const UserList: React.FC = () => {
|
||||
{intl.formatMessage(messages.deleteconfirm)}
|
||||
</Modal>
|
||||
</Transition>
|
||||
<Header extraMargin={4}>{intl.formatMessage(messages.userlist)}</Header>
|
||||
<div className="flex items-center justify-between">
|
||||
<Header extraMargin={4}>{intl.formatMessage(messages.userlist)}</Header>
|
||||
<Button
|
||||
className="mx-4 my-8"
|
||||
buttonType="primary"
|
||||
disabled={isImporting}
|
||||
onClick={() => importFromPlex()}
|
||||
>
|
||||
{intl.formatMessage(messages.importfromplex)}
|
||||
</Button>
|
||||
</div>
|
||||
<Table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -134,18 +177,18 @@ const UserList: React.FC = () => {
|
||||
<tr key={`user-list-${user.id}`}>
|
||||
<Table.TD>
|
||||
<div className="flex items-center">
|
||||
<div className="flex-shrink-0 h-10 w-10">
|
||||
<div className="flex-shrink-0 w-10 h-10">
|
||||
<img
|
||||
className="h-10 w-10 rounded-full"
|
||||
className="w-10 h-10 rounded-full"
|
||||
src={user.avatar}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div className="ml-4">
|
||||
<div className="text-sm leading-5 font-medium">
|
||||
<div className="text-sm font-medium leading-5">
|
||||
{user.username}
|
||||
</div>
|
||||
<div className="text-sm leading-5 text-gray-300">
|
||||
<div className="text-sm text-gray-300 leading-5">
|
||||
{user.email}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,8 +7,20 @@ import type { Nullable } from '../utils/typeHelpers';
|
||||
|
||||
type Url = string | UrlObject;
|
||||
|
||||
const extraEncodes: [RegExp, string][] = [
|
||||
[/\(/g, '%28'],
|
||||
[/\)/g, '%29'],
|
||||
[/!/g, '%21'],
|
||||
];
|
||||
|
||||
const encodeURIExtraParams = (string: string): string => {
|
||||
return encodeURIComponent(string).replace(/!/g, '%21');
|
||||
let finalString = encodeURIComponent(string);
|
||||
|
||||
extraEncodes.forEach((encode) => {
|
||||
finalString = finalString.replace(encode[0], encode[1]);
|
||||
});
|
||||
|
||||
return finalString;
|
||||
};
|
||||
|
||||
interface SearchObject {
|
||||
|
||||
@@ -5,6 +5,8 @@ const globalMessages = defineMessages({
|
||||
partiallyavailable: 'Partially Available',
|
||||
processing: 'Processing',
|
||||
unavailable: 'Unavailable',
|
||||
requested: 'Requested',
|
||||
failed: 'Failed',
|
||||
pending: 'Pending',
|
||||
declined: 'Declined',
|
||||
approved: 'Approved',
|
||||
@@ -14,6 +16,7 @@ const globalMessages = defineMessages({
|
||||
approve: 'Approve',
|
||||
decline: 'Decline',
|
||||
delete: 'Delete',
|
||||
retry: 'Retry',
|
||||
deleting: 'Deleting…',
|
||||
close: 'Close',
|
||||
});
|
||||
|
||||
@@ -5,28 +5,28 @@
|
||||
"components.Discover.popularmovies": "Beliebte Filme",
|
||||
"components.Discover.populartv": "Beliebte Serien",
|
||||
"components.Discover.recentlyAdded": "Kürzlich hinzugefügt",
|
||||
"components.Discover.recentrequests": "Aktuelle Anfragen",
|
||||
"components.Discover.recentrequests": "Kürzliche Anfragen",
|
||||
"components.Discover.trending": "Trends",
|
||||
"components.Discover.upcoming": "Bald erscheinende Filme",
|
||||
"components.Discover.upcomingmovies": "Bald erscheinende Filme",
|
||||
"components.Layout.LanguagePicker.changelanguage": "Sprache ändern",
|
||||
"components.Layout.SearchInput.searchPlaceholder": "Nach Filmen und Serien suchen",
|
||||
"components.Layout.Sidebar.dashboard": "Entdecken",
|
||||
"components.Layout.Sidebar.requests": "Anträge",
|
||||
"components.Layout.Sidebar.requests": "Anfragen",
|
||||
"components.Layout.Sidebar.settings": "Einstellungen",
|
||||
"components.Layout.Sidebar.users": "Benutzer",
|
||||
"components.Layout.UserDropdown.signout": "Abmelden",
|
||||
"components.Layout.alphawarning": "Dies ist ALPHA-Software. Fast alles kann kaputt und/oder instabil sein. Bitte melde Probleme auf der GitHub-Seite!",
|
||||
"components.Login.signinplex": "Melden Sie sich an, um fortzufahren",
|
||||
"components.Layout.alphawarning": "Dies ist eine ALPHA-Software. Fast alles kann kaputt und/oder instabil sein. Bitte melde Probleme auf der GitHub-Seite!",
|
||||
"components.Login.signinplex": "Melde dich an, um fortzufahren",
|
||||
"components.MovieDetails.approve": "Genehmigen",
|
||||
"components.MovieDetails.available": "Verfügbar",
|
||||
"components.MovieDetails.budget": "Budget",
|
||||
"components.MovieDetails.cancelrequest": "Anfrage zurücknehmen",
|
||||
"components.MovieDetails.cancelrequest": "Anfrage abbrechen",
|
||||
"components.MovieDetails.cast": "Besetzung",
|
||||
"components.MovieDetails.decline": "Ablehnen",
|
||||
"components.MovieDetails.manageModalClearMedia": "Alle Mediendaten löschen",
|
||||
"components.MovieDetails.manageModalClearMediaWarning": "Dadurch werden alle Mediendaten einschließlich aller Anfragen für dieses Element entfernt. Diese Aktion ist irreversibel. Wenn dieses Element in Ihrer Plex-Bibliothek vorhanden ist, werden die Medieninformationen bei der nächsten Synchronisierung neu erstellt.",
|
||||
"components.MovieDetails.manageModalNoRequests": "Keine Anträge",
|
||||
"components.MovieDetails.manageModalNoRequests": "Keine Anfragen",
|
||||
"components.MovieDetails.manageModalRequests": "Anfragen",
|
||||
"components.MovieDetails.manageModalTitle": "Film verwalten",
|
||||
"components.MovieDetails.originallanguage": "Originalsprache",
|
||||
@@ -36,7 +36,7 @@
|
||||
"components.MovieDetails.recommendations": "Empfehlungen",
|
||||
"components.MovieDetails.recommendationssubtext": "Wenn dir {title} gefallen hat, könnte dir auch gefallen …",
|
||||
"components.MovieDetails.releasedate": "Erscheinungsdatum",
|
||||
"components.MovieDetails.request": "Anfrage",
|
||||
"components.MovieDetails.request": "Anfragen",
|
||||
"components.MovieDetails.revenue": "Einnahmen",
|
||||
"components.MovieDetails.runtime": "{minutes} Minuten",
|
||||
"components.MovieDetails.similar": "Ähnliche Titel",
|
||||
@@ -53,7 +53,7 @@
|
||||
"components.PlexLoginButton.loginwithplex": "Anmeldung mit Plex",
|
||||
"components.RequestBlock.seasons": "Staffeln",
|
||||
"components.RequestCard.all": "Alle",
|
||||
"components.RequestCard.requestedby": "Anfrage von {username}",
|
||||
"components.RequestCard.requestedby": "Angefragt von {username}",
|
||||
"components.RequestCard.seasons": "Staffeln",
|
||||
"components.RequestList.RequestItem.notavailable": "entf.",
|
||||
"components.RequestList.RequestItem.requestedby": "Angefragt von {username}",
|
||||
@@ -64,7 +64,7 @@
|
||||
"components.RequestList.previous": "Vorherige",
|
||||
"components.RequestList.requestedAt": "Angefragt am",
|
||||
"components.RequestList.requests": "Anfragen",
|
||||
"components.RequestList.showingresults": "Anzeigen von <strong>{from}</strong> bis <strong> {to} </strong> von <strong> {total} </strong> Ergebnissen",
|
||||
"components.RequestList.showingresults": "Zeigt <strong>{from}</strong> bis <strong> {to} </strong> von <strong> {total} </strong> Ergebnissen",
|
||||
"components.RequestList.status": "Status",
|
||||
"components.RequestModal.cancel": "Anfrage abbrechen",
|
||||
"components.RequestModal.cancelling": "Abbrechen …",
|
||||
@@ -77,10 +77,10 @@
|
||||
"components.RequestModal.request": "Anfrage",
|
||||
"components.RequestModal.requestCancel": "Anfrage für <strong>{title}</strong> abgebrochen",
|
||||
"components.RequestModal.requestSuccess": "<strong>{title}</strong> angefragt.",
|
||||
"components.RequestModal.requestadmin": "Deine Anfrage wird direkt genehmigt.",
|
||||
"components.RequestModal.requestadmin": "Deine Anfrage wird direkt genehmigt werden.",
|
||||
"components.RequestModal.requestfrom": "Derzeit steht eine Anfrage von {username} aus",
|
||||
"components.RequestModal.requesting": "Wird angefragt…",
|
||||
"components.RequestModal.requestseasons": "{seasonCount} {seasonCount, plural, one {Season} other {Seasons}} anfragen",
|
||||
"components.RequestModal.requesting": "Wird angefragt …",
|
||||
"components.RequestModal.requestseasons": "{seasonCount} {seasonCount, plural, one {Staffel} other {Staffeln}} anfragen",
|
||||
"components.RequestModal.requesttitle": "{title} anfragen",
|
||||
"components.RequestModal.season": "Staffel",
|
||||
"components.RequestModal.seasonnumber": "Staffel {number}",
|
||||
@@ -88,23 +88,23 @@
|
||||
"components.RequestModal.status": "Status",
|
||||
"components.Search.searchresults": "Suchergebnisse",
|
||||
"components.Settings.Notifications.agentenabled": "Agent aktiviert",
|
||||
"components.Settings.Notifications.authPass": "Passwort",
|
||||
"components.Settings.Notifications.authUser": "Benutzername",
|
||||
"components.Settings.Notifications.authPass": "Auth Pass",
|
||||
"components.Settings.Notifications.authUser": "Auth User",
|
||||
"components.Settings.Notifications.emailsender": "E-Mail-Absenderadresse",
|
||||
"components.Settings.Notifications.enableSsl": "SSL aktivieren",
|
||||
"components.Settings.Notifications.save": "Änderungen speichern",
|
||||
"components.Settings.Notifications.saving": "Speichern …",
|
||||
"components.Settings.Notifications.smtpHost": "SMTP-Host",
|
||||
"components.Settings.Notifications.smtpPort": "SMTP-Port",
|
||||
"components.Settings.Notifications.validationFromRequired": "Sie müssen eine E-Mail-Absenderadresse angeben",
|
||||
"components.Settings.Notifications.validationSmtpHostRequired": "Sie müssen einen SMTP-Host bereitstellen",
|
||||
"components.Settings.Notifications.validationSmtpPortRequired": "Sie müssen einen SMTP-Port bereitstellen",
|
||||
"components.Settings.Notifications.validationWebhookUrlRequired": "Sie müssen eine Webhook-URL angeben",
|
||||
"components.Settings.Notifications.validationFromRequired": "Du musst eine E-Mail-Absenderadresse angeben",
|
||||
"components.Settings.Notifications.validationSmtpHostRequired": "Du musst einen SMTP-Host bereitstellen",
|
||||
"components.Settings.Notifications.validationSmtpPortRequired": "Du musst einen SMTP-Port bereitstellen",
|
||||
"components.Settings.Notifications.validationWebhookUrlRequired": "Du musst eine Webhook-URL angeben",
|
||||
"components.Settings.Notifications.webhookUrl": "Webhook-URL",
|
||||
"components.Settings.Notifications.webhookUrlPlaceholder": "Servereinstellungen -> Integrationen -> Webhooks",
|
||||
"components.Settings.RadarrModal.add": "Server hinzufügen",
|
||||
"components.Settings.RadarrModal.apiKey": "API-Schlüssel",
|
||||
"components.Settings.RadarrModal.apiKeyPlaceholder": "Ihr Radarr-API-Schlüssel",
|
||||
"components.Settings.RadarrModal.apiKeyPlaceholder": "Dein Radarr-API-Schlüssel",
|
||||
"components.Settings.RadarrModal.baseUrl": "Basis-URL",
|
||||
"components.Settings.RadarrModal.baseUrlPlaceholder": "Beispiel: /radarr",
|
||||
"components.Settings.RadarrModal.createradarr": "Einen neuen Radarr-Server erstellen",
|
||||
@@ -117,9 +117,9 @@
|
||||
"components.Settings.RadarrModal.rootfolder": "Stammordner",
|
||||
"components.Settings.RadarrModal.save": "Änderungen speichern",
|
||||
"components.Settings.RadarrModal.saving": "Speichern …",
|
||||
"components.Settings.RadarrModal.selectMinimumAvailability": "Wählen Sie die Mindestverfügbarkeit",
|
||||
"components.Settings.RadarrModal.selectQualityProfile": "Wählen Sie ein Qualitätsprofil",
|
||||
"components.Settings.RadarrModal.selectRootFolder": "Wählen Sie einen Stammordner",
|
||||
"components.Settings.RadarrModal.selectMinimumAvailability": "Wähle die Mindestverfügbarkeit",
|
||||
"components.Settings.RadarrModal.selectQualityProfile": "Wähle ein Qualitätsprofil",
|
||||
"components.Settings.RadarrModal.selectRootFolder": "Wähle einen Stammordner",
|
||||
"components.Settings.RadarrModal.server4k": "4K-Server",
|
||||
"components.Settings.RadarrModal.servername": "Servername",
|
||||
"components.Settings.RadarrModal.servernamePlaceholder": "Ein Radarr-Server",
|
||||
@@ -128,14 +128,14 @@
|
||||
"components.Settings.RadarrModal.testing": "Testen …",
|
||||
"components.Settings.RadarrModal.toastRadarrTestFailure": "Verbindung zum Radarr-Server fehlgeschlagen",
|
||||
"components.Settings.RadarrModal.toastRadarrTestSuccess": "Radarr-Verbindung hergestellt!",
|
||||
"components.Settings.RadarrModal.validationApiKeyRequired": "Sie müssen einen API-Schlüssel angeben",
|
||||
"components.Settings.RadarrModal.validationHostnameRequired": "Sie müssen einen Hostnamen/IP angeben",
|
||||
"components.Settings.RadarrModal.validationPortRequired": "Sie müssen einen Port angeben",
|
||||
"components.Settings.RadarrModal.validationProfileRequired": "Sie müssen ein Profil auswählen",
|
||||
"components.Settings.RadarrModal.validationRootFolderRequired": "Sie müssen einen Stammordner auswählen",
|
||||
"components.Settings.RadarrModal.validationApiKeyRequired": "Du musst einen API-Schlüssel angeben",
|
||||
"components.Settings.RadarrModal.validationHostnameRequired": "Du musst einen Hostnamen/IP angeben",
|
||||
"components.Settings.RadarrModal.validationPortRequired": "Du musst einen Port angeben",
|
||||
"components.Settings.RadarrModal.validationProfileRequired": "Du musst ein Profil auswählen",
|
||||
"components.Settings.RadarrModal.validationRootFolderRequired": "Du musst einen Stammordner auswählen",
|
||||
"components.Settings.SonarrModal.add": "Server hinzufügen",
|
||||
"components.Settings.SonarrModal.apiKey": "API-Schlüssel",
|
||||
"components.Settings.SonarrModal.apiKeyPlaceholder": "Ihr Sonarr-API-Schlüssel",
|
||||
"components.Settings.SonarrModal.apiKeyPlaceholder": "Dein Sonarr-API-Schlüssel",
|
||||
"components.Settings.SonarrModal.baseUrl": "Basis-URL",
|
||||
"components.Settings.SonarrModal.baseUrlPlaceholder": "Beispiel: /sonarr",
|
||||
"components.Settings.SonarrModal.createsonarr": "Neuen Sonarr-Server erstellen",
|
||||
@@ -147,22 +147,22 @@
|
||||
"components.Settings.SonarrModal.rootfolder": "Stammordner",
|
||||
"components.Settings.SonarrModal.save": "Änderungen speichern",
|
||||
"components.Settings.SonarrModal.saving": "Speichern …",
|
||||
"components.Settings.SonarrModal.seasonfolders": "Staffelnordner",
|
||||
"components.Settings.SonarrModal.selectQualityProfile": "Wählen Sie ein Qualitätsprofil",
|
||||
"components.Settings.SonarrModal.selectRootFolder": "Wählen Sie einen Stammordner",
|
||||
"components.Settings.SonarrModal.seasonfolders": "Staffel Ordner",
|
||||
"components.Settings.SonarrModal.selectQualityProfile": "Wähle ein Qualitätsprofil",
|
||||
"components.Settings.SonarrModal.selectRootFolder": "Wähle einen Stammordner",
|
||||
"components.Settings.SonarrModal.server4k": "4K-Server",
|
||||
"components.Settings.SonarrModal.servername": "Servername",
|
||||
"components.Settings.SonarrModal.servernamePlaceholder": "Ein Sonarr-Server",
|
||||
"components.Settings.SonarrModal.ssl": "SSL",
|
||||
"components.Settings.SonarrModal.test": "Test",
|
||||
"components.Settings.SonarrModal.testing": "Testen …",
|
||||
"components.Settings.SonarrModal.toastRadarrTestFailure": "Es konnte keine Verbindung zu Sonarr-Server hergestellt werden",
|
||||
"components.Settings.SonarrModal.toastRadarrTestFailure": "Es konnte keine Verbindung zum Sonarr-Server hergestellt werden",
|
||||
"components.Settings.SonarrModal.toastRadarrTestSuccess": "Sonarr-Verbindung hergestellt!",
|
||||
"components.Settings.SonarrModal.validationApiKeyRequired": "Sie müssen einen API-Schlüssel angeben",
|
||||
"components.Settings.SonarrModal.validationHostnameRequired": "Sie müssen einen Hostnamen/IP angeben",
|
||||
"components.Settings.SonarrModal.validationPortRequired": "Sie müssen einen Port angeben",
|
||||
"components.Settings.SonarrModal.validationProfileRequired": "Sie müssen ein Profil auswählen",
|
||||
"components.Settings.SonarrModal.validationRootFolderRequired": "Sie müssen einen Stammordner auswählen",
|
||||
"components.Settings.SonarrModal.validationApiKeyRequired": "Du musst einen API-Schlüssel angeben",
|
||||
"components.Settings.SonarrModal.validationHostnameRequired": "Du musst einen Hostnamen/IP angeben",
|
||||
"components.Settings.SonarrModal.validationPortRequired": "Du musst einen Port angeben",
|
||||
"components.Settings.SonarrModal.validationProfileRequired": "Du musst ein Profil auswählen",
|
||||
"components.Settings.SonarrModal.validationRootFolderRequired": "Du musst einen Stammordner auswählen",
|
||||
"components.Settings.activeProfile": "Aktives Profil",
|
||||
"components.Settings.addradarr": "Radarr-Server hinzufügen",
|
||||
"components.Settings.address": "Adresse",
|
||||
@@ -170,44 +170,44 @@
|
||||
"components.Settings.apikey": "API-Schlüssel",
|
||||
"components.Settings.applicationurl": "Anwendungs-URL",
|
||||
"components.Settings.cancelscan": "Scan abbrechen",
|
||||
"components.Settings.copied": "Kopierter API-Schlüssel in die Zwischenablage",
|
||||
"components.Settings.copied": "API-Schlüssel in die Zwischenablage kopiert",
|
||||
"components.Settings.currentlibrary": "Aktuelle Bibliothek: {name}",
|
||||
"components.Settings.default": "Standardmäßig",
|
||||
"components.Settings.default4k": "Standard-4K",
|
||||
"components.Settings.delete": "Löschen",
|
||||
"components.Settings.deleteserverconfirm": "Sind Sie sicher, dass Sie diesen Server löschen möchten?",
|
||||
"components.Settings.deleteserverconfirm": "Bist du sicher, dass du diesen Server löschen möchtest?",
|
||||
"components.Settings.edit": "Bearbeiten",
|
||||
"components.Settings.generalsettings": "Allgemeine Einstellungen",
|
||||
"components.Settings.generalsettingsDescription": "Dies sind Einstellungen, die sich auf die allgemeine Overseerr-Konfiguration beziehen.",
|
||||
"components.Settings.hostname": "Hostname/IP",
|
||||
"components.Settings.jobname": "Auftragsname",
|
||||
"components.Settings.jobname": "Aufgabenname",
|
||||
"components.Settings.librariesRemaining": "Verbleibende Bibliotheken: {count}",
|
||||
"components.Settings.manualscan": "Manueller Bibliotheksscan",
|
||||
"components.Settings.manualscanDescription": "Normalerweise wird dies nur einmal alle 6 Stunden ausgeführt. Overseerr überprüft die kürzlich hinzugefügten Plex-Server aggressiver. Wenn Sie Plex zum ersten Mal konfigurieren, wird ein einmaliger vollständiger manueller Bibliotheksscan empfohlen!",
|
||||
"components.Settings.manualscanDescription": "Normalerweise wird dies nur einmal alle 24 Stunden ausgeführt. Overseerr überprüft die kürzlich hinzugefügten Plex-Server aggressiver. Wenn Sie Plex zum ersten Mal konfigurieren, wird ein einmaliger vollständiger manueller Bibliotheksscan empfohlen!",
|
||||
"components.Settings.menuAbout": "Über",
|
||||
"components.Settings.menuGeneralSettings": "Allgemeine Einstellungen",
|
||||
"components.Settings.menuJobs": "Anträge",
|
||||
"components.Settings.menuJobs": "Aufgaben",
|
||||
"components.Settings.menuLogs": "Protokolle",
|
||||
"components.Settings.menuNotifications": "Benachrichtigungen",
|
||||
"components.Settings.menuPlexSettings": "Plex",
|
||||
"components.Settings.menuServices": "Dienste",
|
||||
"components.Settings.nextexecution": "Nächste Ausführung",
|
||||
"components.Settings.notificationsettings": "Benachrichtigungseinstellungen",
|
||||
"components.Settings.notificationsettingsDescription": "Hier können Sie auswählen, welche Arten von Benachrichtigungen gesendet werden sollen und über welche Arten von Diensten.",
|
||||
"components.Settings.notificationsettingsDescription": "Hier kannst du auswählen, welche Arten von Benachrichtigungen gesendet werden sollen und über welche Arten von Diensten.",
|
||||
"components.Settings.notrunning": "Nicht aktiv",
|
||||
"components.Settings.plexlibraries": "Plex-Bibliotheken",
|
||||
"components.Settings.plexlibrariesDescription": "Die Bibliotheken-Overseerr sucht nach Titeln. Richten Sie Ihre Plex-Verbindungseinstellungen ein und speichern Sie sie, und klicken Sie auf die Schaltfläche unten, wenn keine aufgeführt sind.",
|
||||
"components.Settings.plexlibrariesDescription": "Die Bibliotheken-Overseerr sucht nach Titeln. Richte deine Plex-Verbindungseinstellungen ein und speichere sie, klicke auf die Schaltfläche unten, wenn keine aufgeführt sind.",
|
||||
"components.Settings.plexsettings": "Plex-Einstellungen",
|
||||
"components.Settings.plexsettingsDescription": "Konfigurieren Sie die Einstellungen für Ihren Plex-Server. Overseerr verwendet Ihren Plex-Server, um Ihre Bibliothek in regelmäßigen Abständen zu scannen und festzustellen, welche Inhalte verfügbar sind.",
|
||||
"components.Settings.plexsettingsDescription": "Konfiguriere die Einstellungen für deinen Plex-Server. Overseerr verwendet den Plex-Server, um deine Bibliothek in regelmäßigen Abständen zu scannen und festzustellen, welche Inhalte verfügbar sind.",
|
||||
"components.Settings.port": "Port",
|
||||
"components.Settings.radarrSettingsDescription": "Richten Sie unten Ihre Radarr-Verbindung ein. Sie können jederzeit mehrere, aber nur zwei standardmäßig aktiv haben (eine für Standard-HD und eine für 4K). Administratoren können überschreiben, welcher Server für neue Anforderungen verwendet wird.",
|
||||
"components.Settings.radarrSettingsDescription": "Richte unten deine Radarr-Verbindung ein. Du kannst mehrere, aber nur zwei standardmäßig, aktiv haben (eine für Standard-HD und eine für 4K). Administratoren können überschreiben, welcher Server für neue Anfragen verwendet wird.",
|
||||
"components.Settings.radarrsettings": "Radarr-Einstellungen",
|
||||
"components.Settings.runnow": "Jetzt ausführen",
|
||||
"components.Settings.save": "Änderungen speichern",
|
||||
"components.Settings.saving": "Speichern …",
|
||||
"components.Settings.servername": "Servername (Wird nach dem Speichern automatisch festgelegt)",
|
||||
"components.Settings.servernamePlaceholder": "Plex-Servername",
|
||||
"components.Settings.sonarrSettingsDescription": "Richten Sie unten Ihre Sonarr-Verbindung ein. Sie können jederzeit mehrere, aber nur zwei standardmäßig aktiv haben (eine für Standard-HD und eine für 4K). Administratoren können überschreiben, welcher Server für neue Anforderungen verwendet wird.",
|
||||
"components.Settings.sonarrSettingsDescription": "Richte unten deine Sonarr-Verbindung ein. Du kannst mehrere, aber nur zwei standardmäßig, aktiv haben (eine für Standard-HD und eine für 4K). Administratoren können überschreiben, welcher Server für neue Anfragen verwendet wird.",
|
||||
"components.Settings.sonarrsettings": "Sonarr-Einstellungen",
|
||||
"components.Settings.ssl": "SSL",
|
||||
"components.Settings.startscan": "Scan starten",
|
||||
@@ -219,69 +219,69 @@
|
||||
"components.Setup.finish": "Konfiguration beenden",
|
||||
"components.Setup.finishing": "Fertigstellung …",
|
||||
"components.Setup.loginwithplex": "Anmeldung mit Plex",
|
||||
"components.Setup.signinMessage": "Melden Sie sich zunächst mit Ihrem Plex-Konto an",
|
||||
"components.Setup.signinMessage": "Melde dich zunächst mit deinem Plex-Konto an",
|
||||
"components.Setup.welcome": "Willkommen bei Overseerr",
|
||||
"components.Slider.noresults": "Keine Ergebnisse",
|
||||
"components.TitleCard.movie": "Film",
|
||||
"components.TitleCard.tvshow": "Serie",
|
||||
"components.TvDetails.approve": "Genehmigen",
|
||||
"components.TvDetails.approverequests": "{requestCount} {requestCount, plural, one {Request} other {Requests}} genehmigen",
|
||||
"components.TvDetails.approverequests": "{requestCount} {requestCount, plural, one {Anfrage} other {Anfragen}} genehmigen",
|
||||
"components.TvDetails.available": "Verfügbar",
|
||||
"components.TvDetails.cancelrequest": "Antrag abbrechen",
|
||||
"components.TvDetails.cancelrequest": "Anfrage abbrechen",
|
||||
"components.TvDetails.cast": "Besetzung",
|
||||
"components.TvDetails.decline": "Ablehnen",
|
||||
"components.TvDetails.declinerequests": "{requestCount} {requestCount, plural, one {Request} andere {Requests}} ablehnen",
|
||||
"components.TvDetails.declinerequests": "{requestCount} {requestCount, plural, one {Anfrage} andere {Anfragen}} ablehnen",
|
||||
"components.TvDetails.manageModalClearMedia": "Alle Mediendaten löschen",
|
||||
"components.TvDetails.manageModalClearMediaWarning": "Dadurch werden alle Mediendaten einschließlich aller Anträge für dieses Element irreversibel entfernt. Wenn dieses Element in Ihrer Plex-Bibliothek vorhanden ist, werden die Medieninformationen bei der nächsten Synchronisierung neu erstellt.",
|
||||
"components.TvDetails.manageModalNoRequests": "Keine Anträge",
|
||||
"components.TvDetails.manageModalRequests": "Anträge",
|
||||
"components.TvDetails.manageModalTitle": "Serien verwalten",
|
||||
"components.TvDetails.manageModalClearMediaWarning": "Dadurch werden alle Mediendaten einschließlich aller Anfragen für dieses Element irreversibel entfernt. Wenn dieses Element in deiner Plex-Bibliothek vorhanden ist, werden die Medieninformationen bei der nächsten Synchronisierung neu erstellt.",
|
||||
"components.TvDetails.manageModalNoRequests": "Keine Anfragen",
|
||||
"components.TvDetails.manageModalRequests": "Anfragen",
|
||||
"components.TvDetails.manageModalTitle": "Serie verwalten",
|
||||
"components.TvDetails.originallanguage": "Originalsprache",
|
||||
"components.TvDetails.overview": "Übersicht",
|
||||
"components.TvDetails.overviewunavailable": "Übersicht nicht verfügbar",
|
||||
"components.TvDetails.pending": "Ausstehend",
|
||||
"components.TvDetails.recommendations": "Empfehlungen",
|
||||
"components.TvDetails.recommendationssubtext": "Wenn Ihnen {title} gefallen hat, könnte Ihnen auch gefallen …",
|
||||
"components.TvDetails.request": "Antrag",
|
||||
"components.TvDetails.requestmore": "Mehr anfordern",
|
||||
"components.TvDetails.recommendationssubtext": "Wenn dir {title} gefallen hat, könnte dir auch gefallen …",
|
||||
"components.TvDetails.request": "Anfragen",
|
||||
"components.TvDetails.requestmore": "Mehr anfragen",
|
||||
"components.TvDetails.similar": "Ähnliche Serien",
|
||||
"components.TvDetails.similarsubtext": "Andere Serien {title} ähnlich",
|
||||
"components.TvDetails.similarsubtext": "Andere Serien, die {title} ähneln",
|
||||
"components.TvDetails.status": "Status",
|
||||
"components.TvDetails.unavailable": "Nicht verfügbar",
|
||||
"components.TvDetails.userrating": "Benutzerbewertung",
|
||||
"components.UserEdit.admin": "Administrator/in",
|
||||
"components.UserEdit.admin": "Administrator",
|
||||
"components.UserEdit.adminDescription": "Voller Administratorzugriff. Umgeht alle Berechtigungsprüfungen.",
|
||||
"components.UserEdit.autoapprove": "Automatische Genehmigung",
|
||||
"components.UserEdit.autoapproveDescription": "Gewährt die automatische Genehmigung für alle Anträge dieses Benutzers.",
|
||||
"components.UserEdit.autoapproveDescription": "Gewährt die automatische Genehmigung für alle Anfragen dieses Benutzers.",
|
||||
"components.UserEdit.avatar": "Avatar",
|
||||
"components.UserEdit.edituser": "Benutzer/in bearbeiten",
|
||||
"components.UserEdit.edituser": "Benutzer bearbeiten",
|
||||
"components.UserEdit.email": "E-Mail",
|
||||
"components.UserEdit.managerequests": "Anträge verwalten",
|
||||
"components.UserEdit.managerequestsDescription": "Erteilt die Berechtigung zum Verwalten von Overseerr-Anträgen. Dies umfasst das Genehmigen und Ablehnen von Anträgen.",
|
||||
"components.UserEdit.managerequests": "Anfragen verwalten",
|
||||
"components.UserEdit.managerequestsDescription": "Erteilt die Berechtigung zum Verwalten von Overseerr-Anfragen. Dies umfasst das Genehmigen und Ablehnen von Anfragen.",
|
||||
"components.UserEdit.permissions": "Berechtigungen",
|
||||
"components.UserEdit.request": "Antrag",
|
||||
"components.UserEdit.requestDescription": "Erteilt die Berechtigung zum Anfordern von Filmen und Serien.",
|
||||
"components.UserEdit.request": "Anfragen",
|
||||
"components.UserEdit.requestDescription": "Erteilt die Berechtigung zum Anfragen von Filmen und Serien.",
|
||||
"components.UserEdit.save": "Speichern",
|
||||
"components.UserEdit.saving": "Speichern …",
|
||||
"components.UserEdit.settings": "Einstellungen verwalten",
|
||||
"components.UserEdit.settingsDescription": "Erteilt die Berechtigung zum Ändern aller Overseerr-Einstellungen. Ein/e Benutzer/in muss über diese Berechtigung verfügen, um sie anderen Personen erteilen zu können.",
|
||||
"components.UserEdit.userfail": "Beim Speichern des Benutzers ist ein Fehler aufgetreten.",
|
||||
"components.UserEdit.settingsDescription": "Erteilt die Berechtigung zum Ändern aller Overseerr-Einstellungen. Ein Benutzer muss über diese Berechtigung verfügen, um sie anderen Benutzern erteilen zu können.",
|
||||
"components.UserEdit.userfail": "Beim Speichern des Benutzers ist etwas schief gelaufen.",
|
||||
"components.UserEdit.username": "Benutzername",
|
||||
"components.UserEdit.users": "Benutzer verwalten",
|
||||
"components.UserEdit.usersDescription": "Erteilt die Berechtigung zum Verwalten von Overseerr-Benutzern. Benutzer/innen mit dieser Berechtigung können Benutzer/innen mit Administratorrechten nicht ändern oder gewähren.",
|
||||
"components.UserEdit.usersaved": "Benutzer/in gespeichert",
|
||||
"components.UserEdit.usersDescription": "Erteilt die Berechtigung zum Verwalten von Overseerr-Benutzern. Benutzer mit dieser Berechtigung können Benutzer mit Administratorrechten nicht bearbeiten oder es gewähren.",
|
||||
"components.UserEdit.usersaved": "Benutzer gespeichert",
|
||||
"components.UserEdit.vote": "Abstimmen",
|
||||
"components.UserEdit.voteDescription": "Erteilt die Erlaubnis, über Anträge abzustimmen (Abstimmung noch nicht durchgeführt)",
|
||||
"components.UserEdit.voteDescription": "Erteilt die Erlaubnis, über Anfragen abzustimmen (Abstimmungen noch nicht implementiert)",
|
||||
"components.UserList.admin": "Admin",
|
||||
"components.UserList.created": "Erstellt",
|
||||
"components.UserList.delete": "Löschen",
|
||||
"components.UserList.edit": "Bearbeiten",
|
||||
"components.UserList.lastupdated": "Zuletzt aktualisiert",
|
||||
"components.UserList.plexuser": "Plex-Benutzer/in",
|
||||
"components.UserList.plexuser": "Plex-Benutzer",
|
||||
"components.UserList.role": "Rolle",
|
||||
"components.UserList.totalrequests": "Anträge insgesamt",
|
||||
"components.UserList.user": "Benutzer/in",
|
||||
"components.UserList.userlist": "Benutzer/innen-Liste",
|
||||
"components.UserList.totalrequests": "Anfragen insgesamt",
|
||||
"components.UserList.user": "Benutzer",
|
||||
"components.UserList.userlist": "Benutzer-Liste",
|
||||
"components.UserList.username": "Benutzername",
|
||||
"components.UserList.usertype": "Benutzertyp",
|
||||
"i18n.approve": "Genehmigen",
|
||||
@@ -291,10 +291,10 @@
|
||||
"i18n.decline": "Ablehnen",
|
||||
"i18n.declined": "Abgelehnt",
|
||||
"i18n.delete": "Löschen",
|
||||
"i18n.movies": "Films",
|
||||
"i18n.movies": "Filme",
|
||||
"i18n.partiallyavailable": "Teilweise verfügbar",
|
||||
"i18n.pending": "Ausstehend",
|
||||
"i18n.processing": "Verarbeitung …",
|
||||
"i18n.processing": "Verarbeiten …",
|
||||
"i18n.tvshows": "Serien",
|
||||
"i18n.unavailable": "Nicht verfügbar",
|
||||
"pages.internalServerError": "{statusCode} – Interner Serverfehler",
|
||||
@@ -302,51 +302,94 @@
|
||||
"pages.pageNotFound": "404 – Seite nicht gefunden",
|
||||
"pages.returnHome": "Zur Startseite",
|
||||
"pages.serviceUnavailable": "{statusCode} – Dienst nicht verfügbar",
|
||||
"pages.somethingWentWrong": "{statusCode} – Es ist ein Fehler aufgetreten",
|
||||
"components.TvDetails.TvCast.fullseriescast": "Vollserienbesetzung",
|
||||
"components.MovieDetails.MovieCast.fullcast": "Vollständige Besetzung",
|
||||
"pages.somethingWentWrong": "{statusCode} – Es ist etwas schief gelaufen",
|
||||
"components.TvDetails.TvCast.fullseriescast": "Komplette Serien Besetzung",
|
||||
"components.MovieDetails.MovieCast.fullcast": "Komplette Besetzung",
|
||||
"components.Settings.Notifications.emailsettingssaved": "E-Mail-Benachrichtigungseinstellungen gespeichert!",
|
||||
"components.Settings.Notifications.emailsettingsfailed": "Fehler beim Speichern der E-Mail-Benachrichtigungseinstellungen.",
|
||||
"components.Settings.Notifications.discordsettingssaved": "Discord-Benachrichtigungseinstellungen gespeichert!",
|
||||
"components.Settings.Notifications.discordsettingsfailed": "Fehler beim Speichern der Discord-Benachrichtigungseinstellungen.",
|
||||
"components.Settings.validationPortRequired": "Sie müssen einen Port angeben",
|
||||
"components.Settings.validationHostnameRequired": "Sie müssen einen Hostnamen/IP angeben",
|
||||
"components.Settings.SonarrModal.validationNameRequired": "Sie müssen einen Servernamen angeben",
|
||||
"components.Settings.validationPortRequired": "Du musst einen Port angeben",
|
||||
"components.Settings.validationHostnameRequired": "Du musst einen Hostnamen/IP angeben",
|
||||
"components.Settings.SonarrModal.validationNameRequired": "Du musst einen Servernamen angeben",
|
||||
"components.Settings.SettingsAbout.version": "Version",
|
||||
"components.Settings.SettingsAbout.totalrequests": "Anträge insgesamt",
|
||||
"components.Settings.SettingsAbout.totalrequests": "Anfragen insgesamt",
|
||||
"components.Settings.SettingsAbout.totalmedia": "Medien insgesamt",
|
||||
"components.Settings.SettingsAbout.overseerrinformation": "Overseerr-Informationen",
|
||||
"components.Settings.SettingsAbout.githubdiscussions": "GitHub-Diskussionen",
|
||||
"components.Settings.SettingsAbout.gettingsupport": "Hilfe erhalten",
|
||||
"components.Settings.SettingsAbout.clickheretojoindiscord": "Klicken Sie hier, um unserem Discord-Server beizutreten.",
|
||||
"components.Settings.RadarrModal.validationNameRequired": "Sie müssen einen Servernamen angeben",
|
||||
"components.Settings.SettingsAbout.clickheretojoindiscord": "Klicke hier, um unserem Discord-Server beizutreten.",
|
||||
"components.Settings.RadarrModal.validationNameRequired": "Du musst einen Servernamen angeben",
|
||||
"components.Setup.tip": "Tipp",
|
||||
"components.Setup.syncingbackground": "Die Synchronisierung wird im Hintergrund ausgeführt. Sie können die Konfiguration in der Zwischenzeit fortsetzen.",
|
||||
"components.Setup.syncingbackground": "Die Synchronisierung wird im Hintergrund ausgeführt. Du kannst die Konfiguration in der Zwischenzeit fortsetzen.",
|
||||
"i18n.deleting": "Löschen …",
|
||||
"components.UserList.userdeleteerror": "Beim Löschen des Benutzers ist ein Fehler aufgetreten",
|
||||
"components.UserList.userdeleteerror": "Beim Löschen des Benutzers ist etwas schief gelaufen",
|
||||
"components.UserList.userdeleted": "Benutzer gelöscht",
|
||||
"components.UserList.deleteuser": "Benutzer löschen",
|
||||
"components.UserList.deleteconfirm": "Wollen Sie diesen Benutzer wirklich löschen? Alle vorhandenen Anforderungsdaten dieses Benutzers werden entfernt.",
|
||||
"components.Settings.nodefaultdescription": "Mindestens ein Server muss als Standard markiert sein, bevor Anforderungen an Ihre Dienste weitergeleitet werden.",
|
||||
"components.UserList.deleteconfirm": "Willst du diesen Benutzer wirklich löschen? Alle vorhandenen Anfragendaten dieses Benutzers werden entfernt.",
|
||||
"components.Settings.nodefaultdescription": "Mindestens ein Server muss als Standard markiert sein, bevor Anfragen an deine Dienste weitergeleitet werden.",
|
||||
"components.Settings.nodefault": "Kein Standardserver ausgewählt!",
|
||||
"components.Settings.no4kimplemented": "(Standard-4K-Server sind derzeit nicht implementiert.)",
|
||||
"components.Settings.SonarrModal.testFirstRootFolders": "Testen Sie Ihre Verbindung, um Stammordner zu laden",
|
||||
"components.Settings.SonarrModal.testFirstQualityProfiles": "Testen Sie Ihre Verbindung, um Qualitätsprofile zu laden",
|
||||
"components.Settings.SonarrModal.loadingrootfolders": "Laden von Stammordnern…",
|
||||
"components.Settings.SonarrModal.loadingprofiles": "Qualitätsprofile werden geladen…",
|
||||
"components.Settings.RadarrModal.validationMinimumAvailabilityRequired": "Sie müssen die Mindestverfügbarkeit auswählen",
|
||||
"components.Settings.RadarrModal.testFirstRootFolders": "Testen Sie Ihre Verbindung, um Stammordner zu laden",
|
||||
"components.Settings.RadarrModal.testFirstQualityProfiles": "Testen Sie Ihre Verbindung zu Lastqualitätsprofilen",
|
||||
"components.Settings.RadarrModal.loadingrootfolders": "Laden von Stammordnern…",
|
||||
"components.Settings.RadarrModal.loadingprofiles": "Qualitätsprofile werden geladen…",
|
||||
"components.Settings.SonarrModal.testFirstRootFolders": "Teste die Verbindung, um Stammordner zu laden",
|
||||
"components.Settings.SonarrModal.testFirstQualityProfiles": "Teste die Verbindung, um Qualitätsprofile zu laden",
|
||||
"components.Settings.SonarrModal.loadingrootfolders": "Stammordner werden geladen …",
|
||||
"components.Settings.SonarrModal.loadingprofiles": "Qualitätsprofile werden geladen …",
|
||||
"components.Settings.RadarrModal.validationMinimumAvailabilityRequired": "Du musst die Mindestverfügbarkeit auswählen",
|
||||
"components.Settings.RadarrModal.testFirstRootFolders": "Teste die Verbindung, um Stammordner zu laden",
|
||||
"components.Settings.RadarrModal.testFirstQualityProfiles": "Teste die Verbindung, um Qualitätsprofile zu laden",
|
||||
"components.Settings.RadarrModal.loadingrootfolders": "Stammordner werden geladen …",
|
||||
"components.Settings.RadarrModal.loadingprofiles": "Qualitätsprofile werden geladen …",
|
||||
"components.TvDetails.anime": "Anime",
|
||||
"components.Settings.toastApiKeySuccess": "Neuer API-Schlüssel generiert!",
|
||||
"components.TvDetails.showtype": "Serientyp",
|
||||
"components.TvDetails.network": "Netzwerk",
|
||||
"components.Settings.toastSettingsSuccess": "Einstellungen gespeichert.",
|
||||
"components.Settings.toastSettingsFailure": "Beim Speichern der Einstellungen ging etwas schief.",
|
||||
"components.Settings.toastApiKeyFailure": "Bei der Generierung eines neuen API-Schlüssels kam es zu einem Fehler.",
|
||||
"components.Settings.toastSettingsFailure": "Beim Speichern der Einstellungen ist etwas schief gelaufen.",
|
||||
"components.Settings.toastApiKeyFailure": "Bei der Generierung eines neuen API-Schlüssels ist etwas schief gelaufen.",
|
||||
"components.Settings.SonarrModal.animerootfolder": "Animestammverzeichnis",
|
||||
"components.Settings.SonarrModal.animequalityprofile": "Animequalitätsprofil",
|
||||
"components.MovieDetails.studio": "Studio"
|
||||
"components.MovieDetails.studio": "Studio",
|
||||
"i18n.close": "Schließen",
|
||||
"components.Settings.SettingsAbout.timezone": "Zeitzone",
|
||||
"components.Settings.SettingsAbout.supportoverseerr": "Unterstütze Overseerr",
|
||||
"components.Settings.SettingsAbout.helppaycoffee": "Hilf uns Kaffee zu bezahlen",
|
||||
"components.Settings.SettingsAbout.Releases.viewongithub": "Auf GitHub anzeigen",
|
||||
"components.Settings.SettingsAbout.Releases.viewchangelog": "Änderungsprotokoll anzeigen",
|
||||
"components.Settings.SettingsAbout.Releases.versionChangelog": "Änderungsprotokoll",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelopMessage": "Die Änderungen in deiner Version sind unten nicht verfügbar. Die neuesten Aktualisierungen findest du im <GithubLink>GitHub-Repository</GithubLink>.",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelop": "Du führst eine Entwicklungsversion von Overseerr aus!",
|
||||
"components.Settings.SettingsAbout.Releases.releases": "Veröffentlichungen",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "Informationen der Version nicht verfügbar. Ist GitHub offline?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "Neuste Version",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "Aktuelle Version",
|
||||
"components.Settings.Notifications.testsent": "Testbenachrichtigung gesendet!",
|
||||
"components.Settings.Notifications.test": "Test",
|
||||
"components.Settings.defaultPermissions": "Standardbenutzerberechtigungen",
|
||||
"components.UserList.importfromplexerror": "Beim Importieren von Benutzern aus Plex ist etwas schief gelaufen",
|
||||
"components.UserList.importfromplex": "Benutzer aus Plex importieren",
|
||||
"components.TvDetails.viewfullcrew": "Komplettes Team anzeigen",
|
||||
"components.TvDetails.TvCrew.fullseriescrew": "Komplettes Serien Team",
|
||||
"components.PersonDetails.crewmember": "Teammitglied",
|
||||
"components.MovieDetails.viewfullcrew": "Komplettes Team anzeigen",
|
||||
"components.MovieDetails.MovieCrew.fullcrew": "Komplettes Team",
|
||||
"components.UserList.importedfromplex": "{userCount, plural, =0 {Keine neuen Benutzer} one {# neuer Benutzer} other {# neue Benutzer}} aus Plex importiert",
|
||||
"components.TvDetails.firstAirDate": "Erstausstrahlung",
|
||||
"components.Settings.Notifications.ssldisabletip": "SSL sollte bei Standard-TLS-Verbindungen deaktiviert werden (Port 587)",
|
||||
"components.Settings.Notifications.allowselfsigned": "Selbstsignierte Zertifikate zulassen",
|
||||
"components.TvDetails.watchtrailer": "Trailer ansehen",
|
||||
"components.MovieDetails.watchtrailer": "Trailer ansehen",
|
||||
"components.MovieDetails.view": "Ansehen",
|
||||
"components.CollectionDetails.requestswillbecreated": "Für die folgenden Titel werden Anfragen erstellt:",
|
||||
"components.CollectionDetails.requesting": "Anfragen …",
|
||||
"components.CollectionDetails.requestcollection": "Sammlung anfragen",
|
||||
"components.CollectionDetails.requestSuccess": "<strong>{title}</strong> erfolgreich angefragt!",
|
||||
"components.CollectionDetails.request": "Anfragen",
|
||||
"components.CollectionDetails.overviewunavailable": "Übersicht nicht verfügbar",
|
||||
"components.CollectionDetails.overview": "Übersicht",
|
||||
"components.CollectionDetails.numberofmovies": "Anzahl der Filme: {count}",
|
||||
"components.CollectionDetails.movies": "Filme",
|
||||
"i18n.requested": "Angefragt",
|
||||
"i18n.retry": "Wiederholen",
|
||||
"i18n.failed": "Fehlgeschlagen",
|
||||
"components.RequestList.RequestItem.failedretry": "Beim Wiederholen der Anfrage ist etwas schief gelaufen"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"components.CollectionDetails.movies": "Movies",
|
||||
"components.CollectionDetails.numberofmovies": "Number of Movies: {count}",
|
||||
"components.CollectionDetails.overview": "Overview",
|
||||
"components.CollectionDetails.overviewunavailable": "Overview unavailable",
|
||||
"components.CollectionDetails.request": "Request",
|
||||
"components.CollectionDetails.requestSuccess": "<strong>{title}</strong> successfully requested!",
|
||||
"components.CollectionDetails.requestcollection": "Request Collection",
|
||||
"components.CollectionDetails.requesting": "Requesting…",
|
||||
"components.CollectionDetails.requestswillbecreated": "The following titles will have requests created for them:",
|
||||
"components.Discover.discovermovies": "Popular Movies",
|
||||
"components.Discover.discovertv": "Popular Series",
|
||||
"components.Discover.nopending": "No Pending Requests",
|
||||
@@ -19,6 +28,7 @@
|
||||
"components.Layout.alphawarning": "This is ALPHA software. Almost everything is bound to be nearly broken and/or unstable. Please report issues to the Overseerr GitHub!",
|
||||
"components.Login.signinplex": "Sign in to continue",
|
||||
"components.MovieDetails.MovieCast.fullcast": "Full Cast",
|
||||
"components.MovieDetails.MovieCrew.fullcrew": "Full Crew",
|
||||
"components.MovieDetails.approve": "Approve",
|
||||
"components.MovieDetails.available": "Available",
|
||||
"components.MovieDetails.budget": "Budget",
|
||||
@@ -46,9 +56,13 @@
|
||||
"components.MovieDetails.studio": "Studio",
|
||||
"components.MovieDetails.unavailable": "Unavailable",
|
||||
"components.MovieDetails.userrating": "User Rating",
|
||||
"components.MovieDetails.view": "View",
|
||||
"components.MovieDetails.viewfullcrew": "View Full Crew",
|
||||
"components.MovieDetails.viewrequest": "View Request",
|
||||
"components.MovieDetails.watchtrailer": "Watch Trailer",
|
||||
"components.PersonDetails.appearsin": "Appears in",
|
||||
"components.PersonDetails.ascharacter": "as {character}",
|
||||
"components.PersonDetails.crewmember": "Crew Member",
|
||||
"components.PersonDetails.nobiography": "No biography available.",
|
||||
"components.PlexLoginButton.loading": "Loading…",
|
||||
"components.PlexLoginButton.loggingin": "Logging in…",
|
||||
@@ -57,6 +71,7 @@
|
||||
"components.RequestCard.all": "All",
|
||||
"components.RequestCard.requestedby": "Requested by {username}",
|
||||
"components.RequestCard.seasons": "Seasons",
|
||||
"components.RequestList.RequestItem.failedretry": "Something went wrong retrying the request",
|
||||
"components.RequestList.RequestItem.notavailable": "N/A",
|
||||
"components.RequestList.RequestItem.requestedby": "Requested by {username}",
|
||||
"components.RequestList.RequestItem.seasons": "Seasons",
|
||||
@@ -89,7 +104,20 @@
|
||||
"components.RequestModal.selectseason": "Select season(s)",
|
||||
"components.RequestModal.status": "Status",
|
||||
"components.Search.searchresults": "Search Results",
|
||||
"components.Settings.Notifications.NotificationsSlack.agentenabled": "Agent Enabled",
|
||||
"components.Settings.Notifications.NotificationsSlack.save": "Save Changes",
|
||||
"components.Settings.Notifications.NotificationsSlack.saving": "Saving...",
|
||||
"components.Settings.Notifications.NotificationsSlack.settingupslack": "Setting up Slack Notifications",
|
||||
"components.Settings.Notifications.NotificationsSlack.settingupslackDescription": "To use Slack notifications, you will need to create an <WebhookLink>Incoming Webhook</WebhookLink> integration and use the provided webhook URL below.",
|
||||
"components.Settings.Notifications.NotificationsSlack.slacksettingsfailed": "Slack notification settings failed to save.",
|
||||
"components.Settings.Notifications.NotificationsSlack.slacksettingssaved": "Slack notification settings saved!",
|
||||
"components.Settings.Notifications.NotificationsSlack.test": "Test",
|
||||
"components.Settings.Notifications.NotificationsSlack.testsent": "Test notification sent!",
|
||||
"components.Settings.Notifications.NotificationsSlack.validationWebhookUrlRequired": "You must provide a webhook URL",
|
||||
"components.Settings.Notifications.NotificationsSlack.webhookUrl": "Webhook URL",
|
||||
"components.Settings.Notifications.NotificationsSlack.webhookUrlPlaceholder": "Webhook URL",
|
||||
"components.Settings.Notifications.agentenabled": "Agent Enabled",
|
||||
"components.Settings.Notifications.allowselfsigned": "Allow Self-Signed Certificates",
|
||||
"components.Settings.Notifications.authPass": "Auth Pass",
|
||||
"components.Settings.Notifications.authUser": "Auth User",
|
||||
"components.Settings.Notifications.discordsettingsfailed": "Discord notification settings failed to save.",
|
||||
@@ -102,6 +130,9 @@
|
||||
"components.Settings.Notifications.saving": "Saving…",
|
||||
"components.Settings.Notifications.smtpHost": "SMTP Host",
|
||||
"components.Settings.Notifications.smtpPort": "SMTP Port",
|
||||
"components.Settings.Notifications.ssldisabletip": "SSL should be disabled on standard TLS connections (Port 587)",
|
||||
"components.Settings.Notifications.test": "Test",
|
||||
"components.Settings.Notifications.testsent": "Test notification sent!",
|
||||
"components.Settings.Notifications.validationFromRequired": "You must provide an email sender address",
|
||||
"components.Settings.Notifications.validationSmtpHostRequired": "You must provide an SMTP host",
|
||||
"components.Settings.Notifications.validationSmtpPortRequired": "You must provide an SMTP port",
|
||||
@@ -212,6 +243,7 @@
|
||||
"components.Settings.currentlibrary": "Current Library: {name}",
|
||||
"components.Settings.default": "Default",
|
||||
"components.Settings.default4k": "Default 4K",
|
||||
"components.Settings.defaultPermissions": "Default User Permissions",
|
||||
"components.Settings.delete": "Delete",
|
||||
"components.Settings.deleteserverconfirm": "Are you sure you want to delete this server?",
|
||||
"components.Settings.edit": "Edit",
|
||||
@@ -221,7 +253,7 @@
|
||||
"components.Settings.jobname": "Job Name",
|
||||
"components.Settings.librariesRemaining": "Libraries Remaining: {count}",
|
||||
"components.Settings.manualscan": "Manual Library Scan",
|
||||
"components.Settings.manualscanDescription": "Normally, this will only be run once every 6 hours. Overseerr will check your Plex server's recently added more aggressively. If this is your first time configuring Plex, a one time full manual library scan is recommended!",
|
||||
"components.Settings.manualscanDescription": "Normally, this will only be run once every 24 hours. Overseerr will check your Plex server's recently added more aggressively. If this is your first time configuring Plex, a one time full manual library scan is recommended!",
|
||||
"components.Settings.menuAbout": "About",
|
||||
"components.Settings.menuGeneralSettings": "General Settings",
|
||||
"components.Settings.menuJobs": "Jobs",
|
||||
@@ -274,6 +306,7 @@
|
||||
"components.TitleCard.movie": "Movie",
|
||||
"components.TitleCard.tvshow": "Series",
|
||||
"components.TvDetails.TvCast.fullseriescast": "Full Series Cast",
|
||||
"components.TvDetails.TvCrew.fullseriescrew": "Full Series Crew",
|
||||
"components.TvDetails.anime": "Anime",
|
||||
"components.TvDetails.approve": "Approve",
|
||||
"components.TvDetails.approverequests": "Approve {requestCount} {requestCount, plural, one {Request} other {Requests}}",
|
||||
@@ -282,6 +315,7 @@
|
||||
"components.TvDetails.cast": "Cast",
|
||||
"components.TvDetails.decline": "Decline",
|
||||
"components.TvDetails.declinerequests": "Decline {requestCount} {requestCount, plural, one {Request} other {Requests}}",
|
||||
"components.TvDetails.firstAirDate": "First Air Date",
|
||||
"components.TvDetails.manageModalClearMedia": "Clear All Media Data",
|
||||
"components.TvDetails.manageModalClearMediaWarning": "This will remove all media data including all requests for this item, irreversibly. If this item exists in your Plex library, the media info will be recreated next sync.",
|
||||
"components.TvDetails.manageModalNoRequests": "No Requests",
|
||||
@@ -302,10 +336,16 @@
|
||||
"components.TvDetails.status": "Status",
|
||||
"components.TvDetails.unavailable": "Unavailable",
|
||||
"components.TvDetails.userrating": "User Rating",
|
||||
"components.TvDetails.viewfullcrew": "View Full Crew",
|
||||
"components.TvDetails.watchtrailer": "Watch Trailer",
|
||||
"components.UserEdit.admin": "Admin",
|
||||
"components.UserEdit.adminDescription": "Full administrator access. Bypasses all permission checks.",
|
||||
"components.UserEdit.autoapprove": "Auto Approve",
|
||||
"components.UserEdit.autoapproveDescription": "Grants auto approval for any requests made by this user.",
|
||||
"components.UserEdit.autoapproveMovies": "Auto Approve Movies",
|
||||
"components.UserEdit.autoapproveMoviesDescription": "Grants auto approve for movie requests made by this user.",
|
||||
"components.UserEdit.autoapproveSeries": "Auto Approve Series",
|
||||
"components.UserEdit.autoapproveSeriesDescription": "Grants auto approve for series requests made by this user.",
|
||||
"components.UserEdit.avatar": "Avatar",
|
||||
"components.UserEdit.edituser": "Edit User",
|
||||
"components.UserEdit.email": "Email",
|
||||
@@ -331,6 +371,9 @@
|
||||
"components.UserList.deleteconfirm": "Are you sure you want to delete this user? All existing request data from this user will be removed.",
|
||||
"components.UserList.deleteuser": "Delete User",
|
||||
"components.UserList.edit": "Edit",
|
||||
"components.UserList.importedfromplex": "{userCount, plural, =0 {No new users} one {# new user} other {# new users}} imported from Plex",
|
||||
"components.UserList.importfromplex": "Import Users From Plex",
|
||||
"components.UserList.importfromplexerror": "Something went wrong importing users from Plex",
|
||||
"components.UserList.lastupdated": "Last Updated",
|
||||
"components.UserList.plexuser": "Plex User",
|
||||
"components.UserList.role": "Role",
|
||||
@@ -350,10 +393,13 @@
|
||||
"i18n.declined": "Declined",
|
||||
"i18n.delete": "Delete",
|
||||
"i18n.deleting": "Deleting…",
|
||||
"i18n.failed": "Failed",
|
||||
"i18n.movies": "Movies",
|
||||
"i18n.partiallyavailable": "Partially Available",
|
||||
"i18n.pending": "Pending",
|
||||
"i18n.processing": "Processing…",
|
||||
"i18n.requested": "Requested",
|
||||
"i18n.retry": "Retry",
|
||||
"i18n.tvshows": "Series",
|
||||
"i18n.unavailable": "Unavailable",
|
||||
"pages.internalServerError": "{statusCode} - Internal Server Error",
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
"components.Settings.menuJobs": "Tareas",
|
||||
"components.Settings.menuGeneralSettings": "Ajustes Generales",
|
||||
"components.Settings.menuAbout": "Acerca de",
|
||||
"components.Settings.manualscanDescription": "Normalmente, esto sólo se ejecutará una vez cada 6 horas. Overseerr comprobará de forma más agresiva los añadidos recientemente de su servidor Plex. ¡Si es la primera vez que configura Plex se recomienda un escaneo manual completo de la biblioteca!",
|
||||
"components.Settings.manualscanDescription": "Normalmente, esto sólo se ejecutará una vez cada 24 horas. Overseerr comprobará de forma más agresiva los añadidos recientemente de su servidor Plex. ¡Si es la primera vez que configura Plex se recomienda un escaneo manual completo de la biblioteca!",
|
||||
"components.Settings.manualscan": "Escaneo manual de biblioteca",
|
||||
"components.Settings.librariesRemaining": "Bibliotecas restantes: {count}",
|
||||
"components.Settings.hostname": "Nombre de host / IP",
|
||||
@@ -338,5 +338,51 @@
|
||||
"components.Settings.RadarrModal.testFirstRootFolders": "Prueba la conexión para cargar carpetas raíz",
|
||||
"components.Settings.RadarrModal.testFirstQualityProfiles": "Prueba la conexión para cargar perfiles de calidad",
|
||||
"components.Settings.RadarrModal.loadingrootfolders": "Cargando carpetas raíz…",
|
||||
"components.Settings.RadarrModal.loadingprofiles": "Cargando perfiles de calidad…"
|
||||
"components.Settings.RadarrModal.loadingprofiles": "Cargando perfiles de calidad…",
|
||||
"i18n.close": "Cerrar",
|
||||
"components.TvDetails.showtype": "Tipo de Serie",
|
||||
"components.TvDetails.network": "Red",
|
||||
"components.TvDetails.anime": "Anime",
|
||||
"components.Settings.toastSettingsSuccess": "Ajustes guardados.",
|
||||
"components.Settings.toastSettingsFailure": "Algo salió mal guardando la configuración.",
|
||||
"components.Settings.toastApiKeySuccess": "¡Nueva clave API generada!",
|
||||
"components.Settings.toastApiKeyFailure": "Algo salió mal generando una nueva clave API.",
|
||||
"components.Settings.defaultPermissions": "Permisos de usuario predeterminados",
|
||||
"components.Settings.SonarrModal.animerootfolder": "Carpeta raíz de anime",
|
||||
"components.Settings.SonarrModal.animequalityprofile": "Perfil de calidad de anime",
|
||||
"components.Settings.SettingsAbout.timezone": "Zona horaria",
|
||||
"components.Settings.SettingsAbout.supportoverseerr": "Apoya a Overseerr",
|
||||
"components.Settings.SettingsAbout.helppaycoffee": "Págame un café",
|
||||
"components.Settings.SettingsAbout.Releases.viewongithub": "Ver en GitHub",
|
||||
"components.Settings.SettingsAbout.Releases.viewchangelog": "Ver registro de cambios",
|
||||
"components.Settings.SettingsAbout.Releases.versionChangelog": "Cambios de la versión",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelopMessage": "Los cambios en su versión no estarán disponibles a continuación. Consulte el <GithubLink> repositorio de GitHub </GithubLink> para obtener las últimas actualizaciones.",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelop": "¡Está ejecutando una versión de desarrollo de Overseerr!",
|
||||
"components.Settings.SettingsAbout.Releases.releases": "Versiones",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "Faltan datos de la versión. ¿GitHub está caído?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "Última Versión",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "Versión Actual",
|
||||
"components.Settings.Notifications.testsent": "¡Notificación de prueba enviada!",
|
||||
"components.Settings.Notifications.test": "Comprobar",
|
||||
"components.MovieDetails.studio": "Estudio",
|
||||
"components.UserList.importfromplexerror": "Algo salió mal importando usuarios de Plex",
|
||||
"components.UserList.importfromplex": "Importar usuarios de Plex",
|
||||
"components.UserList.importedfromplex": "{userCount, plural, =0 {Ningún} one {# Nuevo usuario} other {# Nuevos usuarios}} importado/s de Plex",
|
||||
"components.TvDetails.viewfullcrew": "Ver Equipo Completo",
|
||||
"components.TvDetails.firstAirDate": "Primera fecha de emisión",
|
||||
"components.TvDetails.TvCrew.fullseriescrew": "Equipo completo de la serie",
|
||||
"components.Settings.Notifications.ssldisabletip": "SSL debe estar deshabilitado en conexiones TLS estándar (puerto 587)",
|
||||
"components.Settings.Notifications.allowselfsigned": "Permitir certificados autofirmados",
|
||||
"components.PersonDetails.crewmember": "Miembro del Equipo",
|
||||
"components.MovieDetails.viewfullcrew": "Ver Equipo Completo",
|
||||
"components.MovieDetails.MovieCrew.fullcrew": "Equipo Completo",
|
||||
"components.CollectionDetails.requestswillbecreated": "Los siguientes títulos tendrán solicitudes creadas para ellos:",
|
||||
"components.CollectionDetails.requesting": "Solicitando…",
|
||||
"components.CollectionDetails.requestcollection": "Solicitar Colección",
|
||||
"components.CollectionDetails.requestSuccess": "<strong> {title} </strong> solicitado correctamente!",
|
||||
"components.CollectionDetails.request": "Solicitar",
|
||||
"components.CollectionDetails.overviewunavailable": "Resumen no disponible",
|
||||
"components.CollectionDetails.overview": "Resumen",
|
||||
"components.CollectionDetails.numberofmovies": "Número de películas: {count}",
|
||||
"components.CollectionDetails.movies": "Películas"
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
"components.Settings.jobname": "Nom de la tâche",
|
||||
"components.Settings.librariesRemaining": "Bibliothèques restantes : {count}",
|
||||
"components.Settings.manualscan": "Scan manuel des bibliothèques",
|
||||
"components.Settings.manualscanDescription": "Normalement, le scan sera effectué une fois toutes les 6 heures seulement. Overseerr va vérifier les ajouts récents de votre serveur Plex de manière plus agressive. Si c'est votre première configuration de Plex, un scan complet unique de la bibliothèque est recommandé !",
|
||||
"components.Settings.manualscanDescription": "Normalement, le scan sera effectué une fois toutes les 24 heures seulement. Overseerr va vérifier les ajouts récents de votre serveur Plex de manière plus agressive. Si c'est votre première configuration de Plex, un scan complet unique de la bibliothèque est recommandé !",
|
||||
"components.Settings.menuAbout": "À propos",
|
||||
"components.Settings.menuGeneralSettings": "Paramètres généraux",
|
||||
"components.Settings.menuJobs": "Tâches",
|
||||
@@ -348,5 +348,45 @@
|
||||
"components.Settings.toastApiKeyFailure": "Une erreur s'est produite lors de la génération de la nouvelle clé API.",
|
||||
"components.Settings.SonarrModal.animerootfolder": "Dossier racine pour anime",
|
||||
"components.Settings.SonarrModal.animequalityprofile": "Profil qualité pour anime",
|
||||
"components.MovieDetails.studio": "Studio"
|
||||
"components.MovieDetails.studio": "Studio",
|
||||
"components.Settings.SettingsAbout.supportoverseerr": "Soutenez Overseerr",
|
||||
"i18n.close": "Fermer",
|
||||
"components.Settings.SettingsAbout.timezone": "Fuseau horaire",
|
||||
"components.Settings.SettingsAbout.helppaycoffee": "Aidez à payer le café",
|
||||
"components.Settings.SettingsAbout.Releases.viewongithub": "Voir sur GitHub",
|
||||
"components.Settings.SettingsAbout.Releases.viewchangelog": "Voir le journal des modifications",
|
||||
"components.Settings.SettingsAbout.Releases.versionChangelog": "Journal des modifications de version",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelopMessage": "Les modifications apportées à votre version ne seront pas disponibles ci-dessous. Veuillez consulter le <GithubLink>dépôt GitHub</GithubLink> pour les dernières mises à jour.",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelop": "Vous utilisez une version de développement d'Overseerr !",
|
||||
"components.Settings.SettingsAbout.Releases.releases": "Versions",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "Données de sortie manquantes. GitHub est-il en panne ?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "Dernière version",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "Version actuelle",
|
||||
"components.Settings.Notifications.testsent": "Notification de test envoyée !",
|
||||
"components.Settings.Notifications.test": "Test",
|
||||
"components.Settings.defaultPermissions": "Autorisations utilisateur par défaut",
|
||||
"components.UserList.importfromplexerror": "Une erreur s'est produite lors de l'importation d'utilisateurs depuis Plex",
|
||||
"components.UserList.importfromplex": "Importer des utilisateurs depuis Plex",
|
||||
"components.UserList.importedfromplex": "{userCount, plural, =0 {Aucun nouvel utilisateur} one {# nouvel utilisateur} other {# nouveaux utilisateurs}} importé(s) depuis Plex",
|
||||
"components.TvDetails.viewfullcrew": "Voir l'équipe complète de la série",
|
||||
"components.TvDetails.TvCrew.fullseriescrew": "Équipe complète de la série",
|
||||
"components.PersonDetails.crewmember": "Membre de l'équipe",
|
||||
"components.MovieDetails.viewfullcrew": "Voir l'équipe complète",
|
||||
"components.MovieDetails.MovieCrew.fullcrew": "Équipe complète",
|
||||
"components.TvDetails.firstAirDate": "Date de première diffusion",
|
||||
"components.Settings.Notifications.ssldisabletip": "Le SSL doit être désactivé sur les connexions TLS standard (Port 587)",
|
||||
"components.Settings.Notifications.allowselfsigned": "Autoriser les certificats autosignés",
|
||||
"components.TvDetails.watchtrailer": "Regarder la bande-annonce",
|
||||
"components.MovieDetails.watchtrailer": "Regarder la bande-annonce",
|
||||
"components.MovieDetails.view": "Voir",
|
||||
"components.CollectionDetails.requestswillbecreated": "Des demandes seront créées pour les titres suivants :",
|
||||
"components.CollectionDetails.requesting": "Demande en cours…",
|
||||
"components.CollectionDetails.requestcollection": "Demander une collection",
|
||||
"components.CollectionDetails.requestSuccess": "<strong>{title}</strong> demandé avec succès !",
|
||||
"components.CollectionDetails.request": "Demander",
|
||||
"components.CollectionDetails.overviewunavailable": "Résumé indisponible",
|
||||
"components.CollectionDetails.overview": "Résumé",
|
||||
"components.CollectionDetails.numberofmovies": "Nombre de films : {count}",
|
||||
"components.CollectionDetails.movies": "Films",
|
||||
"i18n.requested": "Demandé"
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"components.RequestList.requestedAt": "Richiesto",
|
||||
"components.RequestList.previous": "Precedente",
|
||||
"components.RequestList.next": "Successivo",
|
||||
"components.RequestList.modifiedBy": "Ultima modifica da",
|
||||
"components.RequestList.modifiedBy": "Ultima modifica",
|
||||
"components.RequestList.mediaInfo": "Media",
|
||||
"components.RequestList.RequestItem.seasons": "Stagioni",
|
||||
"components.RequestList.RequestItem.requestedby": "Richiesto da {username}",
|
||||
@@ -92,7 +92,7 @@
|
||||
"components.MovieDetails.approve": "Approva",
|
||||
"components.MovieDetails.MovieCast.fullcast": "Cast completo",
|
||||
"components.Login.signinplex": "Accedi per continuare",
|
||||
"components.Layout.alphawarning": "Questo software è in ALPHA. Tutto può smettere di funzionare o diventare instabile. Aiutaci riportando i problemi su Overseerr GitHub!",
|
||||
"components.Layout.alphawarning": "Questo programma è in ALPHA. Tutto può smettere di funzionare o diventare instabile. Aiutaci segnalando i problemi su Overseerr GitHub!",
|
||||
"components.Layout.UserDropdown.signout": "Esci",
|
||||
"components.Layout.Sidebar.users": "Utenti",
|
||||
"components.Layout.Sidebar.settings": "Impostazioni",
|
||||
@@ -108,7 +108,7 @@
|
||||
"components.UserEdit.saving": "Salvataggio…",
|
||||
"components.UserEdit.save": "Salva",
|
||||
"components.UserEdit.usersaved": "Utente salvato",
|
||||
"components.UserEdit.usersDescription": "Concede l'autorizzazione per gestire gli utenti di Overseerr. Gli utenti con questa autorizzazione non possono modificare gli utenti con privilegi di amministratore o concederla.",
|
||||
"components.UserEdit.usersDescription": "Concede l'autorizzazione per gestire gli utenti di Overseerr. Gli utenti con questa autorizzazione non possono modificare gli utenti con privilegi di amministratore, né concederli.",
|
||||
"components.UserEdit.users": "Gestisci gli utenti",
|
||||
"components.UserEdit.username": "Nome utente",
|
||||
"components.UserList.deleteconfirm": "Eliminare l'utente? Tutti i dati di richiesta esistenti da questo utente verranno rimossi.",
|
||||
@@ -142,18 +142,18 @@
|
||||
"i18n.deleting": "Eliminazione…",
|
||||
"i18n.delete": "Elimina",
|
||||
"pages.oops": "Ops",
|
||||
"components.Settings.RadarrModal.rootfolder": "Cartella radice",
|
||||
"components.Settings.RadarrModal.selectRootFolder": "Seleziona una cartella radice",
|
||||
"components.Settings.RadarrModal.rootfolder": "Cartella principale",
|
||||
"components.Settings.RadarrModal.selectRootFolder": "Seleziona una cartella principale",
|
||||
"components.Settings.RadarrModal.selectQualityProfile": "Seleziona un profilo qualità",
|
||||
"components.Settings.RadarrModal.selectMinimumAvailability": "Seleziona la disponibilità minima",
|
||||
"components.Settings.RadarrModal.save": "Salva i cambiamenti",
|
||||
"components.Settings.RadarrModal.save": "Salva le modifiche",
|
||||
"components.Settings.RadarrModal.qualityprofile": "Profilo qualità",
|
||||
"components.Settings.RadarrModal.minimumAvailability": "Disponibilità minima",
|
||||
"components.Settings.RadarrModal.editradarr": "Modifica server Radarr",
|
||||
"components.Settings.RadarrModal.defaultserver": "Server predefinito",
|
||||
"components.Settings.RadarrModal.apiKey": "Chiave API",
|
||||
"components.Settings.RadarrModal.add": "Aggiungi un server",
|
||||
"components.Settings.Notifications.save": "Salva i cambiamenti",
|
||||
"components.Settings.Notifications.save": "Salva le modifiche",
|
||||
"components.Settings.Notifications.discordsettingsfailed": "Impossibile salvare le impostazioni di notifica Discord.",
|
||||
"components.RequestModal.requesttitle": "Richiedi {title}",
|
||||
"components.RequestModal.requestfrom": "Al momento è in sospeso una richiesta da {username}",
|
||||
@@ -187,7 +187,7 @@
|
||||
"components.Settings.startscan": "Avvia la scansione",
|
||||
"components.Settings.ssl": "SSL",
|
||||
"components.Settings.saving": "Salvataggio…",
|
||||
"components.Settings.save": "Salva i cambiamenti",
|
||||
"components.Settings.save": "Salva le modifiche",
|
||||
"components.Settings.runnow": "Esegui ora",
|
||||
"components.Settings.radarrsettings": "Impostazioni Radarr",
|
||||
"components.Settings.plexsettings": "Impostazioni Plex",
|
||||
@@ -201,10 +201,10 @@
|
||||
"components.Settings.menuServices": "Servizi",
|
||||
"components.Settings.menuPlexSettings": "Plex",
|
||||
"components.Settings.menuNotifications": "Notifiche",
|
||||
"components.Settings.menuLogs": "Registri",
|
||||
"components.Settings.menuLogs": "Log",
|
||||
"components.Settings.menuGeneralSettings": "Impostazioni generali",
|
||||
"components.Settings.menuAbout": "Informazioni",
|
||||
"components.Settings.manualscan": "Scansione manuale della biblioteca",
|
||||
"components.Settings.menuAbout": "Info",
|
||||
"components.Settings.manualscan": "Scansione manuale della libreria",
|
||||
"components.Settings.librariesRemaining": "Biblioteche rimanenti: {count}",
|
||||
"components.Settings.hostname": "Nome host/IP",
|
||||
"components.Settings.generalsettingsDescription": "Queste sono impostazioni relative alla configurazione generale di Overseerr.",
|
||||
@@ -214,15 +214,15 @@
|
||||
"components.Settings.delete": "Elimina",
|
||||
"components.Settings.default4k": "4K predefinito",
|
||||
"components.Settings.default": "Predefinito",
|
||||
"components.Settings.currentlibrary": "Biblioteca corrente: {name}",
|
||||
"components.Settings.currentlibrary": "Libreria corrente: {name}",
|
||||
"components.Settings.copied": "Chiave API copiata negli appunti",
|
||||
"components.Settings.cancelscan": "Annulla l'analisi",
|
||||
"components.Settings.applicationurl": "URL applicazione",
|
||||
"components.Settings.apikey": "Chiave API",
|
||||
"components.Settings.addsonarr": "Aggiungi un server Sonarr",
|
||||
"components.Settings.addradarr": "Aggiungi un server radarr",
|
||||
"components.Settings.addradarr": "Aggiungi un server Radarr",
|
||||
"components.Settings.activeProfile": "Profilo attivo",
|
||||
"components.Settings.SonarrModal.validationRootFolderRequired": "È necessario selezionare una cartella radice",
|
||||
"components.Settings.SonarrModal.validationRootFolderRequired": "È necessario selezionare una cartella principale",
|
||||
"components.Settings.SonarrModal.validationProfileRequired": "È necessario selezionare un profilo",
|
||||
"components.Settings.SonarrModal.validationPortRequired": "È necessario fornire una porta",
|
||||
"components.Settings.SonarrModal.validationNameRequired": "È necessario fornire un nome di server",
|
||||
@@ -230,18 +230,18 @@
|
||||
"components.Settings.SonarrModal.validationApiKeyRequired": "È necessario fornire una chiave API",
|
||||
"components.Settings.SonarrModal.toastRadarrTestSuccess": "Stabilita la connessione Sonarr!",
|
||||
"components.Settings.SonarrModal.toastRadarrTestFailure": "Impossibile connettersi a Sonarr Server",
|
||||
"components.Settings.SonarrModal.testFirstRootFolders": "Testa la connessione per caricare le cartelle radice",
|
||||
"components.Settings.SonarrModal.testFirstRootFolders": "Testa la connessione per caricare le cartelle",
|
||||
"components.Settings.SonarrModal.testFirstQualityProfiles": "Testa la connessione per caricare profili di qualità",
|
||||
"components.Settings.SonarrModal.servernamePlaceholder": "Un server Sonarr",
|
||||
"components.Settings.SonarrModal.servername": "Nome server",
|
||||
"components.Settings.SonarrModal.server4k": "Server 4K",
|
||||
"components.Settings.SonarrModal.selectRootFolder": "Seleziona una cartella radice",
|
||||
"components.Settings.SonarrModal.selectRootFolder": "Seleziona una cartella principale",
|
||||
"components.Settings.SonarrModal.selectQualityProfile": "Seleziona un profilo qualità",
|
||||
"components.Settings.SonarrModal.seasonfolders": "Cartelle stagione",
|
||||
"components.Settings.SonarrModal.save": "Salva i cambiamenti",
|
||||
"components.Settings.SonarrModal.rootfolder": "Cartella radice",
|
||||
"components.Settings.SonarrModal.save": "Salva le modifiche",
|
||||
"components.Settings.SonarrModal.rootfolder": "Cartella principale",
|
||||
"components.Settings.SonarrModal.qualityprofile": "Profilo qualità",
|
||||
"components.Settings.SonarrModal.loadingrootfolders": "Caricamento delle cartelle radice in…",
|
||||
"components.Settings.SonarrModal.loadingrootfolders": "Caricamento delle cartelle…",
|
||||
"components.Settings.SonarrModal.loadingprofiles": "Caricamento profili qualità…",
|
||||
"components.Settings.SonarrModal.editsonarr": "Modifica server Sonarr",
|
||||
"components.Settings.SonarrModal.defaultserver": "Server predefinito",
|
||||
@@ -250,16 +250,16 @@
|
||||
"components.Settings.SonarrModal.baseUrl": "URL di base",
|
||||
"components.Settings.SonarrModal.apiKeyPlaceholder": "La tua chiave API Sonarr",
|
||||
"components.Settings.SonarrModal.apiKey": "Chiave API",
|
||||
"components.Settings.SonarrModal.animerootfolder": "Cartella radice anime",
|
||||
"components.Settings.SonarrModal.animerootfolder": "Cartella principale Anime",
|
||||
"components.Settings.SonarrModal.animequalityprofile": "Profilo qualità anime",
|
||||
"components.Settings.SonarrModal.add": "Aggiungi un server",
|
||||
"components.Settings.SettingsAbout.totalrequests": "Totale richieste",
|
||||
"components.Settings.SettingsAbout.totalmedia": "Media totali",
|
||||
"components.Settings.SettingsAbout.overseerrinformation": "Informazioni su Overseerr",
|
||||
"components.Settings.SettingsAbout.overseerrinformation": "Info su Overseerr",
|
||||
"components.Settings.SettingsAbout.githubdiscussions": "Discussioni su GitHub",
|
||||
"components.Settings.SettingsAbout.gettingsupport": "Ottieni aiuto",
|
||||
"components.Settings.SettingsAbout.clickheretojoindiscord": "Clicca qui per unirti al nostro server Discord.",
|
||||
"components.Settings.RadarrModal.validationRootFolderRequired": "È necessario selezionare una cartella radice",
|
||||
"components.Settings.RadarrModal.validationRootFolderRequired": "È necessario selezionare una cartella principale",
|
||||
"components.Settings.RadarrModal.validationProfileRequired": "È necessario selezionare un profilo",
|
||||
"components.Settings.RadarrModal.validationPortRequired": "È necessario fornire una porta",
|
||||
"components.Settings.RadarrModal.validationNameRequired": "È necessario fornire un nome di server",
|
||||
@@ -268,12 +268,12 @@
|
||||
"components.Settings.RadarrModal.validationApiKeyRequired": "È necessario fornire una chiave API",
|
||||
"components.Settings.RadarrModal.toastRadarrTestSuccess": "Stabilita la connessione Radarr!",
|
||||
"components.Settings.RadarrModal.toastRadarrTestFailure": "Impossibile connettersi al server Radarr",
|
||||
"components.Settings.RadarrModal.testFirstRootFolders": "Testa la connessione per caricare le cartelle radice",
|
||||
"components.Settings.RadarrModal.testFirstRootFolders": "Testa la connessione per caricare le cartelle",
|
||||
"components.Settings.RadarrModal.testFirstQualityProfiles": "Testa la connessione per caricare profili qualità",
|
||||
"components.Settings.RadarrModal.servernamePlaceholder": "Un server Radarr",
|
||||
"components.Settings.RadarrModal.servername": "Nome server",
|
||||
"components.Settings.RadarrModal.server4k": "Server 4K",
|
||||
"components.Settings.RadarrModal.loadingrootfolders": "Caricamento delle cartelle radice in…",
|
||||
"components.Settings.RadarrModal.loadingrootfolders": "Caricamento delle cartelle…",
|
||||
"components.Settings.RadarrModal.loadingprofiles": "Caricamento profili di qualità…",
|
||||
"components.Settings.RadarrModal.createradarr": "Crea un nuovo server Radarr",
|
||||
"components.Settings.RadarrModal.baseUrlPlaceholder": "Esempio: /radarr",
|
||||
@@ -288,30 +288,30 @@
|
||||
"components.Settings.Notifications.smtpHost": "Host SMTP",
|
||||
"components.Settings.Notifications.enableSsl": "Abilita SSL",
|
||||
"components.Settings.Notifications.discordsettingssaved": "Impostazioni di notifica Discord salvate!",
|
||||
"components.Settings.Notifications.authUser": "Nome utente",
|
||||
"components.Settings.Notifications.authPass": "Password",
|
||||
"components.Settings.Notifications.authUser": "Auth User",
|
||||
"components.Settings.Notifications.authPass": "Auth Pass",
|
||||
"components.RequestModal.requestseasons": "Richiedi {seasonCount} {seasonCount, plural, one {Season} other {Seasons}}",
|
||||
"components.RequestList.showingresults": "Visualizzazione dei risultati da <strong>{from}</strong> a <strong>{to}</strong> di <strong>{total}</strong>",
|
||||
"components.UserEdit.userfail": "Qualcosa è andato storto salvando l'utente.",
|
||||
"components.UserEdit.requestDescription": "Concede l'autorizzazione per richiedere film e serie.",
|
||||
"components.UserEdit.requestDescription": "Concede il permesso di richiedere film e serie.",
|
||||
"components.UserEdit.request": "Richiesta",
|
||||
"components.UserEdit.permissions": "Autorizzazioni",
|
||||
"components.UserEdit.managerequestsDescription": "Concede l'autorizzazione per gestire le richieste Overseerr. Ciò include l'approvazione e la negazione delle richieste.",
|
||||
"components.UserEdit.managerequestsDescription": "Concede il permesso di gestire le richieste di Overseerr. Ciò include l'approvazione e la negazione delle richieste.",
|
||||
"components.UserEdit.managerequests": "Gestisci le richieste",
|
||||
"components.UserEdit.autoapproveDescription": "Concede l'approvazione automatica per tutte le richieste effettuate da questo utente.",
|
||||
"components.UserEdit.autoapprove": "Approvazione automatica",
|
||||
"components.UserEdit.adminDescription": "Accesso completo all'amministratore. Ignora tutti i controlli delle autorizzazioni.",
|
||||
"components.UserEdit.adminDescription": "Accesso amministratore completo. Bypassa tutti gli altri permessi.",
|
||||
"components.UserEdit.admin": "Amministratore",
|
||||
"components.TvDetails.userrating": "Voto pubblico",
|
||||
"components.TvDetails.unavailable": "Non disponibile",
|
||||
"components.TvDetails.status": "Stato",
|
||||
"components.TvDetails.similarsubtext": "Altre serie simili a {title}",
|
||||
"components.TvDetails.similar": "Serie simile",
|
||||
"components.TvDetails.similar": "Serie simili",
|
||||
"components.TvDetails.showtype": "Tipo di serie",
|
||||
"components.TvDetails.requestmore": "Richiedi di più",
|
||||
"components.TvDetails.request": "Richiesta",
|
||||
"components.TvDetails.recommendationssubtext": "Se ti è piaciuto {title}, potrebbe anche piacerti…",
|
||||
"components.TvDetails.recommendations": "Consigli",
|
||||
"components.TvDetails.recommendations": "Consigliati",
|
||||
"components.TvDetails.pending": "In sospeso",
|
||||
"components.TvDetails.overviewunavailable": "Trama non disponibile",
|
||||
"components.TvDetails.overview": "Trama",
|
||||
@@ -322,18 +322,18 @@
|
||||
"components.Settings.jobname": "Nome Task",
|
||||
"components.UserEdit.voteDescription": "Concede il permesso di votare sulle richieste (sistema di voto non acora implementato)",
|
||||
"components.UserEdit.vote": "Vota",
|
||||
"components.UserEdit.settingsDescription": "Concede l'autorizzazione a modificare tutte le impostazioni di Overseerr. Un utente deve disporre di questa autorizzazione per concederla ad altri.",
|
||||
"components.UserEdit.settingsDescription": "Permette di modificare tutte le impostazioni di Overseerr. Un utente deve avere questa autorizzazione per poterla concedere ad altri.",
|
||||
"components.TvDetails.manageModalClearMediaWarning": "Questo rimuoverà tutti i dati, incluse le richieste per questo elemento in modo irreversibile. Se questo elemento esiste nella tua libreria di Plex, i dati verranno ricreati alla prossima sincronizzazione.",
|
||||
"components.Setup.syncingbackground": "La sincronizzazione verrà eseguita in background. Nel frattempo puoi continuare il processo di configurazione.",
|
||||
"components.Setup.signinMessage": "Comincia accedendo con il tuo account Plex",
|
||||
"components.Settings.sync": "Sincronizza le librerie di Plex",
|
||||
"components.Settings.sonarrsettings": "Impostazioni Sonarr",
|
||||
"components.Settings.sonarrSettingsDescription": "Imposta la connessione al tuo Sonarr qui sotto. È possibile avere più instanze, ma solo due attive come predefinite nello stesso momento (uno per l'HD standard e uno per 4K). Gli amministratori possono ignorare quale server è utilizzato per le nuove richieste.",
|
||||
"components.Settings.radarrSettingsDescription": "Imposta la connessione al tuo Radarr qui sotto. È possibile avere più instanze, ma solo due attive come predefinite nello stesso momento (uno per l'HD standard e uno per 4K). Gli amministratori possono ignorare quale server è utilizzato per le nuove richieste.",
|
||||
"components.Settings.plexsettingsDescription": "Configura le impostazioni per il tuo server Plex. Overseerr utilizza il tuo server Plex per scansionare la tua libreria a intervealli per vedere quali elementi sono disponibili.",
|
||||
"components.Settings.sonarrSettingsDescription": "Configura Sonarr qui sotto. È possibile avere più istanze, ma solo due predefinite contemporaneamente (uno per l'HD standard e uno per 4K). Gli amministratori possono ignorare quale server è utilizzato per le nuove richieste.",
|
||||
"components.Settings.radarrSettingsDescription": "Configura Radarr qui sotto. È possibile avere più istanze, ma solo due predefinite contemporaneamente (uno per l'HD standard e uno per 4K). Gli amministratori possono ignorare quale server è utilizzato per le nuove richieste.",
|
||||
"components.Settings.plexsettingsDescription": "Configura le impostazioni del tuo server Plex. Overseerr scansiona la tua libreria Plex a intervalli regolari alla ricerca di nuovi contenuti.",
|
||||
"components.Settings.plexlibrariesDescription": "Le librerie che verranno scansionate da Overseerr alla ricerca di titoli. Se non ci sono librerie, configura e salva le impostazioni di connessione a Plex e fai click sul pulsante qui sotto.",
|
||||
"components.Settings.plexlibraries": "Librerie Plex",
|
||||
"components.Settings.manualscanDescription": "Normalmente, questo verrà eseguito ogni 6 ore. Overseerr controllerà in modo più aggressivo i server Plex aggiunti di recente. Se è la prima volta che configuri Plex, si consiglia una scansione manuale completa della libreria!",
|
||||
"components.Settings.manualscanDescription": "Normalmente, questo verrà eseguito ogni 24 ore. Overseerr controllerà in modo più aggressivo i server Plex aggiunti di recente. Se è la prima volta che configuri Plex, si consiglia una scansione manuale completa della libreria!",
|
||||
"components.Settings.port": "Porta",
|
||||
"components.Settings.servername": "Nome server (impostato automaticamente dopo il salvataggio)",
|
||||
"components.Settings.servernamePlaceholder": "Nome server Plex",
|
||||
@@ -348,5 +348,45 @@
|
||||
"pages.somethingWentWrong": "{statusCode} — Qualcosa è andato storto",
|
||||
"pages.serviceUnavailable": "{statusCode} — Servizio non disponibile",
|
||||
"pages.returnHome": "Ritorna alla pagina iniziale",
|
||||
"pages.pageNotFound": "404 — Pagina non trovata"
|
||||
"pages.pageNotFound": "404 — Pagina non trovata",
|
||||
"i18n.close": "Chiudi",
|
||||
"components.Settings.SettingsAbout.timezone": "Fuso orario",
|
||||
"components.Settings.SettingsAbout.supportoverseerr": "Sostieni Overseerr",
|
||||
"components.Settings.SettingsAbout.helppaycoffee": "Offri un caffè",
|
||||
"components.Settings.SettingsAbout.Releases.viewongithub": "Visualizza su GitHub",
|
||||
"components.Settings.SettingsAbout.Releases.viewchangelog": "Visualizza il changelog",
|
||||
"components.Settings.SettingsAbout.Releases.versionChangelog": "Changelog versione",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelopMessage": "Il changelog di questa versione non è disponibile qui sotto. Puoi andare su<GithubLink>repository GitHub</GithubLink> per gli ultimi aggiornamenti.",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelop": "Stai eseguendo una versione in sviluppo di Overseerr!",
|
||||
"components.Settings.SettingsAbout.Releases.releases": "Versioni",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "Dati di versione mancanti. GitHub è down?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "Ultima versione",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "Versione attuale",
|
||||
"components.Settings.Notifications.testsent": "Notifica di prova inviata!",
|
||||
"components.Settings.Notifications.test": "Test",
|
||||
"components.Settings.defaultPermissions": "Autorizzazioni predefinite per nuovi utenti",
|
||||
"components.UserList.importfromplexerror": "Qualcosa è andato storto durante l'importazione degli utenti da Plex",
|
||||
"components.UserList.importfromplex": "Importa utenti da Plex",
|
||||
"components.UserList.importedfromplex": "{userCount, plural, =0 {Nessun utente importato} one {# nuovo utente importato} other {# nuovi utenti importati}} da Plex",
|
||||
"components.TvDetails.viewfullcrew": "Vedi troupe completa",
|
||||
"components.TvDetails.TvCrew.fullseriescrew": "Troupe completa serie",
|
||||
"components.PersonDetails.crewmember": "Membro della troupe",
|
||||
"components.MovieDetails.MovieCrew.fullcrew": "Troupe completa",
|
||||
"components.MovieDetails.viewfullcrew": "Vedi troupe completa",
|
||||
"components.Settings.Notifications.ssldisabletip": "SSL dovrebbe essere disabilitato sulle connessioni standard TLS (Porta 587)",
|
||||
"components.Settings.Notifications.allowselfsigned": "Consenti i certificati autofirmati",
|
||||
"components.TvDetails.firstAirDate": "Prima data di messa in onda",
|
||||
"components.CollectionDetails.requestswillbecreated": "Per i titoli seguenti verranno create richieste:",
|
||||
"components.CollectionDetails.requesting": "Richiesta in corso…",
|
||||
"components.CollectionDetails.requestcollection": "Richiedi raccolta",
|
||||
"components.CollectionDetails.requestSuccess": "<strong>{titolo}</strong> richiesto con successo!",
|
||||
"components.CollectionDetails.request": "Richiedi",
|
||||
"components.CollectionDetails.overviewunavailable": "Trama non disponibile",
|
||||
"components.CollectionDetails.overview": "Trama",
|
||||
"components.CollectionDetails.numberofmovies": "Numero di film: {count}",
|
||||
"components.CollectionDetails.movies": "Film",
|
||||
"components.TvDetails.watchtrailer": "Guarda il trailer",
|
||||
"components.MovieDetails.watchtrailer": "Guarda il trailer",
|
||||
"components.MovieDetails.view": "Visualizza",
|
||||
"i18n.requested": "Richiesto"
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
"components.Settings.jobname": "ジョブ名",
|
||||
"components.Settings.librariesRemaining": "残りのライブラリー: {count}",
|
||||
"components.Settings.manualscan": "手動ライブラリースキャン",
|
||||
"components.Settings.manualscanDescription": "通常は6時間に一度しか実行されません。Overseerr は、Plex サーバーの最近追加されたフォルダをより頻繁にチェックします。初めて Plex を設定する場合は、一度手動でライブラリーをスキャンすることをお勧めします。",
|
||||
"components.Settings.manualscanDescription": "通常は24時間に一度しか実行されません。Overseerr は、Plex サーバーの最近追加されたフォルダをより頻繁にチェックします。初めて Plex を設定する場合は、一度手動でライブラリーをスキャンすることをお勧めします。",
|
||||
"components.Settings.menuAbout": "Overseerrについて",
|
||||
"components.Settings.menuGeneralSettings": "一般設定",
|
||||
"components.Settings.menuJobs": "ジョブ",
|
||||
@@ -348,5 +348,45 @@
|
||||
"components.Settings.RadarrModal.testFirstQualityProfiles": "画質プロファイルをロードするには先に接続をテストしてください",
|
||||
"components.Settings.RadarrModal.loadingprofiles": "画質プロファイルの読込中…",
|
||||
"components.Settings.RadarrModal.loadingrootfolders": "ルートフォルダー読込中…",
|
||||
"components.MovieDetails.studio": "スタジオ"
|
||||
"components.MovieDetails.studio": "スタジオ",
|
||||
"components.Settings.Notifications.test": "テスト",
|
||||
"i18n.close": "閉じる",
|
||||
"components.Settings.defaultPermissions": "デフォルトのユーザー権限",
|
||||
"components.Settings.SettingsAbout.timezone": "タイムゾーン",
|
||||
"components.Settings.SettingsAbout.supportoverseerr": "Overseerrを応援",
|
||||
"components.Settings.SettingsAbout.helppaycoffee": "開発者のコーヒーのためにチップを",
|
||||
"components.Settings.SettingsAbout.Releases.viewongithub": "GitHubで見る",
|
||||
"components.Settings.SettingsAbout.Releases.viewchangelog": "変更履歴参照",
|
||||
"components.Settings.SettingsAbout.Releases.versionChangelog": "バージョン変更履歴",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelopMessage": "お使いのバージョンのパッチノート以下に記載されていません。最新のアップデートは<GithubLink>GitHubリポジトリ</GithubLink>をご覧ください。",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelop": "Overseerrの開発バージョンを実行しています。",
|
||||
"components.Settings.SettingsAbout.Releases.releases": "リリース",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "リリースデータがありません。GitHubはダウンしていますか?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "最新バージョン",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "現在のバージョン",
|
||||
"components.Settings.Notifications.testsent": "テスト通知が送信されました。",
|
||||
"components.MovieDetails.MovieCrew.fullcrew": "フルクルー",
|
||||
"components.MovieDetails.viewfullcrew": "フルクルーを表示",
|
||||
"components.CollectionDetails.requestswillbecreated": "以下のタイトルをリクエストします。",
|
||||
"components.CollectionDetails.requesting": "リクエスト中…",
|
||||
"components.CollectionDetails.requestcollection": "リクエストコレクション",
|
||||
"components.CollectionDetails.requestSuccess": "<strong>{title}</strong> をリクエストしました!",
|
||||
"components.CollectionDetails.request": "リクエスト",
|
||||
"components.CollectionDetails.overviewunavailable": "ストーリー情報ありません",
|
||||
"components.CollectionDetails.overview": "ストーリー",
|
||||
"components.CollectionDetails.numberofmovies": "作品数: {count}",
|
||||
"components.CollectionDetails.movies": "映画",
|
||||
"i18n.requested": "リクエスト済み",
|
||||
"components.TvDetails.watchtrailer": "予告編を見る",
|
||||
"components.MovieDetails.watchtrailer": "予告編を見る",
|
||||
"components.MovieDetails.view": "表示",
|
||||
"components.UserList.importfromplexerror": "Plexからユーザーをインポート中に問題が発生しました",
|
||||
"components.UserList.importfromplex": "Plexからユーザーをインポート",
|
||||
"components.UserList.importedfromplex": "Plexから{userCount, plural, =0 {新ユーザーはインポートされませんでした。} one {新ユーザー #名をインポートしました。} other {新ユーザー #名をインポートしました。}}",
|
||||
"components.TvDetails.viewfullcrew": "フルクルーを表示",
|
||||
"components.TvDetails.firstAirDate": "初放送日",
|
||||
"components.TvDetails.TvCrew.fullseriescrew": "フルシリーズクルー",
|
||||
"components.Settings.Notifications.ssldisabletip": "標準TLS接続(ポート587)ではSSLを無効にすることをおすすめします。",
|
||||
"components.Settings.Notifications.allowselfsigned": "自己署名証明書を許可する",
|
||||
"components.PersonDetails.crewmember": "クルーメンバー"
|
||||
}
|
||||
|
||||
@@ -333,5 +333,11 @@
|
||||
"components.Settings.RadarrModal.testFirstRootFolders": "Test je connectie om hoofdfolders te laden",
|
||||
"components.Settings.RadarrModal.testFirstQualityProfiles": "Test je connectie om kwaliteitsprofielen te laden",
|
||||
"components.Settings.RadarrModal.loadingrootfolders": "Bezig met laden van hoofdfolders…",
|
||||
"components.Settings.RadarrModal.loadingprofiles": "Bezig met laden van kwaliteitsprofielen…"
|
||||
"components.Settings.RadarrModal.loadingprofiles": "Bezig met laden van kwaliteitsprofielen…",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "Publicatiedatum mist. Is GitHub offline?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "Laatste versie",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "Huidige versie",
|
||||
"components.Settings.Notifications.testsent": "Test notificatie verzonden!",
|
||||
"components.Settings.Notifications.test": "Test",
|
||||
"components.MovieDetails.studio": "Studio"
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
"components.RequestCard.requestedby": "Solicitado por {username}",
|
||||
"components.RequestBlock.seasons": "Temporadas",
|
||||
"components.PlexLoginButton.loginwithplex": "Entrar com",
|
||||
"components.PlexLoginButton.loggingin": "Fazendo login...",
|
||||
"components.PlexLoginButton.loading": "Carregando...",
|
||||
"components.PlexLoginButton.loggingin": "Fazendo login…",
|
||||
"components.PlexLoginButton.loading": "Carregando…",
|
||||
"components.PersonDetails.nobiography": "Biografia não disponível.",
|
||||
"components.PersonDetails.ascharacter": "como {character}",
|
||||
"components.PersonDetails.appearsin": "Aparece em",
|
||||
@@ -24,11 +24,11 @@
|
||||
"components.MovieDetails.revenue": "Receita",
|
||||
"components.MovieDetails.request": "Solicitar",
|
||||
"components.MovieDetails.releasedate": "Data de Lançamento",
|
||||
"components.MovieDetails.recommendationssubtext": "Se você gostou {title}, você provavelmente irá gostar...",
|
||||
"components.MovieDetails.recommendationssubtext": "Se você gostou {title}, você provavelmente irá gostar…",
|
||||
"components.MovieDetails.recommendations": "Recomendações",
|
||||
"components.MovieDetails.pending": "Pendente",
|
||||
"components.MovieDetails.overviewunavailable": "Visão Geral Indisponível",
|
||||
"components.MovieDetails.overview": "Visão Geral",
|
||||
"components.MovieDetails.overviewunavailable": "Sinopse indisponível",
|
||||
"components.MovieDetails.overview": "Sinopse",
|
||||
"components.MovieDetails.originallanguage": "Língua original",
|
||||
"components.MovieDetails.manageModalTitle": "Gerenciar Filme",
|
||||
"components.MovieDetails.manageModalRequests": "Solicitações",
|
||||
@@ -61,12 +61,12 @@
|
||||
"components.Discover.nopending": "Nenhuma Solicitação Pendente",
|
||||
"components.Discover.discovertv": "Séries Populares",
|
||||
"components.Discover.discovermovies": "Filmes Populares",
|
||||
"components.Settings.SonarrModal.testing": "Testando...",
|
||||
"components.Settings.SonarrModal.saving": "Salvando...",
|
||||
"components.Settings.RadarrModal.testing": "Testando...",
|
||||
"components.Settings.RadarrModal.saving": "Salvando...",
|
||||
"components.Settings.Notifications.saving": "Salvando...",
|
||||
"components.RequestModal.cancelling": "Cancelando...",
|
||||
"components.Settings.SonarrModal.testing": "Testando…",
|
||||
"components.Settings.SonarrModal.saving": "Salvando…",
|
||||
"components.Settings.RadarrModal.testing": "Testando…",
|
||||
"components.Settings.RadarrModal.saving": "Salvando…",
|
||||
"components.Settings.Notifications.saving": "Salvando…",
|
||||
"components.RequestModal.cancelling": "Cancelando…",
|
||||
"components.Settings.plexlibraries": "Bibliotecas do Plex",
|
||||
"components.Settings.notrunning": "Parado",
|
||||
"components.Settings.notificationsettingsDescription": "Aqui você pode escolher e selecionar os tipos de notificações e através de quais serviços deseja enviar.",
|
||||
@@ -84,7 +84,7 @@
|
||||
"components.Settings.menuJobs": "Tarefas",
|
||||
"components.Settings.menuGeneralSettings": "Configurações Gerais",
|
||||
"components.Settings.menuAbout": "Sobre",
|
||||
"components.Settings.manualscanDescription": "Normalmente, isso só será executado uma vez a cada 6 horas. Overseerr irá checar em detalhes items recentemente adicionados ao seu servidor Plex. Se essa é a primeira vez que você configura um servidor Plex, é recomendado a varredura completa de sua biblioteca!",
|
||||
"components.Settings.manualscanDescription": "Normalmente, isso só será executado uma vez a cada 24 horas. Overseerr irá checar em detalhes items recentemente adicionados ao seu servidor Plex. Se essa é a primeira vez que você configura um servidor Plex, é recomendado a varredura completa de sua biblioteca!",
|
||||
"components.Settings.manualscan": "Varredura Manual da Biblioteca",
|
||||
"components.Settings.librariesRemaining": "Bibliotecas Restantes: {count}",
|
||||
"components.Settings.jobname": "Nome da Tarefa",
|
||||
@@ -228,5 +228,149 @@
|
||||
"components.RequestList.previous": "Anterior",
|
||||
"components.RequestList.RequestItem.seasons": "Temporadas",
|
||||
"components.RequestList.RequestItem.notavailable": "N/A",
|
||||
"components.RequestCard.all": "Todas"
|
||||
"components.RequestCard.all": "Todas",
|
||||
"components.Setup.continue": "Continuar",
|
||||
"components.Setup.configureservices": "Configurar Serviços",
|
||||
"components.Setup.configureplex": "Configurar Plex",
|
||||
"components.Settings.validationPortRequired": "Você deve prover uma porta",
|
||||
"components.Settings.validationHostnameRequired": "Você deve prover o Nome do Servidor/IP",
|
||||
"components.Settings.toastSettingsSuccess": "Configurações salvas.",
|
||||
"components.Settings.toastSettingsFailure": "Algo de errado ao salvar configurações.",
|
||||
"components.Settings.toastApiKeySuccess": "Nova chave de API gerada!",
|
||||
"components.Settings.toastApiKeyFailure": "Algo deu errado ao gerar a nova chave de API.",
|
||||
"components.Settings.syncing": "Sincronizando…",
|
||||
"components.Settings.sync": "Sincronizar Bibliotecas do Plex",
|
||||
"components.Settings.startscan": "Iniciar Varredura",
|
||||
"components.Settings.ssl": "SSL",
|
||||
"components.Settings.sonarrsettings": "Configurações do Sonarr",
|
||||
"components.Settings.servernamePlaceholder": "Nome do Servidor Plex",
|
||||
"components.Settings.servername": "Nome do Servidor (Automaticamente definido após você salvar)",
|
||||
"components.Settings.saving": "Salvando…",
|
||||
"components.Settings.save": "Salvar Mudanças",
|
||||
"components.Settings.runnow": "Executar Agora",
|
||||
"components.Settings.radarrsettings": "Configurações do Radarr",
|
||||
"components.Settings.port": "Porta",
|
||||
"components.Settings.plexsettingsDescription": "Configure os dados de conexão com servidor Plex. Overseerr irá escanear sua biblioteca em intervalos e checar por novo conteúdo.",
|
||||
"components.Settings.plexsettings": "Configurações do Plex",
|
||||
"components.Settings.plexlibrariesDescription": "Bibliotecas que Overseerr irá buscar por títulos. Configure e salve as informações de conexão com Plex e click no botão abaixo se nenhuma biblioteca é listada.",
|
||||
"components.Settings.SettingsAbout.timezone": "Fuso Horário",
|
||||
"components.Settings.SettingsAbout.helppaycoffee": "Ajude a Pagar o Café",
|
||||
"components.Settings.SettingsAbout.supportoverseerr": "Apoie Overseerr",
|
||||
"components.Settings.SettingsAbout.Releases.viewongithub": "Ver no GitHub",
|
||||
"components.Settings.SettingsAbout.Releases.viewchangelog": "Ver Mudanças",
|
||||
"components.Settings.SettingsAbout.Releases.versionChangelog": "Mudanças Nessa Versão",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelopMessage": "As mudanças em sua versão não serão exibidas abaixo. Por favor acesso o <GithubLink> repositório do GitHub</GithubLink> para saber o que mudou.",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelop": "Você está usando uma versão de desenvolvimento do Overseerr!",
|
||||
"components.Settings.SettingsAbout.Releases.releases": "Versões",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "Informações de versão faltando. O GitHub está indisponível?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "Última Versão",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "Versão Atual",
|
||||
"components.TvDetails.request": "Solicitar",
|
||||
"components.TvDetails.recommendationssubtext": "Se você gostou {title}, você provavelmente irá gostar…",
|
||||
"components.TvDetails.recommendations": "Recomendações",
|
||||
"components.TvDetails.pending": "Pendente",
|
||||
"components.TvDetails.overviewunavailable": "Sinopse indisponível",
|
||||
"components.TvDetails.overview": "Sinopse",
|
||||
"components.TvDetails.originallanguage": "Língua original",
|
||||
"components.TvDetails.network": "Estúdio",
|
||||
"components.TvDetails.manageModalTitle": "Gerenciar Séries",
|
||||
"components.TvDetails.manageModalRequests": "Solicitações",
|
||||
"components.TvDetails.manageModalNoRequests": "Nenhuma Solicitação",
|
||||
"components.TvDetails.manageModalClearMedia": "Limpar Todos Dados de Mídia",
|
||||
"components.TvDetails.declinerequests": "Rejeitar {requestCount} {requestCount, plural, one {Solicitação} other {Solicitações}}",
|
||||
"components.TvDetails.decline": "Rejeitar",
|
||||
"components.TvDetails.cast": "Elenco",
|
||||
"components.TvDetails.cancelrequest": "Cancelar Solicitação",
|
||||
"components.TvDetails.available": "Disponível",
|
||||
"components.TvDetails.approverequests": "Aprovar {requestCount} {requestCount, plural, one {Solicitação} other {Solicitações}}",
|
||||
"components.TvDetails.approve": "Aprovar",
|
||||
"components.TvDetails.anime": "Animes",
|
||||
"components.TvDetails.TvCast.fullseriescast": "Elenco Completo da Série",
|
||||
"components.TitleCard.tvshow": "Séries",
|
||||
"components.TitleCard.movie": "Filme",
|
||||
"components.Slider.noresults": "Nenhum Resultado",
|
||||
"components.Setup.welcome": "Bem-Vindo ao Overseerr",
|
||||
"components.Setup.tip": "Dica",
|
||||
"components.Setup.syncingbackground": "A sincronização será executada em segundo plano. Você pode continuar a configuração enquanto isso.",
|
||||
"components.Setup.signinMessage": "Comece fazendo login com sua conta Plex",
|
||||
"components.Setup.loginwithplex": "Entrar com Plex",
|
||||
"components.Setup.finishing": "Finalizando…",
|
||||
"components.Setup.finish": "Finalizar Configurações",
|
||||
"components.TvDetails.requestmore": "Solicitar Mais",
|
||||
"pages.somethingWentWrong": "{statusCode} - Algo deu errado",
|
||||
"pages.serviceUnavailable": "{statusCode} - Serviço Indisponível",
|
||||
"pages.returnHome": "Voltar Para Página Inicial",
|
||||
"pages.oops": "Opa",
|
||||
"pages.internalServerError": "{statusCode} - Erro Interno no Servidor",
|
||||
"i18n.unavailable": "Indisponível",
|
||||
"i18n.tvshows": "Séries",
|
||||
"i18n.processing": "Processando…",
|
||||
"i18n.pending": "Pendente",
|
||||
"i18n.partiallyavailable": "Parcialmente Disponível",
|
||||
"i18n.movies": "Filmes",
|
||||
"i18n.declined": "Rejeitado",
|
||||
"i18n.decline": "Rejeitar",
|
||||
"i18n.close": "Fechar",
|
||||
"i18n.cancel": "Cancelar",
|
||||
"i18n.available": "Disponível",
|
||||
"i18n.approved": "Aprovada",
|
||||
"i18n.approve": "Aprovar",
|
||||
"components.UserList.usertype": "Tipo de Usuário",
|
||||
"components.UserList.username": "Usuário",
|
||||
"components.UserList.userlist": "Lista de Usuários",
|
||||
"components.UserList.userdeleteerror": "Algo deu errado ao apagar usuário",
|
||||
"components.UserList.userdeleted": "Usuário deletado",
|
||||
"components.UserList.user": "Usuário",
|
||||
"components.UserList.totalrequests": "Total de Solicitações",
|
||||
"components.UserList.role": "Privilégio",
|
||||
"components.UserList.plexuser": "Usuário Plex",
|
||||
"components.UserList.lastupdated": "Última Atualização",
|
||||
"components.UserList.edit": "Editar",
|
||||
"components.UserList.deleteuser": "Deletar Usuário",
|
||||
"components.UserList.deleteconfirm": "Tem certeza que deseja deletar esse usuário? Todas informações de solicitação desse usuário serão removidas.",
|
||||
"components.UserList.created": "Criado",
|
||||
"components.UserList.admin": "Administrador",
|
||||
"components.UserEdit.voteDescription": "Concede permissão para votar em solicitações (sistema de votos ainda não implementado)",
|
||||
"components.UserEdit.vote": "Votar",
|
||||
"components.UserEdit.usersaved": "Usuário salvo",
|
||||
"components.UserEdit.usersDescription": "Concede permissão para gerenciar usuários do Overseerr. Usuários com essa permissão não conseguem modificar usuários de Adminitradores ou conceder esse privilégio .",
|
||||
"components.UserEdit.users": "Gerenciar Usuários",
|
||||
"components.UserEdit.username": "Usuário",
|
||||
"components.UserEdit.userfail": "Algo deu errado ao salvar edições do usuário.",
|
||||
"components.UserEdit.settingsDescription": "Concede permissão para modificar todas configurações do Overseerr. Um usuário precisa dessa permissão para concedê-la para outros usuários.",
|
||||
"components.UserEdit.settings": "Gerenciar Configurações",
|
||||
"components.UserEdit.saving": "Salvando…",
|
||||
"components.UserEdit.save": "Salvar",
|
||||
"components.UserEdit.requestDescription": "Concede permissão para solicitar filmes e séries.",
|
||||
"components.UserEdit.request": "Solicitação",
|
||||
"components.UserEdit.permissions": "Permissões",
|
||||
"components.UserEdit.managerequestsDescription": "Concede permissão para gerenciar solicitações no Overseerr. Isso inclui aprová-las e negá-las.",
|
||||
"components.UserEdit.managerequests": "Gerenciar Solicitações",
|
||||
"components.UserEdit.email": "E-mail",
|
||||
"components.UserEdit.edituser": "Editar Usuário",
|
||||
"components.UserEdit.avatar": "Avatar",
|
||||
"components.UserEdit.autoapproveDescription": "Concede aprovação automática para todas as solicitações feitas por este usuário.",
|
||||
"components.UserEdit.autoapprove": "Aprovação Automática",
|
||||
"components.UserEdit.adminDescription": "Acesso total de administrador. Ignora todas as verificações de permissão.",
|
||||
"components.UserEdit.admin": "Administrador",
|
||||
"components.TvDetails.userrating": "Avaliação do usuário",
|
||||
"components.TvDetails.unavailable": "Indisponível",
|
||||
"components.TvDetails.similarsubtext": "Outras séries similares a {title}",
|
||||
"components.TvDetails.similar": "Séries Similares",
|
||||
"components.TvDetails.showtype": "Categoria",
|
||||
"components.TvDetails.manageModalClearMediaWarning": "Isso irá remover em definitivo todos dados de mídia, incluindo todas solicitações para esse item. Se este item existir in sua biblioteca do Plex, os dados de mídia serão recriados na próxima sincronia.",
|
||||
"components.Settings.sonarrSettingsDescription": "Configure sua conexão com Sonarr abaixo. Você pode criar várias, mas apenas duas por vez como padrão (uma para padrão HD, e outra para 4K). Administradores podem alterar qual conexão será usada para novas solicitações.",
|
||||
"components.Settings.radarrSettingsDescription": "Configure sua conexão com Radarr abaixo. Você pode criar várias, mas apenas duas por vez como padrão (uma para padrão HD, e outra para 4K). Administradores podem alterar qual conexão será usada para novas solicitações.",
|
||||
"components.Settings.Notifications.testsent": "Notificação de teste enviada!",
|
||||
"components.Settings.Notifications.test": "Testar",
|
||||
"components.RequestModal.requestseasons": "Solicitar {seasonCount} {seasonCount, plural, one {Temporada} other {Temporadas}}",
|
||||
"components.TvDetails.viewfullcrew": "Ver Toda Equipe Técnica",
|
||||
"components.TvDetails.TvCrew.fullseriescrew": "Equipe Técnica Completa da Série",
|
||||
"components.PersonDetails.crewmember": "Membro da Equipe Técnica",
|
||||
"components.MovieDetails.viewfullcrew": "Ver Equipe Técnica Completa",
|
||||
"components.MovieDetails.MovieCrew.fullcrew": "Equipe Técnica Completa",
|
||||
"components.UserList.importfromplexerror": "Algo deu errado ao importar usuários do Plex",
|
||||
"components.UserList.importfromplex": "Importar Usuários do Plex",
|
||||
"components.UserList.importedfromplex": "{userCount, plural, =0 {Nenhum novo usuário} one {# novo usuário} other {# novos usuários}} importado(s) do Plex",
|
||||
"components.Settings.defaultPermissions": "Permissões Padrões de Usúarios"
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"components.Settings.menuJobs": "Jobb",
|
||||
"components.Settings.menuGeneralSettings": "Generella Inställningar",
|
||||
"components.Settings.menuAbout": "Om",
|
||||
"components.Settings.manualscanDescription": "Normalt körs denna var sjätte timme. Overseerr kommer kontrollera till Plex Servers \"senast tillagda\" oftare. Om detta är första gången du konfigurerar din Plex Server är det starkt rekommenderat att göra en manuell full scan av ditt mediabibliotek!",
|
||||
"components.Settings.manualscanDescription": "Normalt körs denna var tjugofjärde timme. Overseerr kommer kontrollera till Plex Servers \"senast tillagda\" oftare. Om detta är första gången du konfigurerar din Plex Server är det starkt rekommenderat att göra en manuell full scan av ditt mediabibliotek!",
|
||||
"components.Settings.manualscan": "Manuell Biblioteksscan",
|
||||
"components.Settings.librariesRemaining": "Kvarvarande Bibliotek: {count}",
|
||||
"components.Settings.jobname": "Jobbnamn",
|
||||
@@ -51,7 +51,7 @@
|
||||
"components.Settings.generalsettings": "Generella Inställningar",
|
||||
"components.Settings.edit": "Ändra",
|
||||
"components.Settings.deleteserverconfirm": "Är du säker på att du vill radera servern?",
|
||||
"components.Settings.delete": "Radera",
|
||||
"components.Settings.delete": "Ta bort",
|
||||
"components.Settings.default4k": "Standard 4K",
|
||||
"components.Settings.default": "Standard",
|
||||
"components.Settings.currentlibrary": "Nuvarande Bibliotek: {name}",
|
||||
@@ -162,7 +162,7 @@
|
||||
"components.Settings.Notifications.discordsettingssaved": "Notiferingsinställningar för Discord sparade!",
|
||||
"components.Settings.Notifications.authUser": "Användarnamn",
|
||||
"components.Settings.Notifications.authPass": "Lösenord",
|
||||
"components.Settings.Notifications.agentenabled": "Agent Aktiverad",
|
||||
"components.Settings.Notifications.agentenabled": "Aktiverad",
|
||||
"components.Search.searchresults": "Sökresultat",
|
||||
"components.RequestModal.status": "Status",
|
||||
"components.RequestModal.selectseason": "Välj säsong(er)",
|
||||
@@ -185,7 +185,7 @@
|
||||
"components.RequestModal.cancel": "Avbryt förfrågan",
|
||||
"components.RequestList.status": "Status",
|
||||
"components.RequestList.showingresults": "Visar <strong>{from}</strong> till <strong>{to}</strong> av <strong>{total}</strong> sökresultat",
|
||||
"components.RequestList.requests": "Förfrågan",
|
||||
"components.RequestList.requests": "Förfrågningar",
|
||||
"components.RequestList.requestedAt": "Begärd",
|
||||
"components.RequestList.previous": "Föregående",
|
||||
"components.RequestList.next": "Nästa",
|
||||
@@ -255,7 +255,7 @@
|
||||
"components.TvDetails.approve": "Godkänn",
|
||||
"components.TvDetails.anime": "Anime",
|
||||
"components.TvDetails.TvCast.fullseriescast": "Rollista",
|
||||
"components.TitleCard.tvshow": "TV-serier",
|
||||
"components.TitleCard.tvshow": "TV-serie",
|
||||
"components.TitleCard.movie": "Film",
|
||||
"components.Slider.noresults": "Inga resultat",
|
||||
"components.Setup.welcome": "Välkommen till Overseerr",
|
||||
@@ -276,8 +276,8 @@
|
||||
"i18n.pending": "Väntande",
|
||||
"i18n.partiallyavailable": "Delvis Tillgänglig",
|
||||
"i18n.movies": "Filmer",
|
||||
"i18n.deleting": "Raderar…",
|
||||
"i18n.delete": "Radera",
|
||||
"i18n.deleting": "Tar bort…",
|
||||
"i18n.delete": "Ta bort",
|
||||
"i18n.declined": "Avböjd",
|
||||
"i18n.decline": "Avböj",
|
||||
"i18n.cancel": "Avbryt",
|
||||
@@ -292,12 +292,12 @@
|
||||
"components.UserList.user": "Användare",
|
||||
"components.UserList.totalrequests": "Totalt antal förfrågningar",
|
||||
"components.UserList.role": "Roll",
|
||||
"components.UserList.plexuser": "Plexanvändare",
|
||||
"components.UserList.plexuser": "Plex",
|
||||
"components.UserList.lastupdated": "Senast uppdaterad",
|
||||
"components.UserList.edit": "Redigera",
|
||||
"components.UserList.deleteuser": "Ta bort användare",
|
||||
"components.UserList.deleteconfirm": "Är du säker på att du vill ta bort användaren? All data för användaren kommer att raderas.",
|
||||
"components.UserList.delete": "Radera",
|
||||
"components.UserList.delete": "Ta bort",
|
||||
"components.UserList.created": "Skapad",
|
||||
"components.UserList.admin": "Administratör",
|
||||
"components.UserEdit.voteDescription": "Ger behörighet att rösta på förfrågningar (röstning är inte implementerat ännu)",
|
||||
@@ -346,5 +346,23 @@
|
||||
"components.TvDetails.decline": "Avböj",
|
||||
"components.TvDetails.cast": "Roller",
|
||||
"components.TvDetails.cancelrequest": "Avbryt begäran",
|
||||
"components.TvDetails.available": "Tillgänglig"
|
||||
"components.TvDetails.available": "Tillgänglig",
|
||||
"i18n.close": "Stäng",
|
||||
"components.TvDetails.approverequests": "Godkänn {requestCount} {requestCount, plural, one {Request} other {Requests}}",
|
||||
"components.Setup.loginwithplex": "Logga in med Plex",
|
||||
"components.Settings.SettingsAbout.timezone": "Tidzon",
|
||||
"components.Settings.SettingsAbout.supportoverseerr": "Hjälp Overseerr",
|
||||
"components.Settings.SettingsAbout.helppaycoffee": "Stötta med en kopp kaffe",
|
||||
"components.Settings.SettingsAbout.Releases.viewongithub": "Visa på GitHub",
|
||||
"components.Settings.SettingsAbout.Releases.viewchangelog": "Visa ändringslogg",
|
||||
"components.Settings.SettingsAbout.Releases.versionChangelog": "Ändringslogg",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelopMessage": "Ändringarna nedan är inte tillgängliga i din version. Vänligen se <GithubLink>GitHub repository</GithubLink> för dom senaste uppdateringarna.",
|
||||
"components.Settings.SettingsAbout.Releases.runningDevelop": "Du kör en utvecklingsversion av Overseerr!",
|
||||
"components.Settings.SettingsAbout.Releases.releases": "Versioner",
|
||||
"components.Settings.SettingsAbout.Releases.releasedataMissing": "Versionsdata saknas. Ligger GitHub nere?",
|
||||
"components.Settings.SettingsAbout.Releases.latestversion": "Senaste Version",
|
||||
"components.Settings.SettingsAbout.Releases.currentversion": "Aktuell Version",
|
||||
"components.Settings.Notifications.testsent": "Test-notifikation skickad!",
|
||||
"components.Settings.Notifications.test": "Testa",
|
||||
"components.UserList.importfromplex": "Importera användare från Plex"
|
||||
}
|
||||
|
||||
38
src/pages/collection/[collectionId]/index.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import React from 'react';
|
||||
import { GetServerSideProps, NextPage } from 'next';
|
||||
import type { Collection } from '../../../../server/models/Collection';
|
||||
import axios from 'axios';
|
||||
import { parseCookies } from 'nookies';
|
||||
import CollectionDetails from '../../../components/CollectionDetails';
|
||||
|
||||
interface CollectionPageProps {
|
||||
collection?: Collection;
|
||||
}
|
||||
|
||||
const CollectionPage: NextPage<CollectionPageProps> = ({ collection }) => {
|
||||
return <CollectionDetails collection={collection} />;
|
||||
};
|
||||
|
||||
export const getServerSideProps: GetServerSideProps<CollectionPageProps> = async (
|
||||
ctx
|
||||
) => {
|
||||
const cookies = parseCookies(ctx);
|
||||
const response = await axios.get<Collection>(
|
||||
`http://localhost:${process.env.PORT || 5055}/api/v1/collection/${
|
||||
ctx.query.collectionId
|
||||
}${cookies.locale ? `?language=${cookies.locale}` : ''}`,
|
||||
{
|
||||
headers: ctx.req?.headers?.cookie
|
||||
? { cookie: ctx.req.headers.cookie }
|
||||
: undefined,
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
props: {
|
||||
collection: response.data,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default CollectionPage;
|
||||
9
src/pages/movie/[movieId]/crew.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { NextPage } from 'next';
|
||||
import React from 'react';
|
||||
import MovieCrew from '../../../components/MovieDetails/MovieCrew';
|
||||
|
||||
const MovieCrewPage: NextPage = () => {
|
||||
return <MovieCrew />;
|
||||
};
|
||||
|
||||
export default MovieCrewPage;
|
||||