mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
fix(format): round human duration totals to the nearest minute (#710)
* fix(format): round human duration totals to the nearest minute The Phase L dedup refactor folded the old `formatAlbumDuration` helper into `formatHumanHoursMinutes`, but the shared version truncated seconds to whole minutes instead of rounding. Aggregate duration labels (album, playlist, total playtime) could read up to ~59 s short and flip the hour boundary the wrong way — a 59:30 total showed "59 m" instead of "1 h 0 m". Restore the round-to-nearest-minute behaviour (and the negative-input clamp) the helper had before the consolidation. Adds a test pinning the rounding and the hour-boundary roll-up so it can't regress again. * docs(changelog): add human-duration rounding fix under Fixed (#710)
This commit is contained in:
committed by
GitHub
parent
778c9e00fd
commit
a7a3148949
@@ -284,6 +284,12 @@ Foundational work: faster reviews, narrower diffs, and a safety net under the pa
|
||||
|
||||
## Fixed
|
||||
|
||||
### Statistics / playlists — duration totals rounded to the nearest minute again
|
||||
|
||||
**By [@Psychotoxical](https://github.com/Psychotoxical), PR [#710](https://github.com/Psychotoxical/psysonic/pull/710)**
|
||||
|
||||
* Aggregate duration labels (album and playlist totals, total playtime in **Statistics**) could read up to ~59 s short and round the wrong way at the hour boundary — a 59:30 total showed **"59 m"** instead of **"1 h 0 m"**. A `format` helper consolidation had switched the shared formatter from rounding to truncating; the round-to-nearest-minute behaviour is restored.
|
||||
|
||||
### Artists — infinite scroll after first page
|
||||
|
||||
**By [@cucadmuh](https://github.com/cucadmuh), PR [#709](https://github.com/Psychotoxical/psysonic/pull/709)**
|
||||
|
||||
Reference in New Issue
Block a user