From 67bde685963684682b9a472f896c107271a5c328 Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Wed, 8 Nov 2023 01:04:20 +0500 Subject: [PATCH] refactor: cleans up local watchlist logic and fixes translation extractions --- server/routes/discover.ts | 1 + .../Discover/DiscoverWatchlist/index.tsx | 2 +- src/components/Layout/VersionStatus/index.tsx | 4 +- .../NotificationsPushover/index.tsx | 2 +- .../Notifications/NotificationsTelegram.tsx | 2 +- .../NotificationsWebPush/index.tsx | 2 +- .../Settings/SettingsAbout/index.tsx | 53 ++++++++++++++++++- src/components/Settings/SettingsBadge.tsx | 2 +- .../Settings/SettingsJobsCache/index.tsx | 6 +-- .../Settings/SettingsMain/index.tsx | 4 +- src/components/Settings/SettingsPlex.tsx | 6 +-- src/i18n/locale/en.json | 1 + 12 files changed, 68 insertions(+), 17 deletions(-) diff --git a/server/routes/discover.ts b/server/routes/discover.ts index 88d893cae..e9647895a 100644 --- a/server/routes/discover.ts +++ b/server/routes/discover.ts @@ -865,6 +865,7 @@ discoverRoutes.get, WatchlistResponse>( } const plexTV = new PlexTvAPI(activeUser.plexToken); + const watchlist = await plexTV.getWatchlist({ offset }); return res.json({ diff --git a/src/components/Discover/DiscoverWatchlist/index.tsx b/src/components/Discover/DiscoverWatchlist/index.tsx index a32fe5052..775da757a 100644 --- a/src/components/Discover/DiscoverWatchlist/index.tsx +++ b/src/components/Discover/DiscoverWatchlist/index.tsx @@ -69,7 +69,7 @@ const DiscoverWatchlist = () => { title != null)} + plexItems={titles} isEmpty={isEmpty} isLoading={ isLoadingInitialData || (isLoadingMore && (titles?.length ?? 0) > 0) diff --git a/src/components/Layout/VersionStatus/index.tsx b/src/components/Layout/VersionStatus/index.tsx index e755750ea..def6a7c68 100644 --- a/src/components/Layout/VersionStatus/index.tsx +++ b/src/components/Layout/VersionStatus/index.tsx @@ -10,8 +10,8 @@ import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; const messages = defineMessages({ - streamdevelop: 'Overseerr Develop', - streamstable: 'Overseerr Stable', + streamdevelop: 'Jellyseerr Develop', + streamstable: 'Jellyseerr Stable', outofdate: 'Out of Date', commitsbehind: '{commitsBehind} {commitsBehind, plural, one {commit} other {commits}} behind', diff --git a/src/components/Settings/Notifications/NotificationsPushover/index.tsx b/src/components/Settings/Notifications/NotificationsPushover/index.tsx index 68a321540..325dbd315 100644 --- a/src/components/Settings/Notifications/NotificationsPushover/index.tsx +++ b/src/components/Settings/Notifications/NotificationsPushover/index.tsx @@ -16,7 +16,7 @@ const messages = defineMessages({ agentenabled: 'Enable Agent', accessToken: 'Application API Token', accessTokenTip: - 'Register an application for use with Overseerr', + 'Register an application for use with Jellyseerr', userToken: 'User or Group Key', userTokenTip: 'Your 30-character user or group identifier', diff --git a/src/components/Settings/Notifications/NotificationsTelegram.tsx b/src/components/Settings/Notifications/NotificationsTelegram.tsx index 690731e6e..6907906a5 100644 --- a/src/components/Settings/Notifications/NotificationsTelegram.tsx +++ b/src/components/Settings/Notifications/NotificationsTelegram.tsx @@ -19,7 +19,7 @@ const messages = defineMessages({ 'Allow users to also start a chat with your bot and configure their own notifications', botAPI: 'Bot Authorization Token', botApiTip: - 'Create a bot for use with Overseerr', + 'Create a bot for use with Jellyseerr', chatId: 'Chat ID', chatIdTip: 'Start a chat with your bot, add @get_id_bot, and issue the /my_id command', diff --git a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx index 5ff7ebf5f..a5627ed33 100644 --- a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx +++ b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx @@ -18,7 +18,7 @@ const messages = defineMessages({ toastWebPushTestSuccess: 'Web push test notification sent!', toastWebPushTestFailed: 'Web push test notification failed to send.', httpsRequirement: - 'In order to receive web push notifications, Overseerr must be served over HTTPS.', + 'In order to receive web push notifications, Jellyseerr must be served over HTTPS.', }); const NotificationsWebPush = () => { diff --git a/src/components/Settings/SettingsAbout/index.tsx b/src/components/Settings/SettingsAbout/index.tsx index b3df332b4..e5830ebcd 100644 --- a/src/components/Settings/SettingsAbout/index.tsx +++ b/src/components/Settings/SettingsAbout/index.tsx @@ -16,7 +16,7 @@ import useSWR from 'swr'; const messages = defineMessages({ about: 'About', - overseerrinformation: 'About Overseerr', + overseerrinformation: 'About Jellyseerr', version: 'Version', totalmedia: 'Total Media', totalrequests: 'Total Requests', @@ -25,6 +25,7 @@ const messages = defineMessages({ timezone: 'Time Zone', appDataPath: 'Data Directory', supportoverseerr: 'Support Overseerr', + supportjellyseerr: 'Support Jellyseerr', helppaycoffee: 'Help Pay for Coffee', documentation: 'Documentation', preferredmethod: 'Preferred', @@ -33,7 +34,7 @@ const messages = defineMessages({ betawarning: 'This is BETA software. Features may be broken and/or unstable. Please report any issues on GitHub!', runningDevelop: - 'You are running the develop branch of Overseerr, which is only recommended for those contributing to development or assisting with bleeding-edge testing.', + 'You are running the develop branch of Jellyseerr, which is only recommended for those contributing to development or assisting with bleeding-edge testing.', }); const SettingsAbout = () => { @@ -187,6 +188,54 @@ const SettingsAbout = () => { +
+ + + + https://github.com/sponsors/sct + + + {intl.formatMessage(messages.preferredmethod)} + + + + + https://patreon.com/overseerr + + + +
+
+ + + + https://www.buymeacoffee.com/fallen.bagel + + + {intl.formatMessage(messages.preferredmethod)} + + + +
diff --git a/src/components/Settings/SettingsBadge.tsx b/src/components/Settings/SettingsBadge.tsx index c4f12ef31..3b26bef29 100644 --- a/src/components/Settings/SettingsBadge.tsx +++ b/src/components/Settings/SettingsBadge.tsx @@ -9,7 +9,7 @@ const messages = defineMessages({ experimentalTooltip: 'Enabling this setting may result in unexpected application behavior', restartrequiredTooltip: - 'Overseerr must be restarted for changes to this setting to take effect', + 'Jellyseerr must be restarted for changes to this setting to take effect', }); const SettingsBadge = ({ diff --git a/src/components/Settings/SettingsJobsCache/index.tsx b/src/components/Settings/SettingsJobsCache/index.tsx index ae0f7ee4d..1686fce22 100644 --- a/src/components/Settings/SettingsJobsCache/index.tsx +++ b/src/components/Settings/SettingsJobsCache/index.tsx @@ -30,7 +30,7 @@ const messages: { [messageName: string]: MessageDescriptor } = defineMessages({ jobsandcache: 'Jobs & Cache', jobs: 'Jobs', jobsDescription: - 'Overseerr performs certain maintenance tasks as regularly-scheduled jobs, but they can also be manually triggered below. Manually running a job will not alter its schedule.', + 'Jellyseerr performs certain maintenance tasks as regularly-scheduled jobs, but they can also be manually triggered below. Manually running a job will not alter its schedule.', jobname: 'Job Name', jobtype: 'Type', nextexecution: 'Next Execution', @@ -42,7 +42,7 @@ const messages: { [messageName: string]: MessageDescriptor } = defineMessages({ command: 'Command', cache: 'Cache', cacheDescription: - 'Overseerr caches requests to external API endpoints to optimize performance and avoid making unnecessary API calls.', + 'Jellyseerr caches requests to external API endpoints to optimize performance and avoid making unnecessary API calls.', cacheflushed: '{cachename} cache flushed.', cachename: 'Cache Name', cachehits: 'Hits', @@ -76,7 +76,7 @@ const messages: { [messageName: string]: MessageDescriptor } = defineMessages({ 'Every {jobScheduleSeconds, plural, one {second} other {{jobScheduleSeconds} seconds}}', imagecache: 'Image Cache', imagecacheDescription: - 'When enabled in settings, Overseerr will proxy and cache images from pre-configured external sources. Cached images are saved into your config folder. You can find the files in {appDataPath}/cache/images.', + 'When enabled in settings, Jellyseerr will proxy and cache images from pre-configured external sources. Cached images are saved into your config folder. You can find the files in {appDataPath}/cache/images.', imagecachecount: 'Images Cached', imagecachesize: 'Total Cache Size', }); diff --git a/src/components/Settings/SettingsMain/index.tsx b/src/components/Settings/SettingsMain/index.tsx index 62f26d49a..b9f285ce7 100644 --- a/src/components/Settings/SettingsMain/index.tsx +++ b/src/components/Settings/SettingsMain/index.tsx @@ -27,7 +27,7 @@ const messages = defineMessages({ general: 'General', generalsettings: 'General Settings', generalsettingsDescription: - 'Configure global and default settings for Overseerr.', + 'Configure global and default settings for Jellyseerr.', apikey: 'API Key', applicationTitle: 'Application Title', applicationurl: 'Application URL', @@ -49,7 +49,7 @@ const messages = defineMessages({ 'Cache externally sourced images (requires a significant amount of disk space)', trustProxy: 'Enable Proxy Support', trustProxyTip: - 'Allow Overseerr to correctly register client IP addresses behind a proxy', + 'Allow Jellyseerr to correctly register client IP addresses behind a proxy', validationApplicationTitle: 'You must provide an application title', validationApplicationUrl: 'You must provide a valid URL', validationApplicationUrlTrailingSlash: 'URL must not end in a trailing slash', diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index 1414f0174..69d988895 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -49,12 +49,12 @@ const messages = defineMessages({ enablessl: 'Use SSL', plexlibraries: 'Plex Libraries', plexlibrariesDescription: - 'The libraries Overseerr scans for titles. Set up and save your Plex connection settings, then click the button below if no libraries are listed.', + 'The libraries Jellyseerr scans for titles. Set up and save your Plex connection settings, then click the button below if no libraries are listed.', scanning: 'Syncing…', scan: 'Sync Libraries', manualscan: 'Manual Library Scan', 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!", + "Normally, this will only be run once every 24 hours. Jellyseerr 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}', @@ -67,7 +67,7 @@ const messages = defineMessages({ 'Optionally direct users to the web app on your server instead of the "hosted" web app', tautulliSettings: 'Tautulli Settings', tautulliSettingsDescription: - 'Optionally configure the settings for your Tautulli server. Overseerr fetches watch history data for your Plex media from Tautulli.', + 'Optionally configure the settings for your Tautulli server. Jellyseerr fetches watch history data for your Plex media from Tautulli.', urlBase: 'URL Base', tautulliApiKey: 'API Key', externalUrl: 'External URL', diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index 96d5926c7..d355b6efd 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -752,6 +752,7 @@ "components.Settings.SettingsAbout.preferredmethod": "Preferred", "components.Settings.SettingsAbout.runningDevelop": "You are running the develop branch of Overseerr, which is only recommended for those contributing to development or assisting with bleeding-edge testing.", "components.Settings.SettingsAbout.supportoverseerr": "Support Overseerr", + "components.Settings.SettingsAbout.supportjellyseerr": "Support Jellyseerr", "components.Settings.SettingsAbout.timezone": "Time Zone", "components.Settings.SettingsAbout.totalmedia": "Total Media", "components.Settings.SettingsAbout.totalrequests": "Total Requests",