diff --git a/.gitignore b/.gitignore index 02ba01a..416e15c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .nitro .cache dist +dist-windows # Node dependencies node_modules diff --git a/app/components/MediaSessionCard.vue b/app/components/MediaSessionCard.vue index 63cdf2d..e03d636 100644 --- a/app/components/MediaSessionCard.vue +++ b/app/components/MediaSessionCard.vue @@ -98,6 +98,15 @@ const presetLabel = computed(() => { return null } }) + +/** 转码已耗时(轮询每秒刷新一次) */ +const elapsedLabel = computed(() => { + if (!running.value || !props.item.transcodeStartedAt) return null + const started = new Date(props.item.transcodeStartedAt).getTime() + if (!Number.isFinite(started)) return null + const seconds = Math.max(0, Math.floor((Date.now() - started) / 1000)) + return `${Math.floor(seconds / 60)} min ${seconds % 60} s` +})