import type { ProgressData } from '../types.js'; import type { MetubeQueueItem } from './client.js'; export function toDownloadQueue( queue: Record ): ProgressData { const entries = Object.entries(queue); return { items: entries.map(([id, item]) => ({ id, label: item.title || item.filename || id, progress: Math.round(item.percent ?? 0), subtitle: item.status || undefined })) }; }