diff --git a/frontend/src/components/ChannelPage.tsx b/frontend/src/components/ChannelPage.tsx index 303367fe..073e5b15 100644 --- a/frontend/src/components/ChannelPage.tsx +++ b/frontend/src/components/ChannelPage.tsx @@ -120,6 +120,7 @@ export default function ChannelPage({ qc.invalidateQueries({ queryKey: ["feed"] }); qc.invalidateQueries({ queryKey: ["blocked-channels"] }); }, + onError: (err) => notifyYouTubeActionError(err, t("channels.notify.blockFailed")), }); const subscribe = useMutation({ @@ -144,6 +145,7 @@ export default function ChannelPage({ qc.invalidateQueries({ queryKey: ["feed"] }); qc.invalidateQueries({ queryKey: ["channels"] }); }, + onError: (err) => notifyYouTubeActionError(err, t("channels.notify.unsubscribeFailed")), }); const onUnsubscribe = async () => { const ok = await confirm({ diff --git a/frontend/src/components/DownloadCenter.tsx b/frontend/src/components/DownloadCenter.tsx index fba5411b..057ae59b 100644 --- a/frontend/src/components/DownloadCenter.tsx +++ b/frontend/src/components/DownloadCenter.tsx @@ -681,6 +681,7 @@ export default function DownloadCenter() { ? api.cancelDownload(id) : api.deleteDownload(id), onSuccess: invalidate, + onError: () => notify({ level: "error", message: t("downloads.actionFailed") }), }); // Remove a shared-with-me item from your list (only your grant; the owner's file is untouched). diff --git a/frontend/src/components/SettingsPanel.tsx b/frontend/src/components/SettingsPanel.tsx index db0cfb44..f0a5d04f 100644 --- a/frontend/src/components/SettingsPanel.tsx +++ b/frontend/src/components/SettingsPanel.tsx @@ -533,12 +533,14 @@ function PlexWatchSync() { } }; + const onFail = () => notify({ level: "error", message: t("settings.plexSync.failed") }); const toggle = useMutation({ mutationFn: (next: boolean) => api.plexWatchSetLink(next), onSuccess: (res) => { qc.setQueryData(["plex-watch-link"], res); announce(res.import); }, + onError: onFail, }); const reimport = useMutation({ mutationFn: () => api.plexWatchImport(), @@ -546,6 +548,7 @@ function PlexWatchSync() { qc.setQueryData(["plex-watch-link"], res); announce(res.import); }, + onError: onFail, }); const busy = toggle.isPending || reimport.isPending; diff --git a/frontend/src/i18n/locales/en/channels.json b/frontend/src/i18n/locales/en/channels.json index bfedd362..07d1a6e7 100644 --- a/frontend/src/i18n/locales/en/channels.json +++ b/frontend/src/i18n/locales/en/channels.json @@ -119,6 +119,7 @@ "syncFailed": "Subscription sync failed", "unsubscribed": "Unsubscribed from {{name}} on YouTube", "unsubscribeFailed": "Unsubscribe failed", + "blockFailed": "Couldn't update block state", "fullHistoryRequested": "Full history requested for {{count}} channels", "fullHistoryFailed": "Couldn't request full history", "needYouTube": "Connect your YouTube account to do this.", diff --git a/frontend/src/i18n/locales/en/downloads.json b/frontend/src/i18n/locales/en/downloads.json index 896007fd..74b96bf9 100644 --- a/frontend/src/i18n/locales/en/downloads.json +++ b/frontend/src/i18n/locales/en/downloads.json @@ -197,5 +197,6 @@ "source_not_ready": "The source download isn't ready to edit.", "generic": "That edit couldn't be created." } - } + }, + "actionFailed": "Download action failed" } diff --git a/frontend/src/i18n/locales/en/settings.json b/frontend/src/i18n/locales/en/settings.json index 0ce4a0ea..15f31bd1 100644 --- a/frontend/src/i18n/locales/en/settings.json +++ b/frontend/src/i18n/locales/en/settings.json @@ -14,7 +14,8 @@ "imported": "Imported from Plex: {{watched}} watched, {{in_progress}} in progress.", "lastSync": "Last import: {{when}}", "never": "Not imported yet", - "importing": "Importing your Plex watch history…" + "importing": "Importing your Plex watch history…", + "failed": "Plex watch sync failed" }, "save": { "saving": "Saving…", diff --git a/frontend/src/i18n/locales/hu/channels.json b/frontend/src/i18n/locales/hu/channels.json index 5a236e6e..efe120eb 100644 --- a/frontend/src/i18n/locales/hu/channels.json +++ b/frontend/src/i18n/locales/hu/channels.json @@ -119,6 +119,7 @@ "syncFailed": "A feliratkozások szinkronizálása sikertelen", "unsubscribed": "Leiratkozva a(z) {{name}} csatornáról a YouTube-on", "unsubscribeFailed": "A leiratkozás sikertelen", + "blockFailed": "A tiltás állapotát nem sikerült frissíteni", "fullHistoryRequested": "Teljes előzmény kérve {{count}} csatornához", "fullHistoryFailed": "Nem sikerült teljes előzményt kérni", "needYouTube": "Ehhez csatlakoztasd a YouTube-fiókod.", diff --git a/frontend/src/i18n/locales/hu/downloads.json b/frontend/src/i18n/locales/hu/downloads.json index 61cf56bc..ac7df9a3 100644 --- a/frontend/src/i18n/locales/hu/downloads.json +++ b/frontend/src/i18n/locales/hu/downloads.json @@ -197,5 +197,6 @@ "source_not_ready": "A forrásletöltés még nem szerkeszthető.", "generic": "Ezt a vágást nem sikerült létrehozni." } - } + }, + "actionFailed": "A letöltési művelet sikertelen" } diff --git a/frontend/src/i18n/locales/hu/settings.json b/frontend/src/i18n/locales/hu/settings.json index 582a787f..854b5de3 100644 --- a/frontend/src/i18n/locales/hu/settings.json +++ b/frontend/src/i18n/locales/hu/settings.json @@ -14,7 +14,8 @@ "imported": "Importálva a Plexből: {{watched}} megnézve, {{in_progress}} folyamatban.", "lastSync": "Utolsó import: {{when}}", "never": "Még nincs importálva", - "importing": "Plex-előzmény importálása…" + "importing": "Plex-előzmény importálása…", + "failed": "A Plex-megtekintés szinkron sikertelen" }, "save": { "saving": "Mentés…",