From 7000b56a1315f85fafd12493f8520efb835a4001 Mon Sep 17 00:00:00 2001 From: dadus33 Date: Thu, 25 Jan 2024 12:48:13 +0200 Subject: [PATCH] Fix for API retrieved playlists bug introduced in #3357 --- src/components/PlaylistPage.vue | 10 +--------- src/main.js | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/PlaylistPage.vue b/src/components/PlaylistPage.vue index d6923d5b..0926e093 100644 --- a/src/components/PlaylistPage.vue +++ b/src/components/PlaylistPage.vue @@ -102,16 +102,8 @@ export default { window.removeEventListener("scroll", this.handleScroll); }, methods: { - async fetchPlaylist() { - const playlistId = this.$route.query.list; - if (playlistId.startsWith("local")) { - return this.getPlaylist(playlistId); - } - - return await await this.fetchJson(this.authApiUrl() + "/playlists/" + this.$route.query.list); - }, async getPlaylistData() { - this.fetchPlaylist() + this.getPlaylist(this.$route.query.list) .then(data => (this.playlist = data)) .then(() => { this.updateTitle(); diff --git a/src/main.js b/src/main.js index 9d6f8382..3656fc88 100644 --- a/src/main.js +++ b/src/main.js @@ -359,7 +359,7 @@ const mixin = { }); }, async getPlaylist(playlistId) { - if (!this.authenticated) { + if (playlistId.startsWith("local")) { const playlist = await this.getLocalPlaylist(playlistId); const videoIds = JSON.parse(playlist.videoIds); const videosFuture = videoIds.map(videoId => this.getLocalPlaylistVideo(videoId));