Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/renderer/components/PlaylistInfo/PlaylistInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
>
{{ title }}
</h2>
<p>
<p
v-if="!isUnviewable"
>
{{ t('Global.Counts.Video Count', { count: parsedVideoCount }, videoCount) }}
<template v-if="!hideViews && !isUserPlaylist">
- {{ t('Global.Counts.View Count', { count: parsedViewCount }, viewCount) }}
Expand Down Expand Up @@ -359,6 +361,10 @@ const props = defineProps({
type: String,
required: true,
},
isUnviewable: {
type: Boolean,
default: false,
},
moreVideoDataAvailable: {
type: Boolean,
required: true,
Expand Down
23 changes: 23 additions & 0 deletions src/renderer/views/Playlist/Playlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
:total-playlist-duration="totalPlaylistDuration"
:is-duration-approximate="isDurationApproximate"
:info-source="infoSource"
:is-unviewable="isUnviewable"
:more-video-data-available="moreVideoDataAvailable"
:search-video-mode-allowed="isUserPlaylistRequested && shownVideoCount > 1"
:search-query-text="searchQueryTextRequested"
Expand Down Expand Up @@ -183,6 +184,13 @@
</p>
</FtFlexBox>
</template>
<FtFlexBox
v-else-if="isUnviewable"
>
<p class="message">
{{ t("User Playlists['This playlist is private or does not exist.']") }}
</p>
</FtFlexBox>
<FtFlexBox
v-else
>
Expand Down Expand Up @@ -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<any[] | null>} */
const tempShownPlaylistItems = ref(null)
Expand Down Expand Up @@ -496,6 +505,7 @@ function resetState() {
channelId.value = ''
infoSource.value = 'local'
showUnavailableVideosAlert.value = false
isUnviewable.value = false
playlistItems.value = []
continuationData.value = null
updatePageTitle()
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down