A freshly imported video or image shows 0:00.0 on its Media card until it is placed on the timeline
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 75/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- electron, react, typescript
- 領域
- frontend
研究方向
從 src/components/ai-edition/v4/MediaStage.tsx 第 220 行附近開始,查看卡片上時長的渲染,然後閱讀 src/lib/ai-edition/store/useTimeline.ts 第 1528-1533 行處的註解,了解為什麼匯入不攜帶 durationSec。沿著匯入操作進入 store,並順著時間軸放置時所用的現有 probeAndCorrectClip 路徑,在匯入時用 history: false 呼叫同一個探測一次,對於其靜態影片已經具有已知長度的圖片則跳過。完成意味著匯入影片或 PNG 後,在任何時間軸放置之前,卡片上就會顯示正確的長度。
由索引模型根據 Issue 內容生成。
描述
A video or image imported from the Media tab shows 0:00.0 on its card. The card only shows the real length once the asset has been placed on the timeline.
Steps
- Open a project, go to Media, then Import media.
- Pick a video (a 15 s H.264 MP4 here) or a PNG.
- The new card reads
clipB.mp4 · 0:00.0 · 11 MB(orstill.png · 0:00.0), and stays that way. - Click the card, then Add to timeline. The clip has the right length, and only now does the card read 0:15.0 (0:05.0 for the image).
Expected: the card shows the asset's length as soon as the import finishes, as a recording's card does.
Seen on 2.4.0-rc.1, macOS 27.0.1 (Mac mini M1) and Ubuntu 24.04 GNOME Wayland. The cause below does not depend on the platform.
Why
The card renders formatSeconds(asset.durationSec ?? 0) (MediaStage.tsx#L220), and the import never sets durationSec, as the comment at useTimeline.ts#L1528-L1533 says. Only placing a clip starts the background probe (probeAndCorrectClip), which writes the duration back to the asset.
Fix direction
Probe the duration once at import, with the same probe and history: false. The card and the first placement then both have it. An image's still video is generated at import with a known length, so it needs no probe.
- 主要語言
- TypeScript
- 星號
- 3.7k
- 分支
- 231
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 150
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getopenscreen/openscreen 的其他 Issue
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reached未關閉bug
難度 2/5 1-3 小時 新手友好度 78/100
getopenscreen/openscreen#1667 ·
維護者通常 1 天內回覆
-
Native review wanted: machine-translated recording bar tooltips (14 locales)可能已有人在做 @auberginewly 於 45 天前認領。 未關閉good first issue help wanted
難度 2/5 1-3 小時 新手友好度 68/100
getopenscreen/openscreen#913 · 5 則留言 ·
維護者通常 1 天內回覆
-
Small papercuts from the 2.4.0-rc.1 end-to-end pass可能已有人在做 @EtienneLescot 今天認領。 未關閉bug
難度 3/5 1-2 天 新手友好度 52/100
getopenscreen/openscreen#1668 ·
維護者通常 1 天內回覆
-
GNOME Wayland: the Notes window does not stay on top可能已有人在做 @EtienneLescot 今天認領。 未關閉bug
難度 4/5 3-5 天 新手友好度 28/100
getopenscreen/openscreen#1666 ·
維護者通常 1 天內回覆
-
bug
難度 3/5 1-2 天 新手友好度 64/100
getopenscreen/openscreen#1665 ·
維護者通常 1 天內回覆
查看 getopenscreen/openscreen 的全部 Issue
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 92/100
lingdojo/kana-dojo#34545 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆
-
blocklist addition
難度 1/5 1 小時以內 新手友好度 82/100
MetaMask/eth-phishing-detect#315455 ·
維護者通常 1 天內回覆
-
area: telegram bug
難度 2/5 1-3 小時 新手友好度 76/100
griffinwork40/agent-afk#5275 ·
維護者通常 1 天內回覆
-
documentation
難度 2/5 1-3 小時 新手友好度 68/100
erkamyaman/rust-anything#371 ·
維護者通常 1 天內回覆
-
Widget: match the chat bubble color to the rest of the widget可能已有人在做 @sethr07 今天認領。 未關閉enhancement frontend help wanted
難度 2/5 半天 新手友好度 75/100
DeadantCo/answerLoopsdev#68 · 3 則留言 ·