[PR #274] [MERGED] Clamped progress bars to solve problems with -ve numbers #698

Closed
opened 2026-03-02 23:49:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/274
Author: @whiskyplausible
Created: 10/22/2023
Status: Merged
Merged: 10/23/2023
Merged by: @aome510

Base: masterHead: master


📝 Commits (2)

  • 1b396ea Clamped progress bars to solve problems with -ve numbers
  • 30c40fb apply cargo fmt

📊 Changes

1 file changed (+7 additions, -2 deletions)

View changed files

📝 spotify_player/src/ui/playback.rs (+7 -2)

📄 Description

Resolves #273

Negative numbers were sometimes appearing in progress.num_seconds() which would cause a panic, as the ui elements would only accept positive ratios. Clamped the numbers from 0.0 to 1.0 to prevent this happening. Seems to have solved the panics, but no idea where the negative numbers are coming from.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/spotify-player/pull/274 **Author:** [@whiskyplausible](https://github.com/whiskyplausible) **Created:** 10/22/2023 **Status:** ✅ Merged **Merged:** 10/23/2023 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`1b396ea`](https://github.com/aome510/spotify-player/commit/1b396ea93f43f71987975eb619fad9e70f740372) Clamped progress bars to solve problems with -ve numbers - [`30c40fb`](https://github.com/aome510/spotify-player/commit/30c40fb83c2f20bb29be0886f4e3ccc431b6e8d6) apply cargo fmt ### 📊 Changes **1 file changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `spotify_player/src/ui/playback.rs` (+7 -2) </details> ### 📄 Description Resolves #273 Negative numbers were sometimes appearing in progress.num_seconds() which would cause a panic, as the ui elements would only accept positive ratios. Clamped the numbers from 0.0 to 1.0 to prevent this happening. Seems to have solved the panics, but no idea where the negative numbers are coming from. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:49:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#698
No description provided.