mirror of https://github.com/FreeTubeApp/FreeTube
Use /latest to grab subscriptions, speeding up the process
This commit is contained in:
parent
faf1a85731
commit
552f2d326c
|
@ -103,8 +103,10 @@ function loadSubscriptions() {
|
||||||
for (let i = 0; i < results.length; i++) {
|
for (let i = 0; i < results.length; i++) {
|
||||||
channelId = results[i]['channelId'];
|
channelId = results[i]['channelId'];
|
||||||
|
|
||||||
invidiousAPI('channels/videos', channelId, {}, (data) => {
|
invidiousAPI('channels/latest', channelId, {}, (data) => {
|
||||||
console.log(data);
|
data.forEach((video, index) => {
|
||||||
|
data[index].author = results[i]['channelName'];
|
||||||
|
});
|
||||||
videoList = videoList.concat(data);
|
videoList = videoList.concat(data);
|
||||||
counter = counter + 1;
|
counter = counter + 1;
|
||||||
progressView.progressWidth = (counter / results.length) * 100;
|
progressView.progressWidth = (counter / results.length) * 100;
|
||||||
|
@ -140,7 +142,6 @@ function addSubsToView(videoList) {
|
||||||
});
|
});
|
||||||
|
|
||||||
subscriptionView.videoList = [];
|
subscriptionView.videoList = [];
|
||||||
console.log(videoList);
|
|
||||||
|
|
||||||
if (videoList.length > 100) {
|
if (videoList.length > 100) {
|
||||||
for (let i = 0; i < 100; i++) {
|
for (let i = 0; i < 100; i++) {
|
||||||
|
|
Loading…
Reference in New Issue