From 78dff1491b0fa23ceabf6c783cc68af0e0b189c0 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Tue, 30 Mar 2021 15:09:23 +0530 Subject: [PATCH] Fix playlist continuation. --- src/components/Playlist.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Playlist.vue b/src/components/Playlist.vue index 574501e3..e91a780f 100644 --- a/src/components/Playlist.vue +++ b/src/components/Playlist.vue @@ -82,7 +82,12 @@ export default { .then(() => (document.title = this.playlist.name + " - Piped")); }, handleScroll() { - if (this.loading || !this.playlist || !this.playlist.nextpage) + if ( + this.loading || + !this.playlist || + !this.playlist.nextpage || + !this.playlist.nextid + ) return; if ( window.innerHeight + window.scrollY >= @@ -94,10 +99,13 @@ export default { "/nextpage/playlists/" + this.$route.query.list + "?url=" + - encodeURIComponent(this.playlist.nextpage) + encodeURIComponent(this.playlist.nextpage) + + "&id=" + + encodeURIComponent(this.playlist.nextid) ).then(json => { this.playlist.relatedStreams.concat(json.relatedStreams); this.playlist.nextpage = json.nextpage; + this.playlist.nextid = json.nextid; this.loading = false; json.relatedStreams.map(stream => this.playlist.relatedStreams.push(stream)