From c6016131e9add609017b63014ff2494642f7e177 Mon Sep 17 00:00:00 2001 From: Massimo Melina Date: Thu, 13 Aug 2026 10:25:56 +0100 Subject: [PATCH] Report subtitle download results --- ui/sidebar/app.vue | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/ui/sidebar/app.vue b/ui/sidebar/app.vue index 6617056..f8ef218 100644 --- a/ui/sidebar/app.vue +++ b/ui/sidebar/app.vue @@ -593,16 +593,25 @@ export default { return; } rpc.$sendOSD("Downloading…"); - const res = await client.download(fidList); - this.log( - `Downloaded ${item.attributes.release} (${fidList.length} files)`, - ); - console.log("Download", res); - const { requests, remaining, message } = res; - this.quotaInfo = { requests, remaining, message }; - this.userInfo.downloads_count = requests; - this.userInfo.remaining_downloads = remaining; - this.userInfo.reset_time = message; + try { + const res = await client.download(fidList); + this.log( + `Downloaded ${item.attributes.release} (${fidList.length} files)`, + ); + rpc.$sendOSD("Subtitles downloaded"); + console.log("Download", res); + const { requests, remaining, message } = res; + this.quotaInfo = { requests, remaining, message }; + if (this.userInfo) { + this.userInfo.downloads_count = requests; + this.userInfo.remaining_downloads = remaining; + this.userInfo.reset_time = message; + } + } catch (err) { + const message = err.message || String(err); + this.log(`Download failed: ${message}`, "error"); + rpc.$sendOSD(`Download failed: ${message}`); + } }, showModal(type, title) { this.modalType = type;