Fix exploration for multiple videos
This commit is contained in:
parent
bd2300303b
commit
bf2730f991
|
@ -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…
Reference in New Issue