Add 'Stop after current song' playback option - #13747
Open
mmustafasenoglu wants to merge 2 commits into
Open
Conversation
Adds a fourth repeat mode cycle state that stops playback after the current song ends while keeping the queue intact. The repeat button now cycles through: 1. No repeat (REPEAT_MODE_OFF) 2. Repeat one (REPEAT_MODE_ONE) 3. Repeat all (REPEAT_MODE_ALL) 4. Stop after current song (custom state using REPEAT_MODE_OFF internally) When 'stop after current song' is active: - The repeat button shows a half-transparent repeat_one icon - Playback stops when the current track transitions to the next - The queue remains intact for later continuation - The mode automatically resets when the track ends Implementation: - Added stopAfterCurrentSong boolean field in Player - Added isStopAfterCurrentSong() getter - Modified cycleNextRepeatMode() to include the 4th state - Added onStopAfterCurrentSongChanged() callback in PlayerUi - Updated VideoPlayerUi, PlayQueueActivity, NotificationPlayerUi, MediaSessionPlayerUi, and NotificationActionData to handle the new mode - Added notification string resource for the new mode Fixes TeamNewPipe#12726
|
TobiGr
requested changes
Aug 13, 2026
| <string name="notification_actions_summary_android13">Edit each notification action below by tapping on it. The first three actions (play/pause, previous and next) are set by the system and cannot be customized.</string> | ||
| <string name="notification_actions_at_most_three">You can select at most three actions to show in the compact notification!</string> | ||
| <string name="notification_action_repeat">Repeat</string> | ||
| <string name="notification_action_stop_after_current">Stop after current song</string> |
Contributor
There was a problem hiding this comment.
Suggested change
| <string name="notification_action_stop_after_current">Stop after current song</string> | |
| <string name="notification_action_stop_after_current">Stop after current stream</string> |
| // minimized to background but will resume automatically to the original player type | ||
| private boolean isAudioOnly = false; | ||
| private boolean isPrepared = false; | ||
| private boolean stopAfterCurrentSong = false; |
Contributor
There was a problem hiding this comment.
We use the term stream because NewPipe can play both video and audio and NewPipe is not a music pkayer. Plesse use it throughout the whole PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What is it?
Description of the changes in your PR
Adds a fourth repeat mode cycle state that stops playback after the current song ends while keeping the queue intact.
The repeat button now cycles through:
When 'stop after current song' is active:
Implementation details
stopAfterCurrentSongboolean field in Player.javaisStopAfterCurrentSong()getter andonStopAfterCurrentSongChanged()callbackcycleNextRepeatMode()to include the 4th state (cycles: OFF -> ONE -> ALL -> STOP_CURRENT -> OFF)notification_action_stop_after_currentFixes the following issue(s)
Due diligence