修复下载进度的错误问题
This commit is contained in:
@@ -899,6 +899,15 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
resetPhases();
|
||||
|
||||
// Reset subtitle selector before subscribing to ensure we use the base key for source download
|
||||
if (subtitleSelector) {
|
||||
subtitleSelector.innerHTML = '<option value="-1">无字幕</option>';
|
||||
subtitleSelector.value = "-1";
|
||||
}
|
||||
if (subtitlePanel) {
|
||||
subtitlePanel.classList.add('hidden');
|
||||
}
|
||||
|
||||
selectedKey = key;
|
||||
currentVideoKey = key;
|
||||
subscribeToKey(key);
|
||||
@@ -906,6 +915,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
nowPlaying.classList.remove('hidden');
|
||||
currentVideoTitle.textContent = key.split('/').pop();
|
||||
|
||||
// If download is needed, show the overlay so the user sees the progress
|
||||
if (!hasDownloadCache) {
|
||||
transcodingOverlay.classList.remove('hidden');
|
||||
showDownloadPhase();
|
||||
}
|
||||
|
||||
// Fetch subtitle metadata
|
||||
fetchVideoMetadata(selectedBucket, key);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user