Skip to content

Add a zapping mode.#2045

Open
Vinzzzze wants to merge 1 commit intostrawberrymusicplayer:masterfrom
Vinzzzze:play_limited_time
Open

Add a zapping mode.#2045
Vinzzzze wants to merge 1 commit intostrawberrymusicplayer:masterfrom
Vinzzzze:play_limited_time

Conversation

@Vinzzzze
Copy link
Copy Markdown
Contributor

A zapping mode consists in selecting a time in the track and play the specified amount of seconds before and after this selected time.
If the amount of seconds is big enough to start before the beginning of the track, then the amount of seconds before the selected time is reduced to start at the beginning of the track.
Same thing for the end of the track : the amount of seconds after the selected time will be reduced to end at the end of the track.
This function is associated to the playlist itself and is hidden by default ; a button had been added at the end of the search bar in the playlist tab. This button toggle the display of these two values : one value to select the amount of seconds (0 to disable the zapping, it's the default value) before and after the time in percent of the track length.
If you choose 10 seconds around 90% of the track, on a 5mn long track, the play will start at 4mn20s and will end at 4mn40s. On a 1mn long track, the play will start at 44s and will end at the end of the track.

Technical part :

  • playlist had been updated to own the two zapping values (playlist, playlistmanager & smartplaylistsearchpreview).
  • playlistcontainer had been updated to add the button used to toggle the display of the values and the two values had been added with the initialization from the playlist object (translations had been added for the tooltip and button text).
  • the db scheme had been updated to store the zapping values with the playlist (data.qrc, schema-22.sql, database.cpp, playlistbackend)
  • The engine had been updated (mainwindow, player)

@Vinzzzze Vinzzzze force-pushed the play_limited_time branch from aef5055 to db0ee73 Compare March 26, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant