many changes
Traceability Validation / Check Requirement Traces (push) Failing after 1m18s
🏗️ Build and Test JellyTau / Build APK and Run Tests (push) Has been cancelled

This commit is contained in:
2026-02-14 00:09:47 +01:00
parent 6d1c618a3a
commit e3797f32ca
74 changed files with 6718 additions and 771 deletions
+15 -5
View File
@@ -10,20 +10,31 @@
let { session, selected = false, onclick }: Props = $props();
function getImageUrl(): string {
if (!session.nowPlayingItem) return "";
let imageUrl = $state<string>("");
// Load image URL asynchronously
async function loadImageUrl(): Promise<void> {
if (!session.nowPlayingItem) {
imageUrl = "";
return;
}
try {
const repo = auth.getRepository();
return repo.getImageUrl(session.nowPlayingItem.id, "Primary", {
imageUrl = await repo.getImageUrl(session.nowPlayingItem.id, "Primary", {
maxWidth: 80,
tag: session.nowPlayingItem.primaryImageTag,
});
} catch {
return "";
imageUrl = "";
}
}
// Load image when session changes
$effect(() => {
loadImageUrl();
});
function formatTime(ticks: number): string {
const seconds = Math.floor(ticks / 10000000);
const minutes = Math.floor(seconds / 60);
@@ -35,7 +46,6 @@
return `${minutes}:${String(seconds % 60).padStart(2, '0')}`;
}
const imageUrl = $derived(getImageUrl());
const playState = $derived(session.playState);
const nowPlaying = $derived(session.nowPlayingItem);
</script>