fix: address latest coderabbit review

This commit is contained in:
2026-03-25 21:10:43 -07:00
parent 23815945bf
commit 39b2ccad8e
5 changed files with 96 additions and 8 deletions

View File

@@ -144,13 +144,13 @@ export function createPrepareYoutubePlaybackInMpvHandler(deps: YoutubePlaybackLa
// Continue polling until media tracks are actually available.
}
}
const pathChanged = currentPath !== previousPath;
const pathDiffersFromInitial = currentPath !== previousPath;
const matchesChangedTarget =
currentPath === targetUrl ||
(isYoutubeMediaPath(currentPath) &&
isYoutubeMediaPath(targetUrl) &&
pathMatchesYoutubeTarget(currentPath, targetUrl));
if (pathChanged && matchesChangedTarget) {
if (pathDiffersFromInitial && matchesChangedTarget) {
if (deps.requestProperty) {
try {
const trackList = await deps.requestProperty('track-list');