fix: detect YTM artist channel expansion in getYtmVideoUrls; revert PWA MediaSession changes

- ytdlp.js: watch for [youtube:tab] in yt-dlp output during flat-playlist step;
  return [] when channel expansion is detected so cascade falls through to ytsearch
- Revert player.js / main.js / state.js PWA _changingTrack changes (not effective)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-05-03 01:11:36 +02:00
1 parent a5959b19b8
commit 598c108214
4 files changed
+21 -17

No files matched your search

+1 -7
View File
@@ -17,14 +17,8 @@ export function playQueue(songs, startIdx) {
export function playCurrent() {
if(S.qIdx < 0 || S.qIdx >= S.queue.length) return;
const s = S.queue[S.qIdx];
// Pre-update MediaSession before src change so the OS never sees a "paused" flash
// (setting src fires pause synchronously; _changingTrack suppresses that in the pause handler)
updateMediaSession(s);
if(navigator.mediaSession) navigator.mediaSession.playbackState = 'playing';
S._changingTrack = true;
S.audio.src = streamUrl(s.id);
S._changingTrack = false;
S.audio.play().catch(() => {});
S.audio.play();
updatePlayerUI(s);
onNpSongChange(s.id);
renderQueue();