log hls playlist contents for resume debug

This commit is contained in:
2026-06-06 22:27:41 +03:00
parent 253af91f46
commit ae2f334963
+13
View File
@@ -361,6 +361,19 @@ export default function PlayerPage() {
transcodingUrlHasRuntimeTicks: hasRuntimeTicks, transcodingUrlHasRuntimeTicks: hasRuntimeTicks,
streamUrl: streamUrl.replace(/api_key=[^&]+/, 'api_key=***'), streamUrl: streamUrl.replace(/api_key=[^&]+/, 'api_key=***'),
}) })
if (transcodingUrl && !hasRuntimeTicks) {
const fullUrl = `${serverUrl}${transcodingUrl}`
fetch(fullUrl, { headers: { Authorization: `MediaBrowser Token=${token}` } })
.then(r => r.text())
.then(text => {
const lines = text.split(/\r?\n/)
const segmentLines = lines.filter(l => l.includes('.m3u8') || l.includes('.ts') || l.includes('m4s') || l.includes('.mp4'))
console.log('[player] hls playlist first 12 lines', lines.slice(0, 12))
console.log('[player] hls first 4 segment lines', segmentLines.slice(0, 4))
console.log('[player] hls segments have runtimeTicks', segmentLines.some(l => l.includes('runtimeTicks=')))
})
.catch(e => console.warn('[player] hls playlist fetch failed', e))
}
} }
/* Reset transient flags on item change */ /* Reset transient flags on item change */