Skip to content

Commit

Permalink
refactor: switch from Axios for Fetch API (#840)
Browse files Browse the repository at this point in the history
* refactor: switch ExternalAPI to Fetch API

* fix: add missing auth token in Plex request

* fix: send proper URL params

* ci: try to fix format checker

* ci: ci: try to fix format checker

* ci: try to fix format checker

* refactor: make tautulli use the ExternalAPI class

* refactor: add rate limit to fetch api

* refactor: add rate limit to fetch api

* refactor: switch server from axios to fetch api

* refactor: switch frontend from axios to fetch api

* fix: switch from URL objects to strings

* fix: use the right search params for ExternalAPI

* fix: better log for ExternalAPI errors

* feat: add retry to external API requests

* fix: try to fix network errors with IPv6

* fix: imageProxy rate limit

* revert: remove retry to external API requests

* feat: set IPv4 first as an option

* fix(jellyfinapi): add missing argument in JellyfinAPI constructor

* refactor: clean the rate limit utility
  • Loading branch information
gauthier-th authored Jul 14, 2024
1 parent ae955e9 commit b36bb3f
Show file tree
Hide file tree
Showing 100 changed files with 5,383 additions and 10,873 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pnpm-lock.yaml
# assets
src/assets/
public/
docs/
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ module.exports = {
singleQuote: true,
trailingComma: 'es5',
overrides: [
{
files: 'pnpm-lock.yaml',
options: {
rangeEnd: 0, // default: Infinity
},
},
{
files: 'gen-docs/pnpm-lock.yaml',
options: {
Expand Down
7 changes: 5 additions & 2 deletions docs/getting-started/buildfromsource.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pnpm start
```
</TabItem>
</Tabs>

:::info
You can now access Jellyseerr by visiting `http://localhost:5055` in your web browser.
:::
Expand All @@ -99,6 +99,9 @@ PORT=5055

## Uncomment if your media server is emby instead of jellyfin.
# JELLYFIN_TYPE=emby

## Uncomment if you want to force Node.js to resolve IPv4 before IPv6 (advanced users only)
# FORCE_IPV4_FIRST=true
```
2. Then run the following commands:
```bash
Expand Down Expand Up @@ -312,7 +315,7 @@ node dist/index.js

Now, Jellyseerr will start when the computer boots up in the background.
</TabItem>

<TabItem value="nssm" label="NSSM">
To run jellyseerr as a service:
1. Download the [Non-Sucking Service Manager](https://nssm.cc/download)
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
module.exports = {
env: {
commitTag: process.env.COMMIT_TAG || 'local',
forceIpv4First: process.env.FORCE_IPV4_FIRST === 'true' ? 'true' : 'false',
},
publicRuntimeConfig: {
// Will be available on both server and client
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
"@svgr/webpack": "6.5.1",
"@tanem/react-nprogress": "5.0.30",
"ace-builds": "1.15.2",
"axios": "1.3.4",
"axios-rate-limit": "1.3.0",
"bcrypt": "5.1.0",
"bowser": "2.11.0",
"connect-typeorm": "1.1.4",
Expand Down Expand Up @@ -121,7 +119,7 @@
"@types/express": "4.17.17",
"@types/express-session": "1.17.6",
"@types/lodash": "4.14.191",
"@types/node": "17.0.36",
"@types/node": "20.14.8",
"@types/node-schedule": "2.1.0",
"@types/nodemailer": "6.4.7",
"@types/react": "^18.3.3",
Expand Down
Loading

0 comments on commit b36bb3f

Please sign in to comment.