pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix "end time" to account for playback speed

Pas 7014d85f 654cb061

+6 -1
+6 -1
src/components/player/atoms/Time.tsx
··· 8 8 export function Time(props: { short?: boolean }) { 9 9 const timeFormat = usePlayerStore((s) => s.interface.timeFormat); 10 10 const setTimeFormat = usePlayerStore((s) => s.setTimeFormat); 11 + const playbackRate = usePlayerStore((s) => s.mediaPlaying.playbackRate); 11 12 12 13 const { 13 14 duration: timeDuration, ··· 32 33 ); 33 34 const secondsRemaining = Math.abs(currentTime - timeDuration); 34 35 36 + // Adjust seconds remaining based on playback speed 37 + const secondsRemainingAdjusted = 38 + playbackRate > 0 ? secondsRemaining / playbackRate : secondsRemaining; 39 + 35 40 const timeLeft = formatSeconds( 36 41 secondsRemaining, 37 42 durationExceedsHour(secondsRemaining), 38 43 ); 39 44 const timeWatched = formatSeconds(currentTime, hasHours); 40 - const timeFinished = new Date(Date.now() + secondsRemaining * 1e3); 45 + const timeFinished = new Date(Date.now() + secondsRemainingAdjusted * 1e3); 41 46 const duration = formatSeconds(timeDuration, hasHours); 42 47 43 48 let localizationKey =