[PR #124] [MERGED] Fix panic when seeking beyond track boundaries #618

Closed
opened 2026-02-28 14:50:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/124
Author: @sputnick1124
Created: 11/1/2019
Status: Merged
Merged: 11/1/2019
Merged by: @Rigellute

Base: masterHead: 123-seek-panic


📝 Commits (2)

  • 50f2bf6 fix: prevent panic on impossible backward seek
  • 827e041 fix: prevent panic when seeking past end of track

📊 Changes

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

View changed files

📝 src/app.rs (+15 -2)

📄 Description

Addresses https://github.com/Rigellute/spotify-tui/issues/123.

Not sure if there is an edge case to be concerned about:
If the user is at the end of a track and attempts to seek forward twice quickly (between ticks), it may be possible that self.next_track is called twice and playback unexpectedly skips forward two tracks instead of the one as expected.

Am open to suggestions for better alternatives.


🔄 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/Rigellute/spotify-tui/pull/124 **Author:** [@sputnick1124](https://github.com/sputnick1124) **Created:** 11/1/2019 **Status:** ✅ Merged **Merged:** 11/1/2019 **Merged by:** [@Rigellute](https://github.com/Rigellute) **Base:** `master` ← **Head:** `123-seek-panic` --- ### 📝 Commits (2) - [`50f2bf6`](https://github.com/Rigellute/spotify-tui/commit/50f2bf62ff6e3a26073db228b80aeb343008f085) fix: prevent panic on impossible backward seek - [`827e041`](https://github.com/Rigellute/spotify-tui/commit/827e041ec9954014086bb46bf71d290e067ea3e9) fix: prevent panic when seeking past end of track ### 📊 Changes **1 file changed** (+15 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/app.rs` (+15 -2) </details> ### 📄 Description Addresses https://github.com/Rigellute/spotify-tui/issues/123. Not sure if there is an edge case to be concerned about: If the user is at the end of a track and attempts to seek forward twice quickly (between ticks), it may be possible that `self.next_track` is called twice and playback unexpectedly skips forward two tracks instead of the one as expected. Am open to suggestions for better alternatives. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:50:14 +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-tui#618
No description provided.