From aa86809dc93499e9897aa5f56b457ac3d492a4e1 Mon Sep 17 00:00:00 2001 From: sct Date: Thu, 13 May 2021 23:48:08 +0900 Subject: [PATCH] style: bump prettier and format app --- .gitbook.yaml | 4 +- .github/FUNDING.yml | 2 +- package.json | 2 +- server/lib/notifications/agents/discord.ts | 10 ++--- server/lib/notifications/agents/email.ts | 3 +- server/lib/notifications/agents/lunasea.ts | 3 +- server/lib/notifications/agents/pushbullet.ts | 3 +- server/lib/notifications/agents/pushover.ts | 12 ++---- server/lib/notifications/agents/slack.ts | 3 +- server/lib/notifications/agents/telegram.ts | 3 +- server/lib/notifications/agents/webhook.ts | 3 +- server/lib/notifications/agents/webpush.ts | 3 +- server/lib/scanners/baseScanner.ts | 20 ++++------ server/lib/scanners/plex/index.ts | 3 +- server/lib/scanners/radarr/index.ts | 3 +- server/lib/scanners/sonarr/index.ts | 3 +- ...8217312474-AddUserRequestDeleteCascades.ts | 3 +- .../1608477467935-AddLastSeasonChangeMedia.ts | 3 +- ...477467936-ForceDropImdbUniqueConstraint.ts | 3 +- ...9236552057-RemoveTmdbIdUniqueConstraint.ts | 3 +- ...1610522845513-AddMediaAddedFieldToMedia.ts | 3 +- ...757511674-SonarrRadarrSyncServiceFields.ts | 3 +- ...78137-AddResetPasswordGuidAndExpiryDate.ts | 3 +- ...1613955393450-UpdateUserSettingsRegions.ts | 3 +- ...95680-AddTelegramSettingsToUserSettings.ts | 3 +- ...624225464-CreateTagsFieldonMediaRequest.ts | 3 +- ...-AddUserSettingsNotificationAgentsField.ts | 3 +- ...18912653565-CreateUserPushSubscriptions.ts | 3 +- ...817343-AddUserSettingsNotificationTypes.ts | 3 +- server/routes/media.ts | 6 +-- snap/snapcraft.yaml | 40 +++++++++---------- src/components/CollectionDetails/index.tsx | 5 +-- src/components/Discover/index.tsx | 12 +++--- .../Layout/LanguagePicker/index.tsx | 8 ++-- src/components/MovieDetails/index.tsx | 7 ++-- src/components/PersonDetails/index.tsx | 10 ++--- .../RequestList/RequestItem/index.tsx | 13 +++--- .../RequestModal/AdvancedRequester/index.tsx | 28 ++++++------- .../RequestModal/MovieRequestModal.tsx | 6 +-- .../RequestModal/TvRequestModal.tsx | 6 +-- .../NotificationsPushover/index.tsx | 27 ++++++------- src/components/Settings/SettingsMain.tsx | 8 ++-- src/components/Settings/SettingsPlex.tsx | 5 +-- src/components/TvDetails/index.tsx | 12 +++--- src/components/UserList/index.tsx | 13 +++--- .../UserGeneralSettings/index.tsx | 8 ++-- src/hooks/useVerticalScroll.ts | 5 +-- src/pages/collection/[collectionId]/index.tsx | 35 ++++++++-------- src/utils/plex.ts | 10 ++--- yarn.lock | 8 ++-- 50 files changed, 196 insertions(+), 195 deletions(-) diff --git a/.gitbook.yaml b/.gitbook.yaml index 6c5133ed..2b0a6c4e 100644 --- a/.gitbook.yaml +++ b/.gitbook.yaml @@ -1,5 +1,5 @@ root: ./docs ​structure: - readme: README.md - summary: SUMMARY.md​ + readme: README.md + summary: SUMMARY.md​ diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 9d966899..6b2dc700 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ -github: [sct] +github: [sct] patreon: overseerr diff --git a/package.json b/package.json index 1cacbf48..3f93ce58 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "lint-staged": "^11.0.0", "nodemon": "^2.0.7", "postcss": "^8.2.15", - "prettier": "^2.2.1", + "prettier": "^2.3.0", "semantic-release": "^17.4.3", "semantic-release-docker-buildx": "^1.0.1", "tailwindcss": "^2.1.2", diff --git a/server/lib/notifications/agents/discord.ts b/server/lib/notifications/agents/discord.ts index 1b79f7e3..f88d8b88 100644 --- a/server/lib/notifications/agents/discord.ts +++ b/server/lib/notifications/agents/discord.ts @@ -91,7 +91,8 @@ interface DiscordWebhookPayload { class DiscordAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentDiscord { if (this.settings) { return this.settings; @@ -217,11 +218,8 @@ class DiscordAgent let content = undefined; try { - const { - botUsername, - botAvatarUrl, - webhookUrl, - } = this.getSettings().options; + const { botUsername, botAvatarUrl, webhookUrl } = + this.getSettings().options; if (!webhookUrl) { return false; diff --git a/server/lib/notifications/agents/email.ts b/server/lib/notifications/agents/email.ts index d3f34186..56401c0d 100644 --- a/server/lib/notifications/agents/email.ts +++ b/server/lib/notifications/agents/email.ts @@ -16,7 +16,8 @@ import { BaseAgent, NotificationAgent, NotificationPayload } from './agent'; class EmailAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentEmail { if (this.settings) { return this.settings; diff --git a/server/lib/notifications/agents/lunasea.ts b/server/lib/notifications/agents/lunasea.ts index 9fc332f6..24fa5f44 100644 --- a/server/lib/notifications/agents/lunasea.ts +++ b/server/lib/notifications/agents/lunasea.ts @@ -7,7 +7,8 @@ import { BaseAgent, NotificationAgent, NotificationPayload } from './agent'; class LunaSeaAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentLunaSea { if (this.settings) { return this.settings; diff --git a/server/lib/notifications/agents/pushbullet.ts b/server/lib/notifications/agents/pushbullet.ts index ab4b811e..02431fcd 100644 --- a/server/lib/notifications/agents/pushbullet.ts +++ b/server/lib/notifications/agents/pushbullet.ts @@ -12,7 +12,8 @@ interface PushbulletPayload { class PushbulletAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentPushbullet { if (this.settings) { return this.settings; diff --git a/server/lib/notifications/agents/pushover.ts b/server/lib/notifications/agents/pushover.ts index 858da0c6..0c38b1bd 100644 --- a/server/lib/notifications/agents/pushover.ts +++ b/server/lib/notifications/agents/pushover.ts @@ -18,7 +18,8 @@ interface PushoverPayload { class PushoverAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentPushover { if (this.settings) { return this.settings; @@ -170,13 +171,8 @@ class PushoverAgent const { accessToken, userToken } = this.getSettings().options; - const { - title, - message, - url, - url_title, - priority, - } = this.constructMessageDetails(type, payload); + const { title, message, url, url_title, priority } = + this.constructMessageDetails(type, payload); await axios.post(endpoint, { token: accessToken, diff --git a/server/lib/notifications/agents/slack.ts b/server/lib/notifications/agents/slack.ts index 7004fe4b..40ace37e 100644 --- a/server/lib/notifications/agents/slack.ts +++ b/server/lib/notifications/agents/slack.ts @@ -43,7 +43,8 @@ interface SlackBlockEmbed { class SlackAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentSlack { if (this.settings) { return this.settings; diff --git a/server/lib/notifications/agents/telegram.ts b/server/lib/notifications/agents/telegram.ts index 1a22ddce..c62e7027 100644 --- a/server/lib/notifications/agents/telegram.ts +++ b/server/lib/notifications/agents/telegram.ts @@ -26,7 +26,8 @@ interface TelegramPhotoPayload { class TelegramAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ private baseUrl = 'https://api.telegram.org/'; protected getSettings(): NotificationAgentTelegram { diff --git a/server/lib/notifications/agents/webhook.ts b/server/lib/notifications/agents/webhook.ts index 7d8cbd86..946bd3f7 100644 --- a/server/lib/notifications/agents/webhook.ts +++ b/server/lib/notifications/agents/webhook.ts @@ -40,7 +40,8 @@ const KeyMap: Record = { class WebhookAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentWebhook { if (this.settings) { return this.settings; diff --git a/server/lib/notifications/agents/webpush.ts b/server/lib/notifications/agents/webpush.ts index fb337670..6af5b2bb 100644 --- a/server/lib/notifications/agents/webpush.ts +++ b/server/lib/notifications/agents/webpush.ts @@ -26,7 +26,8 @@ interface PushNotificationPayload { class WebPushAgent extends BaseAgent - implements NotificationAgent { + implements NotificationAgent +{ protected getSettings(): NotificationAgentConfig { if (this.settings) { return this.settings; diff --git a/server/lib/scanners/baseScanner.ts b/server/lib/scanners/baseScanner.ts index b7e36547..1adbad48 100644 --- a/server/lib/scanners/baseScanner.ts +++ b/server/lib/scanners/baseScanner.ts @@ -145,9 +145,8 @@ class BaseScanner { existing[is4k ? 'externalServiceId4k' : 'externalServiceId'] !== externalServiceId ) { - existing[ - is4k ? 'externalServiceId4k' : 'externalServiceId' - ] = externalServiceId; + existing[is4k ? 'externalServiceId4k' : 'externalServiceId'] = + externalServiceId; changedExisting = true; } @@ -156,9 +155,8 @@ class BaseScanner { existing[is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'] !== externalServiceSlug ) { - existing[ - is4k ? 'externalServiceSlug4k' : 'externalServiceSlug' - ] = externalServiceSlug; + existing[is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'] = + externalServiceSlug; changedExisting = true; } @@ -389,15 +387,13 @@ class BaseScanner { } if (externalServiceId !== undefined) { - media[ - is4k ? 'externalServiceId4k' : 'externalServiceId' - ] = externalServiceId; + media[is4k ? 'externalServiceId4k' : 'externalServiceId'] = + externalServiceId; } if (externalServiceSlug !== undefined) { - media[ - is4k ? 'externalServiceSlug4k' : 'externalServiceSlug' - ] = externalServiceSlug; + media[is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'] = + externalServiceSlug; } // If the show is already available, and there are no new seasons, dont adjust diff --git a/server/lib/scanners/plex/index.ts b/server/lib/scanners/plex/index.ts index dc136900..5a4bfc08 100644 --- a/server/lib/scanners/plex/index.ts +++ b/server/lib/scanners/plex/index.ts @@ -30,7 +30,8 @@ type SyncStatus = StatusBase & { class PlexScanner extends BaseScanner - implements RunnableScanner { + implements RunnableScanner +{ private plexClient: PlexAPI; private libraries: Library[]; private currentLibrary: Library; diff --git a/server/lib/scanners/radarr/index.ts b/server/lib/scanners/radarr/index.ts index 4c4e6e7f..71d687dc 100644 --- a/server/lib/scanners/radarr/index.ts +++ b/server/lib/scanners/radarr/index.ts @@ -10,7 +10,8 @@ type SyncStatus = StatusBase & { class RadarrScanner extends BaseScanner - implements RunnableScanner { + implements RunnableScanner +{ private servers: RadarrSettings[]; private currentServer: RadarrSettings; private radarrApi: RadarrAPI; diff --git a/server/lib/scanners/sonarr/index.ts b/server/lib/scanners/sonarr/index.ts index 73500db9..db3aef98 100644 --- a/server/lib/scanners/sonarr/index.ts +++ b/server/lib/scanners/sonarr/index.ts @@ -16,7 +16,8 @@ type SyncStatus = StatusBase & { class SonarrScanner extends BaseScanner - implements RunnableScanner { + implements RunnableScanner +{ private servers: SonarrSettings[]; private currentServer: SonarrSettings; private sonarrApi: SonarrAPI; diff --git a/server/migration/1608217312474-AddUserRequestDeleteCascades.ts b/server/migration/1608217312474-AddUserRequestDeleteCascades.ts index ce3de849..e2aa8865 100644 --- a/server/migration/1608217312474-AddUserRequestDeleteCascades.ts +++ b/server/migration/1608217312474-AddUserRequestDeleteCascades.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddUserRequestDeleteCascades1608219049304 - implements MigrationInterface { + implements MigrationInterface +{ name = 'AddUserRequestDeleteCascades1608219049304'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1608477467935-AddLastSeasonChangeMedia.ts b/server/migration/1608477467935-AddLastSeasonChangeMedia.ts index 89bb4317..fba7af7f 100644 --- a/server/migration/1608477467935-AddLastSeasonChangeMedia.ts +++ b/server/migration/1608477467935-AddLastSeasonChangeMedia.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddLastSeasonChangeMedia1608477467935 - implements MigrationInterface { + implements MigrationInterface +{ name = 'AddLastSeasonChangeMedia1608477467935'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1608477467936-ForceDropImdbUniqueConstraint.ts b/server/migration/1608477467936-ForceDropImdbUniqueConstraint.ts index 9cd006ec..6a109e4d 100644 --- a/server/migration/1608477467936-ForceDropImdbUniqueConstraint.ts +++ b/server/migration/1608477467936-ForceDropImdbUniqueConstraint.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class ForceDropImdbUniqueConstraint1608477467935 - implements MigrationInterface { + implements MigrationInterface +{ name = 'ForceDropImdbUniqueConstraint1608477467936'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1609236552057-RemoveTmdbIdUniqueConstraint.ts b/server/migration/1609236552057-RemoveTmdbIdUniqueConstraint.ts index 0be26699..2cd5415e 100644 --- a/server/migration/1609236552057-RemoveTmdbIdUniqueConstraint.ts +++ b/server/migration/1609236552057-RemoveTmdbIdUniqueConstraint.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class RemoveTmdbIdUniqueConstraint1609236552057 - implements MigrationInterface { + implements MigrationInterface +{ name = 'RemoveTmdbIdUniqueConstraint1609236552057'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1610522845513-AddMediaAddedFieldToMedia.ts b/server/migration/1610522845513-AddMediaAddedFieldToMedia.ts index 78dbc06e..25e42a74 100644 --- a/server/migration/1610522845513-AddMediaAddedFieldToMedia.ts +++ b/server/migration/1610522845513-AddMediaAddedFieldToMedia.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddMediaAddedFieldToMedia1610522845513 - implements MigrationInterface { + implements MigrationInterface +{ name = 'AddMediaAddedFieldToMedia1610522845513'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1611757511674-SonarrRadarrSyncServiceFields.ts b/server/migration/1611757511674-SonarrRadarrSyncServiceFields.ts index 49f47e40..355384a0 100644 --- a/server/migration/1611757511674-SonarrRadarrSyncServiceFields.ts +++ b/server/migration/1611757511674-SonarrRadarrSyncServiceFields.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class SonarrRadarrSyncServiceFields1611757511674 - implements MigrationInterface { + implements MigrationInterface +{ name = 'SonarrRadarrSyncServiceFields1611757511674'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1612482778137-AddResetPasswordGuidAndExpiryDate.ts b/server/migration/1612482778137-AddResetPasswordGuidAndExpiryDate.ts index 01278c01..7d191d10 100644 --- a/server/migration/1612482778137-AddResetPasswordGuidAndExpiryDate.ts +++ b/server/migration/1612482778137-AddResetPasswordGuidAndExpiryDate.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddResetPasswordGuidAndExpiryDate1612482778137 - implements MigrationInterface { + implements MigrationInterface +{ name = 'AddResetPasswordGuidAndExpiryDate1612482778137'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1613955393450-UpdateUserSettingsRegions.ts b/server/migration/1613955393450-UpdateUserSettingsRegions.ts index 17c25ec2..d33df4ee 100644 --- a/server/migration/1613955393450-UpdateUserSettingsRegions.ts +++ b/server/migration/1613955393450-UpdateUserSettingsRegions.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class UpdateUserSettingsRegions1613955393450 - implements MigrationInterface { + implements MigrationInterface +{ name = 'UpdateUserSettingsRegions1613955393450'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1614334195680-AddTelegramSettingsToUserSettings.ts b/server/migration/1614334195680-AddTelegramSettingsToUserSettings.ts index 1e0175cc..5e480d48 100644 --- a/server/migration/1614334195680-AddTelegramSettingsToUserSettings.ts +++ b/server/migration/1614334195680-AddTelegramSettingsToUserSettings.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddTelegramSettingsToUserSettings1614334195680 - implements MigrationInterface { + implements MigrationInterface +{ name = 'AddTelegramSettingsToUserSettings1614334195680'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1617624225464-CreateTagsFieldonMediaRequest.ts b/server/migration/1617624225464-CreateTagsFieldonMediaRequest.ts index c8bd6dd4..d498a8b1 100644 --- a/server/migration/1617624225464-CreateTagsFieldonMediaRequest.ts +++ b/server/migration/1617624225464-CreateTagsFieldonMediaRequest.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class CreateTagsFieldonMediaRequest1617624225464 - implements MigrationInterface { + implements MigrationInterface +{ name = 'CreateTagsFieldonMediaRequest1617624225464'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1617730837489-AddUserSettingsNotificationAgentsField.ts b/server/migration/1617730837489-AddUserSettingsNotificationAgentsField.ts index 86a52c08..79cd061b 100644 --- a/server/migration/1617730837489-AddUserSettingsNotificationAgentsField.ts +++ b/server/migration/1617730837489-AddUserSettingsNotificationAgentsField.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddUserSettingsNotificationAgentsField1617730837489 - implements MigrationInterface { + implements MigrationInterface +{ name = 'AddUserSettingsNotificationAgentsField1617730837489'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1618912653565-CreateUserPushSubscriptions.ts b/server/migration/1618912653565-CreateUserPushSubscriptions.ts index 90ea0d3f..539221d1 100644 --- a/server/migration/1618912653565-CreateUserPushSubscriptions.ts +++ b/server/migration/1618912653565-CreateUserPushSubscriptions.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class CreateUserPushSubscriptions1618912653565 - implements MigrationInterface { + implements MigrationInterface +{ name = 'CreateUserPushSubscriptions1618912653565'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/migration/1619339817343-AddUserSettingsNotificationTypes.ts b/server/migration/1619339817343-AddUserSettingsNotificationTypes.ts index 67d77072..cccdae2f 100644 --- a/server/migration/1619339817343-AddUserSettingsNotificationTypes.ts +++ b/server/migration/1619339817343-AddUserSettingsNotificationTypes.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddUserSettingsNotificationTypes1619339817343 - implements MigrationInterface { + implements MigrationInterface +{ name = 'AddUserSettingsNotificationTypes1619339817343'; public async up(queryRunner: QueryRunner): Promise { diff --git a/server/routes/media.ts b/server/routes/media.ts index c77f7708..34819782 100644 --- a/server/routes/media.ts +++ b/server/routes/media.ts @@ -15,10 +15,8 @@ mediaRoutes.get('/', async (req, res, next) => { const pageSize = req.query.take ? Number(req.query.take) : 20; const skip = req.query.skip ? Number(req.query.skip) : 0; - let statusFilter: - | MediaStatus - | FindOperator - | undefined = undefined; + let statusFilter: MediaStatus | FindOperator | undefined = + undefined; switch (req.query.filter) { case 'available': diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 0d73f8ad..0f03c059 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -11,22 +11,22 @@ confinement: strict parts: overseerr: plugin: nodejs - nodejs-version: "14.16.1" - nodejs-package-manager: "yarn" + nodejs-version: '14.16.1' + nodejs-package-manager: 'yarn' nodejs-yarn-version: v1.22.10 build-packages: - git - on arm64: - - build-essential - - automake - - python-gi - - python-gi-dev + - build-essential + - automake + - python-gi + - python-gi-dev - on armhf: - - libatomic1 - - build-essential - - automake - - python-gi - - python-gi-dev + - libatomic1 + - build-essential + - automake + - python-gi + - python-gi-dev source: . override-pull: | snapcraftctl pull @@ -56,7 +56,7 @@ parts: snapcraftctl set-version "$SNAP_VERSION" snapcraftctl set-grade "$GRADE" build-environment: - - PATH: "$SNAPCRAFT_PART_BUILD/node_modules/.bin:$SNAPCRAFT_PART_BUILD/../npm/bin:$PATH" + - PATH: '$SNAPCRAFT_PART_BUILD/node_modules/.bin:$SNAPCRAFT_PART_BUILD/../npm/bin:$PATH' override-build: | set -e # Set COMMIT_TAG before the build begins @@ -72,11 +72,9 @@ parts: rm -rf $SNAPCRAFT_PART_INSTALL/.github && rm $SNAPCRAFT_PART_INSTALL/.gitbook.yaml stage-packages: - on armhf: - - libatomic1 - stage: - [ .next, ./* ] - prime: - [ .next, ./* ] + - libatomic1 + stage: [.next, ./*] + prime: [.next, ./*] apps: deamon: @@ -89,8 +87,8 @@ apps: - network - network-bind environment: - PATH: "$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH" - OVERSEERR_SNAP: "True" + PATH: '$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH' + OVERSEERR_SNAP: 'True' CONFIG_DIRECTORY: $SNAP_USER_COMMON - LOG_LEVEL: "debug" - NODE_ENV: "production" + LOG_LEVEL: 'debug' + NODE_ENV: 'production' diff --git a/src/components/CollectionDetails/index.tsx b/src/components/CollectionDetails/index.tsx index 180bd2ed..56b368d9 100644 --- a/src/components/CollectionDetails/index.tsx +++ b/src/components/CollectionDetails/index.tsx @@ -60,9 +60,8 @@ const CollectionDetails: React.FC = ({ } ); - const { data: genres } = useSWR<{ id: number; name: string }[]>( - `/api/v1/genres/movie` - ); + const { data: genres } = + useSWR<{ id: number; name: string }[]>(`/api/v1/genres/movie`); if (!data && !error) { return ; diff --git a/src/components/Discover/index.tsx b/src/components/Discover/index.tsx index 0d7b1da7..3ebd6226 100644 --- a/src/components/Discover/index.tsx +++ b/src/components/Discover/index.tsx @@ -35,13 +35,11 @@ const Discover: React.FC = () => { { revalidateOnMount: true } ); - const { - data: requests, - error: requestError, - } = useSWR( - '/api/v1/request?filter=all&take=10&sort=modified&skip=0', - { revalidateOnMount: true } - ); + const { data: requests, error: requestError } = + useSWR( + '/api/v1/request?filter=all&take=10&sort=modified&skip=0', + { revalidateOnMount: true } + ); return ( <> diff --git a/src/components/Layout/LanguagePicker/index.tsx b/src/components/Layout/LanguagePicker/index.tsx index cd589dde..71a1db36 100644 --- a/src/components/Layout/LanguagePicker/index.tsx +++ b/src/components/Layout/LanguagePicker/index.tsx @@ -65,9 +65,11 @@ const LanguagePicker: React.FC = () => { } defaultValue={locale} > - {(Object.keys( - availableLanguages - ) as (keyof typeof availableLanguages)[]).map((key) => ( + {( + Object.keys( + availableLanguages + ) as (keyof typeof availableLanguages)[] + ).map((key) => ( diff --git a/src/components/MovieDetails/index.tsx b/src/components/MovieDetails/index.tsx index eb7de776..242c3fdf 100644 --- a/src/components/MovieDetails/index.tsx +++ b/src/components/MovieDetails/index.tsx @@ -98,9 +98,10 @@ const MovieDetails: React.FC = ({ movie }) => { `/api/v1/movie/${router.query.movieId}/ratings` ); - const sortedCrew = useMemo(() => sortCrewPriority(data?.credits.crew ?? []), [ - data, - ]); + const sortedCrew = useMemo( + () => sortCrewPriority(data?.credits.crew ?? []), + [data] + ); if (!data && !error) { return ; diff --git a/src/components/PersonDetails/index.tsx b/src/components/PersonDetails/index.tsx index 3ea148c0..82391445 100644 --- a/src/components/PersonDetails/index.tsx +++ b/src/components/PersonDetails/index.tsx @@ -32,12 +32,10 @@ const PersonDetails: React.FC = () => { ); const [showBio, setShowBio] = useState(false); - const { - data: combinedCredits, - error: errorCombinedCredits, - } = useSWR( - `/api/v1/person/${router.query.personId}/combined_credits` - ); + const { data: combinedCredits, error: errorCombinedCredits } = + useSWR( + `/api/v1/person/${router.query.personId}/combined_credits` + ); const sortedCast = useMemo(() => { const grouped = groupBy(combinedCredits?.cast ?? [], 'id'); diff --git a/src/components/RequestList/RequestItem/index.tsx b/src/components/RequestList/RequestItem/index.tsx index 8127eeb2..3c4fbd30 100644 --- a/src/components/RequestList/RequestItem/index.tsx +++ b/src/components/RequestList/RequestItem/index.tsx @@ -106,12 +106,13 @@ const RequestItem: React.FC = ({ const { data: title, error } = useSWR( inView ? `${url}` : null ); - const { data: requestData, revalidate, mutate } = useSWR( - `/api/v1/request/${request.id}`, - { - initialData: request, - } - ); + const { + data: requestData, + revalidate, + mutate, + } = useSWR(`/api/v1/request/${request.id}`, { + initialData: request, + }); const [isRetrying, setRetrying] = useState(false); diff --git a/src/components/RequestModal/AdvancedRequester/index.tsx b/src/components/RequestModal/AdvancedRequester/index.tsx index 614da3a8..20dbbde0 100644 --- a/src/components/RequestModal/AdvancedRequester/index.tsx +++ b/src/components/RequestModal/AdvancedRequester/index.tsx @@ -97,21 +97,19 @@ const AdvancedRequester: React.FC = ({ defaultOverrides?.tags ?? [] ); - const { - data: serverData, - isValidating, - } = useSWR( - selectedServer !== null - ? `/api/v1/service/${ - type === 'movie' ? 'radarr' : 'sonarr' - }/${selectedServer}` - : null, - { - refreshInterval: 0, - refreshWhenHidden: false, - revalidateOnFocus: false, - } - ); + const { data: serverData, isValidating } = + useSWR( + selectedServer !== null + ? `/api/v1/service/${ + type === 'movie' ? 'radarr' : 'sonarr' + }/${selectedServer}` + : null, + { + refreshInterval: 0, + refreshWhenHidden: false, + revalidateOnFocus: false, + } + ); const [selectedUser, setSelectedUser] = useState( requestUser ?? null diff --git a/src/components/RequestModal/MovieRequestModal.tsx b/src/components/RequestModal/MovieRequestModal.tsx index 61fb7c67..ccfa4f1f 100644 --- a/src/components/RequestModal/MovieRequestModal.tsx +++ b/src/components/RequestModal/MovieRequestModal.tsx @@ -51,10 +51,8 @@ const MovieRequestModal: React.FC = ({ is4k = false, }) => { const [isUpdating, setIsUpdating] = useState(false); - const [ - requestOverrides, - setRequestOverrides, - ] = useState(null); + const [requestOverrides, setRequestOverrides] = + useState(null); const { addToast } = useToasts(); const { data, error } = useSWR(`/api/v1/movie/${tmdbId}`, { revalidateOnMount: true, diff --git a/src/components/RequestModal/TvRequestModal.tsx b/src/components/RequestModal/TvRequestModal.tsx index c0ac5f11..64aa1481 100644 --- a/src/components/RequestModal/TvRequestModal.tsx +++ b/src/components/RequestModal/TvRequestModal.tsx @@ -74,10 +74,8 @@ const TvRequestModal: React.FC = ({ (season) => season.seasonNumber ); const { data, error } = useSWR(`/api/v1/tv/${tmdbId}`); - const [ - requestOverrides, - setRequestOverrides, - ] = useState(null); + const [requestOverrides, setRequestOverrides] = + useState(null); const [selectedSeasons, setSelectedSeasons] = useState( editRequest ? editingSeasons : [] ); diff --git a/src/components/Settings/Notifications/NotificationsPushover/index.tsx b/src/components/Settings/Notifications/NotificationsPushover/index.tsx index 058be3e6..922cf64d 100644 --- a/src/components/Settings/Notifications/NotificationsPushover/index.tsx +++ b/src/components/Settings/Notifications/NotificationsPushover/index.tsx @@ -160,20 +160,19 @@ const NotificationsPushover: React.FC = () => { * {intl.formatMessage(messages.accessTokenTip, { - ApplicationRegistrationLink: function ApplicationRegistrationLink( - msg - ) { - return ( - - {msg} - - ); - }, + ApplicationRegistrationLink: + function ApplicationRegistrationLink(msg) { + return ( + + {msg} + + ); + }, })} diff --git a/src/components/Settings/SettingsMain.tsx b/src/components/Settings/SettingsMain.tsx index 1f1ed4c9..be136122 100644 --- a/src/components/Settings/SettingsMain.tsx +++ b/src/components/Settings/SettingsMain.tsx @@ -298,9 +298,11 @@ const SettingsMain: React.FC = () => {
- {(Object.keys( - availableLanguages - ) as (keyof typeof availableLanguages)[]).map((key) => ( + {( + Object.keys( + availableLanguages + ) as (keyof typeof availableLanguages)[] + ).map((key) => ( - {(Object.keys( - availableLanguages - ) as (keyof typeof availableLanguages)[]).map((key) => ( + {( + Object.keys( + availableLanguages + ) as (keyof typeof availableLanguages)[] + ).map((key) => (