55e220bc07
- Emby: now playing, library stats, recently added, active streams - Immich: library stats, recent uploads with formatted storage - Deluge: active torrents with progress, transfer speed, disk space gauge - MeTube: download queue progress (no auth required) - Planka: my cards, overdue cards with red badges, board summary - All 11 integrations registered in registry
18 lines
430 B
TypeScript
18 lines
430 B
TypeScript
import type { ProgressData } from '../types.js';
|
|
import type { MetubeQueueItem } from './client.js';
|
|
|
|
export function toDownloadQueue(
|
|
queue: Record<string, MetubeQueueItem>
|
|
): 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
|
|
}))
|
|
};
|
|
}
|