Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd99dd6d7b | ||
|
|
e93e9ed839 | ||
|
|
dd23de7aaa | ||
|
|
f1602f67d4 |
No files matched your search
@@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.18.0",
|
"node": ">=24.18.0",
|
||||||
"pnpm": ">=11.11.0"
|
"pnpm": ">=11.13.1"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@11.11.0"
|
"packageManager": "pnpm@11.13.1"
|
||||||
}
|
}
|
||||||
+2
-2
@@ -69,7 +69,7 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.18.0",
|
"node": ">=24.18.0",
|
||||||
"pnpm": ">=11.11.0"
|
"pnpm": ">=11.13.1"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@11.11.0"
|
"packageManager": "pnpm@11.13.1"
|
||||||
}
|
}
|
||||||
@@ -467,7 +467,6 @@ export const integrationDefs = {
|
|||||||
iconUrl: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/archiveteam-warrior.png",
|
iconUrl: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/archiveteam-warrior.png",
|
||||||
category: ["archiving"],
|
category: ["archiving"],
|
||||||
documentationUrl: null,
|
documentationUrl: null,
|
||||||
defaultUrl: "http://localhost:8001",
|
|
||||||
},
|
},
|
||||||
// This integration only returns mock data, it is used during development (but can also be used in production by directly going to the create page)
|
// This integration only returns mock data, it is used during development (but can also be used in production by directly going to the create page)
|
||||||
mock: {
|
mock: {
|
||||||
|
|||||||
@@ -66,16 +66,20 @@ export default function MediaServerWidget({ options, integrationIds }: WidgetCom
|
|||||||
const currentlyPlaying = row.original.currentlyPlaying;
|
const currentlyPlaying = row.original.currentlyPlaying;
|
||||||
if (!currentlyPlaying) return null;
|
if (!currentlyPlaying) return null;
|
||||||
|
|
||||||
const isPaused = currentlyPlaying.playback.state === "paused";
|
const playback = currentlyPlaying.playback;
|
||||||
|
const isPaused = playback?.state === "paused";
|
||||||
const Icon = isPaused ? IconPlayerPause : mediaTypeIconMap[currentlyPlaying.type];
|
const Icon = isPaused ? IconPlayerPause : mediaTypeIconMap[currentlyPlaying.type];
|
||||||
|
|
||||||
const { positionMs, durationMs } = currentlyPlaying.playback;
|
const positionMs = playback?.positionMs ?? null;
|
||||||
|
const durationMs = playback?.durationMs ?? null;
|
||||||
const progressPercent =
|
const progressPercent =
|
||||||
positionMs !== null && durationMs !== null && durationMs > 0
|
positionMs !== null && durationMs !== null && durationMs > 0
|
||||||
? Math.min(100, Math.round((positionMs / durationMs) * 100))
|
? Math.min(100, Math.round((positionMs / durationMs) * 100))
|
||||||
: null;
|
: null;
|
||||||
const remainingMinutes =
|
const remainingMinutes =
|
||||||
positionMs !== null && durationMs !== null ? Math.max(0, Math.round((durationMs - positionMs) / 60_000)) : null;
|
positionMs !== null && durationMs !== null
|
||||||
|
? Math.max(0, Math.round((durationMs - positionMs) / 60_000))
|
||||||
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack gap={4} style={{ minWidth: 0 }}>
|
<Stack gap={4} style={{ minWidth: 0 }}>
|
||||||
@@ -122,8 +126,8 @@ export default function MediaServerWidget({ options, integrationIds }: WidgetCom
|
|||||||
|
|
||||||
const isTranscoding = Boolean(
|
const isTranscoding = Boolean(
|
||||||
currentlyPlaying.metadata?.transcoding.target.videoCodec ??
|
currentlyPlaying.metadata?.transcoding.target.videoCodec ??
|
||||||
currentlyPlaying.metadata?.transcoding.target.audioCodec ??
|
currentlyPlaying.metadata?.transcoding.target.audioCodec ??
|
||||||
currentlyPlaying.metadata?.transcoding.container,
|
currentlyPlaying.metadata?.transcoding.container,
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in new issue
Block a user