diff --git a/src/renderer/components/PlaylistInfo/PlaylistInfo.vue b/src/renderer/components/PlaylistInfo/PlaylistInfo.vue index 71b44a76c7eb8..966e4297dc0f7 100644 --- a/src/renderer/components/PlaylistInfo/PlaylistInfo.vue +++ b/src/renderer/components/PlaylistInfo/PlaylistInfo.vue @@ -67,7 +67,9 @@ > {{ title }} -

+

{{ t('Global.Counts.Video Count', { count: parsedVideoCount }, videoCount) }} + +

+ {{ t("User Playlists['This playlist is private or does not exist.']") }} +

+ @@ -250,6 +258,7 @@ const channelThumbnail = ref('') const channelId = ref('') const infoSource = ref('local') const showUnavailableVideosAlert = ref(false) +const isUnviewable = ref(false) const playlistItems = ref([]) /** @type {import('vue').ComputedRef} */ const tempShownPlaylistItems = ref(null) @@ -496,6 +505,7 @@ function resetState() { channelId.value = '' infoSource.value = 'local' showUnavailableVideosAlert.value = false + isUnviewable.value = false playlistItems.value = [] continuationData.value = null updatePageTitle() @@ -557,6 +567,13 @@ async function getPlaylistLocal() { isLoading.value = false } catch (err) { + if (err.message.includes('This playlist type is unviewable') || + err.message.includes('The playlist does not exist')) { + isUnviewable.value = true + isLoading.value = false + return + } + console.error(err) if (backendPreference.value === 'local' && backendFallback.value) { @@ -600,6 +617,12 @@ async function getPlaylistInvidious() { } catch (err) { console.error(err) + if (err.message.includes('Could not extract playlistSidebarRenderer')) { + isUnviewable.value = true + isLoading.value = false + return + } + if (process.env.SUPPORTS_LOCAL_API && backendPreference.value === 'invidious' && backendFallback.value) { console.warn('Error getting data with Invidious, falling back to local backend') getPlaylistLocal() diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 5aec16d11fec4..ab610cdb0c567 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -161,6 +161,7 @@ User Playlists: Search bar placeholder: Search for Playlists Playlists with Matching Videos: Playlists with Matching Videos + This playlist is private or does not exist.: This playlist is private or does not exist. This playlist currently has no videos.: This playlist currently has no videos. Create New Playlist: Create New Playlist