fix: download subtitle

This commit is contained in:
Gabe
2025-11-10 00:35:30 +08:00
parent 9dd191902c
commit 4b3853dd22
2 changed files with 1 additions and 6 deletions

View File

@@ -109,10 +109,6 @@ export function Menus({
[updateSetting]
);
const handleDownload = useCallback(() => {
downloadSubtitle();
}, [downloadSubtitle]);
useEffect(() => {
const handler = (e) => {
const { action, data } = e.detail || {};
@@ -169,7 +165,7 @@ export function Menus({
/>
<Button
label={`${status} [${progressed}%] `}
onClick={handleDownload}
onClick={downloadSubtitle}
disabled={progressed !== 100}
/>
</div>

View File

@@ -206,7 +206,6 @@ class YouTubeCaptionProvider {
downloadSubtitle() {
if (!this.#subtitles.length || this.#progressed !== 100) {
logger.debug("Youtube Provider: The subtitle is not yet ready.");
this.#showNotification(this.#i18n("subtitle_is_not_yet_ready"));
return;
}