[PR #385] [CLOSED] Queue behavior & position tracking for consistency #506

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

📋 Pull Request Information

Original PR: https://github.com/jpochyla/psst/pull/385
Author: @arch-btw
Created: 4/12/2023
Status: Closed

Base: masterHead: patch-2


📝 Commits (3)

  • 2e895b2 Queue behavior & position tracking for consistency
  • 68986e8 Update queue.rs
  • 88651d3 Update queue.rs

📊 Changes

1 file changed (+18 additions, -18 deletions)

View changed files

📝 psst-core/src/player/queue.rs (+18 -18)

📄 Description

Trying to improve the queue struct.... by which I mean the way it behaves during playback. So that the order of songs in the queue is consistent when switching between different playback behaviors or modifying queue.

This fixes the following error, which makes the program unusable until restarting it:

thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 10', 
psst-core/src/player/queue.rs:57:13 

With these changes it now is making sure that the positions of the songs in the queue are always tracked properly by initializing the positions vector with the original order of the items. So that the songs are always played in the right order even if the queue behavior changes.

Also fixed a typo (behaviour -> behavior) and removed some unnecessary code.


🔄 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/jpochyla/psst/pull/385 **Author:** [@arch-btw](https://github.com/arch-btw) **Created:** 4/12/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-2` --- ### 📝 Commits (3) - [`2e895b2`](https://github.com/jpochyla/psst/commit/2e895b2ea921f32ee6c6c106c7858b374d73f579) Queue behavior & position tracking for consistency - [`68986e8`](https://github.com/jpochyla/psst/commit/68986e87b752f81d664d8572ef51679d01453b8a) Update queue.rs - [`88651d3`](https://github.com/jpochyla/psst/commit/88651d3d61b7fd77127984761b520ce10f0dd18c) Update queue.rs ### 📊 Changes **1 file changed** (+18 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `psst-core/src/player/queue.rs` (+18 -18) </details> ### 📄 Description Trying to improve the queue struct.... by which I mean the way it behaves during playback. So that the order of songs in the queue is consistent when switching between different playback behaviors or modifying queue. This fixes the following error, which makes the program unusable until restarting it: ``` thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 10', psst-core/src/player/queue.rs:57:13 ``` With these changes it now is making sure that the positions of the songs in the queue are always tracked properly by initializing the positions vector with the original order of the items. So that the songs are always played in the right order even if the queue behavior changes. Also fixed a typo (behaviour -> behavior) and removed some unnecessary code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:33:15 +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/psst#506
No description provided.