diff --git a/src/components/playlisteditor/playlisteditor.ts b/src/components/playlisteditor/playlisteditor.ts index eeb4c97adc..193c86da7f 100644 --- a/src/components/playlisteditor/playlisteditor.ts +++ b/src/components/playlisteditor/playlisteditor.ts @@ -4,6 +4,7 @@ import { getItemsApi } from '@jellyfin/sdk/lib/utils/api/items-api'; import { getPlaylistsApi } from '@jellyfin/sdk/lib/utils/api/playlists-api'; import escapeHtml from 'escape-html'; +import toast from 'components/toast/toast'; import dom from 'scripts/dom'; import globalize from 'scripts/globalize'; import { currentSettings as userSettings } from 'scripts/settings/userSettings'; @@ -52,12 +53,14 @@ function onSubmit(this: HTMLElement, e: Event) { addToPlaylist(panel, playlistId) .catch(err => { console.error('[PlaylistEditor] Failed to add to playlist %s', playlistId, err); + toast(globalize.translate('PlaylistError.AddFailed')); }) .finally(loading.hide); } else { createPlaylist(panel) .catch(err => { console.error('[PlaylistEditor] Failed to create playlist', err); + toast(globalize.translate('PlaylistError.CreateFailed')); }) .finally(loading.hide); } diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 7ac237d099..d3ed646508 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1257,6 +1257,8 @@ "PlayCount": "Play count", "Played": "Played", "PlayFromBeginning": "Play from beginning", + "PlaylistError.AddFailed": "Error adding to playlist", + "PlaylistError.CreateFailed": "Error creating playlist", "Playlists": "Playlists", "PlayNext": "Play next", "PlayNextEpisodeAutomatically": "Play next episode automatically",