From 552f2d326c6feb3028c6aa0c9c867e9f81777766 Mon Sep 17 00:00:00 2001 From: PrestonN Date: Tue, 26 Feb 2019 11:26:05 -0500 Subject: [PATCH] Use /latest to grab subscriptions, speeding up the process --- src/js/subscriptions.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/subscriptions.js b/src/js/subscriptions.js index 2e118d461..648ecade5 100644 --- a/src/js/subscriptions.js +++ b/src/js/subscriptions.js @@ -103,8 +103,10 @@ function loadSubscriptions() { for (let i = 0; i < results.length; i++) { channelId = results[i]['channelId']; - invidiousAPI('channels/videos', channelId, {}, (data) => { - console.log(data); + invidiousAPI('channels/latest', channelId, {}, (data) => { + data.forEach((video, index) => { + data[index].author = results[i]['channelName']; + }); videoList = videoList.concat(data); counter = counter + 1; progressView.progressWidth = (counter / results.length) * 100; @@ -140,7 +142,6 @@ function addSubsToView(videoList) { }); subscriptionView.videoList = []; - console.log(videoList); if (videoList.length > 100) { for (let i = 0; i < 100; i++) {