mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
...test
This commit is contained in:
1 parent
9e67bcce25
commit
74fa8da4eb
1 file changed
+12
-10
+12
-10
@@ -166,16 +166,6 @@ async function pickAutoplayTrack(p, ctx, lastTrack) {
|
||||
p._autoplayPreferredPoolVid = videoId;
|
||||
return cached;
|
||||
}
|
||||
|
||||
try {
|
||||
const mixUrl = `https://www.youtube.com/watch?v=${videoId}&list=RD${videoId}`;
|
||||
const candidates = await resolveCandidates(p, mixUrl, "yt");
|
||||
if (candidates.length) {
|
||||
storePool(p, videoId, candidates);
|
||||
p._autoplayPreferredPoolVid = videoId;
|
||||
return candidates[Math.floor(Math.random() * Math.min(PICK_POOL, candidates.length))];
|
||||
}
|
||||
} catch (e) { logger.warn("[Autoplay] Mix strategy failed:", e?.message); }
|
||||
}
|
||||
|
||||
const lf = ctx?.lastfm;
|
||||
@@ -212,6 +202,18 @@ async function pickAutoplayTrack(p, ctx, lastTrack) {
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
if (videoId) {
|
||||
try {
|
||||
const mixUrl = `https://www.youtube.com/watch?v=${videoId}&list=RD${videoId}`;
|
||||
const candidates = await resolveCandidates(p, mixUrl, "yt");
|
||||
if (candidates.length) {
|
||||
storePool(p, videoId, candidates);
|
||||
p._autoplayPreferredPoolVid = videoId;
|
||||
return candidates[Math.floor(Math.random() * Math.min(PICK_POOL, candidates.length))];
|
||||
}
|
||||
} catch (e) { logger.warn("[Autoplay] Mix strategy failed:", e?.message); }
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user