From d5727ca38750b8fa8723fafceb1f1d3d6bc4364e Mon Sep 17 00:00:00 2001 From: arabcoders Date: Thu, 18 Dec 2025 18:58:11 +0300 Subject: [PATCH] Fix: add fallback to placeholder if loading thumbnail fails --- ui/app/components/History.vue | 14 +++++++++++--- ui/app/components/Queue.vue | 12 ++++++++++-- ui/app/components/Simple.vue | 26 ++++++++++++++------------ 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/ui/app/components/History.vue b/ui/app/components/History.vue index a5141d9e..ebf9be3a 100644 --- a/ui/app/components/History.vue +++ b/ui/app/components/History.vue @@ -271,17 +271,17 @@
- +
- +
@@ -847,6 +847,14 @@ const pImg = (e: Event) => { } } +const onImgError = (e: Event) => { + const target = e.target as HTMLImageElement + if (target.src.endsWith('/images/placeholder.png')) { + return + } + target.src = '/images/placeholder.png' +} + watch(video_item, (v) => { if (!bg_enable.value) { return diff --git a/ui/app/components/Queue.vue b/ui/app/components/Queue.vue index c376a0eb..d2aafa29 100644 --- a/ui/app/components/Queue.vue +++ b/ui/app/components/Queue.vue @@ -193,13 +193,13 @@
-
@@ -579,6 +579,14 @@ const pImg = (e: Event) => { } } +const onImgError = (e: Event) => { + const target = e.target as HTMLImageElement + if (target.src.endsWith('/images/placeholder.png')) { + return + } + target.src = '/images/placeholder.png' +} + watch(embed_url, v => { if (!bg_enable.value) { return diff --git a/ui/app/components/Simple.vue b/ui/app/components/Simple.vue index b78a711c..dcc790fb 100644 --- a/ui/app/components/Simple.vue +++ b/ui/app/components/Simple.vue @@ -89,7 +89,8 @@