Browse Source

Fix exploration for multiple videos

master
Mattéo Delabre 3 years ago
parent
commit
bf2730f991
Signed by: matteo GPG Key ID: AE3FBD02DC583ABB
  1. 5
      lib/explore.mjs

5
lib/explore.mjs

@ -28,6 +28,9 @@ export const exploreVideos = async (videoId, onUpdate) =>
while (queue.length > 0)
{
const currentId = queue.shift();
if (!(currentId in videosNodes))
{
const config = await api.getPlayerConfig(currentId);
const meta = api.getVideoMeta(config);
@ -41,8 +44,6 @@ export const exploreVideos = async (videoId, onUpdate) =>
.forEach(nextId => nextVideos[meta.videoId].add(nextId));
for (let nextId of nextVideos[meta.videoId])
{
if (!(nextId in videosNodes))
{
queue.push(nextId);
}

Loading…
Cancel
Save