fix(now-playing): hide zero-valued track metadata badges (#865)

* fix(now-playing): hide zero-valued track metadata badges

Use explicit > 0 checks instead of truthy && so missing numeric fields
(bitDepth, bitRate, samplingRate, year, rating) no longer render as "0".

* chore: note PR #865 in changelog and credits

* chore: drop PR #865 from settings credits (minor fix)

* fix(now-playing): null-safe numeric badge guards for tsc

Use (value ?? 0) > 0 so optional metadata fields satisfy strict TS
while still omitting zero-valued badges in the UI.
This commit is contained in:
cucadmuh
2026-05-24 21:27:21 +03:00
committed by GitHub
parent 11974e1438
commit de6462cbd2
2 changed files with 14 additions and 6 deletions
+8
View File
@@ -290,6 +290,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Now Playing — stray zero metadata badges
**By [@cucadmuh](https://github.com/cucadmuh), PR [#865](https://github.com/Psychotoxical/psysonic/pull/865)**
* Hero track-info badges no longer render literal `0` when numeric metadata fields (bit depth, bitrate, sample rate, year, rating) are missing and arrive as zero from the server.
## [1.46.0] - 2026-05-18
> **🙏 Special thanks to [@zz5zz](https://github.com/zz5zz)** for his tireless quirk-spotting and bug reports on the [Psysonic Discord](https://discord.gg/AMnDRErm4u) — several of the polish fixes in this release landed directly off the back of his messages.