From 2d7cd466bce0a6a63e1df4e1e4b0d189f067c4eb Mon Sep 17 00:00:00 2001 From: PrestonN Date: Thu, 11 Nov 2021 16:29:37 -0500 Subject: [PATCH] Remove logic for getting the next page in the Invidious API as it isn't needed anymore --- .../watch-video-playlist/watch-video-playlist.js | 13 ++----------- src/renderer/views/Playlist/Playlist.js | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/renderer/components/watch-video-playlist/watch-video-playlist.js b/src/renderer/components/watch-video-playlist/watch-video-playlist.js index 53c34abe0..62a028b01 100644 --- a/src/renderer/components/watch-video-playlist/watch-video-playlist.js +++ b/src/renderer/components/watch-video-playlist/watch-video-playlist.js @@ -332,10 +332,7 @@ export default Vue.extend({ const payload = { resource: 'playlists', - id: this.playlistId, - params: { - page: this.playlistPage - } + id: this.playlistId } this.invidiousGetPlaylistInfo(payload).then((result) => { @@ -349,13 +346,7 @@ export default Vue.extend({ this.channelId = result.authorId this.playlistItems = this.playlistItems.concat(result.videos) - if (this.playlistItems.length < result.videoCount) { - console.log('getting next page') - this.playlistPage++ - this.getPlaylistInformationInvidious() - } else { - this.isLoading = false - } + this.isLoading = false }).catch((err) => { console.log(err) const errorMessage = this.$t('Invidious API Error (Click to copy)') diff --git a/src/renderer/views/Playlist/Playlist.js b/src/renderer/views/Playlist/Playlist.js index d40a91bc0..e706fa11c 100644 --- a/src/renderer/views/Playlist/Playlist.js +++ b/src/renderer/views/Playlist/Playlist.js @@ -113,10 +113,7 @@ export default Vue.extend({ const payload = { resource: 'playlists', - id: this.playlistId, - params: { - page: this.playlistPage - } + id: this.playlistId } this.invidiousGetPlaylistInfo(payload).then((result) => { @@ -142,13 +139,7 @@ export default Vue.extend({ this.playlistItems = this.playlistItems.concat(result.videos) - if (this.playlistItems.length < result.videoCount) { - console.log('getting next page') - this.playlistPage++ - this.getPlaylistInvidious() - } else { - this.isLoading = false - } + this.isLoading = false }).catch((err) => { console.log(err) if (this.backendPreference === 'invidious' && this.backendFallback) {