Playlist modes #24

Open
opened 2025-05-27 19:09:45 +00:00 by matthias · 0 comments
Owner

The player should support multiple playlist modes. At least the following modes should be supported:

  • Album: The playlist consists of one or more track. Whenever playback of the playlist starts, it begins at the first track and plays the tracks sequentially until the end of the list is reached. Then the playback stops.

  • Audiobook: The playlist consists of one or more tracks. Whenever playback of the playlist begins, it resumes at the saved track and time offset in the track. When no saved track/time exists, playback begins at the first track. When playback of the playlist is stopped, the current track and time offset are saved. When the end of the playlist is reached, playback stops and the saved track and time offset are deleted.

Internally, this should be implemented using two flags that can be set per playlist:

  • Shuffle: Boolean. If set, the playlist is shuffled. If unset, the playlist is played in order.
  • Persist: Enum (Off, Track, Offset): If set to Offset, the previous playback position (track+offset) is saved when playback stops and restored when playback starts. If set to Track, only the previous track is saved when playback stops and restored when playback starts (starts at offset 0). If shuffle is set, the shuffled order is persisted too. When playback reaches the end of the playlist, the saved position and shuffle order is deleted.
    If Off, the playlist starts at the beginning when playback starts. A new shuffle order is determined each time playback starts.
The player should support multiple playlist modes. At least the following modes should be supported: - Album: The playlist consists of one or more track. Whenever playback of the playlist starts, it begins at the first track and plays the tracks sequentially until the end of the list is reached. Then the playback stops. - Audiobook: The playlist consists of one or more tracks. Whenever playback of the playlist begins, it resumes at the saved track and time offset in the track. When no saved track/time exists, playback begins at the first track. When playback of the playlist is stopped, the current track and time offset are saved. When the end of the playlist is reached, playback stops and the saved track and time offset are deleted. Internally, this should be implemented using two flags that can be set per playlist: - Shuffle: Boolean. If set, the playlist is shuffled. If unset, the playlist is played in order. - Persist: Enum (Off, Track, Offset): If set to Offset, the previous playback position (track+offset) is saved when playback stops and restored when playback starts. If set to Track, only the previous track is saved when playback stops and restored when playback starts (starts at offset 0). If shuffle is set, the shuffled order is persisted too. When playback reaches the end of the playlist, the saved position and shuffle order is deleted. If Off, the playlist starts at the beginning when playback starts. A new shuffle order is determined each time playback starts.
matthias added this to the MVP project 2025-05-27 19:09:45 +00:00
matthias changed title from Playlist mode: Album to Playlist modes 2025-05-27 20:57:31 +00:00
matthias referenced this issue from a commit 2025-08-27 11:56:11 +00:00
matthias referenced this issue from a commit 2025-08-27 14:18:05 +00:00
matthias referenced this issue from a commit 2025-08-28 15:37:50 +00:00
matthias referenced this issue from a commit 2025-08-28 16:06:41 +00:00
matthias referenced this issue from a commit 2025-10-07 20:24:19 +00:00
matthias moved this to To Do in MVP on 2025-10-31 17:27:52 +00:00
matthias moved this to Done in MVP on 2025-11-09 14:32:40 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TonBERRY/tonberry-pico#24