Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

fix: revert video state to summarizing=false when summary fails

Christian Fei7d82e290c6db
diff --git a/client/main.js b/client/main.js
index 056520a..c332f86 100644
--- a/client/main.js
+++ b/client/main.js
@@ -60,7 +60,10 @@ window.eventSource.onmessage = (message) => {
}
if (data.type === 'summary-error' && data.videoId) {
const $videoElement = document.querySelector(`[data-video-id="${data.videoId}"]`)
- $videoElement && $videoElement.render && $videoElement.render()
+ if ($videoElement) {
+ $videoElement.dataset.summarizing = 'false'
+ $videoElement.render && $videoElement.render()
+ }
return
}
if (data.type === 'summary' && data.videoId && data.summary && data.transcript) {