fix: use Math.floor for short-clip threshold to match displayed duration
ffprobe stores fractional seconds (e.g. 2.033s for a "2s" clip), so <= 2 was too strict. Math.floor matches what the badge shows the user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
00a65853ce
commit
26ef65a27e
1 file changed
+3
-2
@@ -80,8 +80,9 @@ export default function VideosView({ filters = {} }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const shortCount = videos.filter(v => v.duration != null && v.duration <= SHORT_THRESHOLD).length;
|
const isShort = v => v.duration != null && Math.floor(v.duration) <= SHORT_THRESHOLD;
|
||||||
const visible = showShort ? videos : videos.filter(v => v.duration == null || v.duration > SHORT_THRESHOLD);
|
const shortCount = videos.filter(isShort).length;
|
||||||
|
const visible = showShort ? videos : videos.filter(v => !isShort(v));
|
||||||
const groups = groupByMonth(visible).filter(g => g.videos.length > 0);
|
const groups = groupByMonth(visible).filter(g => g.videos.length > 0);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in new issue
Block a user