Move domain data helpers into lib/data

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-22 14:10:55 +02:00
co-authored by Claude Sonnet 5
parent f1220a688a
commit b63e30d2f8
10 changed files with 176 additions and 8 deletions
+18
View File
@@ -0,0 +1,18 @@
import type { components } from '$lib/api/schema';
import type { ApiTrackLike } from '$lib/player/player.svelte';
export type Mix = components['schemas']['MixApplicationResponse'];
export type MixItem = components['schemas']['MixItemApplicationResponse'];
export function mixItemKey(item: MixItem): string {
return `mf:${item.trackId}`;
}
export function mixItemTrack(item: MixItem): ApiTrackLike {
return {
id: item.trackId,
title: item.title,
artist: item.artist,
listensCount: item.listensCount
};
}