Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: add thumbnail support for download items with lazy loading

Tonhob31de088ff99
diff --git a/src/routes/downloads/+page.svelte b/src/routes/downloads/+page.svelte
index ce73a736..dee06e0b 100644
--- a/src/routes/downloads/+page.svelte
+++ b/src/routes/downloads/+page.svelte
@@ -143,6 +143,17 @@
<div class="download-item" data-status={item.status}>
<div class="item-header">
<div class="item-header-left">
+ {#if item.thumbnail_url}
+ <img
+ src={item.thumbnail_url}
+ alt=""
+ class="queue-thumb"
+ loading="lazy"
+ onerror={(e) => {
+ (e.target as HTMLImageElement).style.display = 'none';
+ }}
+ />
+ {/if}
<PlatformIcon platform={item.platform} size={16} />
<span class="item-name">{item.name}</span>
</div>
@@ -456,6 +467,14 @@
flex: 1;
}
+ .queue-thumb {
+ width: 48px;
+ height: 48px;
+ border-radius: 6px;
+ object-fit: cover;
+ flex-shrink: 0;
+ }
+
.item-name {
font-size: 14.5px;
font-weight: 500;