Skip to content

Next and Previous in Playlist Shortcuts #7593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: development
Choose a base branch
from

Conversation

im-jking
Copy link

@im-jking im-jking commented Jun 24, 2025

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes #2138

Description

Implement "Shift+n" and "Shift+p" to skip to next and previous video in playlist, respectively. When outside of playlist with autoplay enabled, "Shift+n" skips to the next recommended video. Update localization and shortcut files accordingly.

Screenshots

No visible change

Testing

  1. Find and play any video in a playlist.
  2. Skip forward with "shift+n" or backward with "shift+p"
  3. Verify border cases by going to end (should not loop unless selected) and beginning (should loop), check with shuffle and/or loop selected.
  4. Select any video not in a playlist - with autoplay disabled - and verify these shortcuts have no effect.
  5. Enable autoplay and verify that "Shift+n" skips to the next recommended video, while "Shift+p" has no effect.
  6. Disable recommended videos under Settings -> Distraction Free -> Watch Page -> Disable Recommended Videos. Verify shortcuts have no effect.

Desktop

  • OS:
    • Fedora 42
  • FreeTube version:
    • 0.23.5

Additional context

N/A

@im-jking im-jking marked this pull request as ready for review June 24, 2025 02:03
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 24, 2025 02:03
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 24, 2025
Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like laid out in #2138 (comment)

When watching regular videos outside of a playlist shift+p should skip to the next video in the recommended section if autoplay is enabled

Note: autoplay will be hidden when the following setting is enabled: Settings -> distraction free -> watch page -> Hide recommended videos

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jun 24, 2025
auto-merge was automatically disabled June 25, 2025 04:34

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 25, 2025 04:34
@im-jking
Copy link
Author

Requested changes have been implemented, with the original PR message edited to reflect this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording of "Next in playlist" doesnt fully cover what its actually doing. shift + n can also be used outside of a playlist.

Therefore im requesting changes to the wording of both Next and Previous in playlist (previous being changed too because of wording consistency).

I think its best to also make these changes in the code instead of changing only the user facing strings

…mments and localization text to reflect these changes
auto-merge was automatically disabled June 30, 2025 01:31

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 30, 2025 01:31
@im-jking
Copy link
Author

I clarified the language - function names are a bit more general now, but comments and user-facing text should clarify this functionality. I modified the suggested text a bit because it was a bit verbose for the help menu. Let me know if you think the text you requested is the better option.

auto-merge was automatically disabled July 8, 2025 02:21

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 8, 2025 02:21
auto-merge was automatically disabled July 9, 2025 01:02

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 9, 2025 01:02
auto-merge was automatically disabled July 10, 2025 03:36

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 10, 2025 03:36
@im-jking im-jking requested a review from PikachuEXE July 10, 2025 03:40
@@ -1217,3 +1217,5 @@ KeyboardShortcutPrompt:
Skip by Tenths: Skip through video by percentage (3 skips to 30% of duration)
Home: Seek to the beginning of the video
End: Seek to the end of the video
Skip to Next Video: Skip to the next video (when using a playlist or when autoplay is enabled)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I think the recommended bit needs to be included coz FT got 2 autoplay
image

Suggested change
Skip to Next Video: Skip to the next video (when using a playlist or when autoplay is enabled)
Skip to Next Video: Skip to the next video (inside a playlist or when Autoplay Recommended Videos enabled)

Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PikachuEXE actually i disagree. That setting can be off in the settings but an user can still watch a video and turn autoplay on manually in the player. It will be on for remainder of that watch session

So the user doesn't have to explicitly enable that setting in order for it to work

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I am fine with autoplay wording
The only question left is why autoplay is required to be on to play next recommended video
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I required autoplay because that was requested in the first response, but I'd be happy to change that if there's a consensus

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I see #2138 (comment) is saying
Should move to the next video. If you're using a playlist, will go to the next video of the playlist. If not using a playlist, it will move to the next YouTube suggested video

The YT suggested video can be disabled with Hide recommended videos (I forgot to test that
But does that care about autoplay enabled or not? I haven't tested this on Youtube

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there are no recommended videos, the shortcut has no effect. On YouTube, the shortcut works whether or not autoplay is enabled. So to match up functionality I can remove any checking of autoplay if that sounds good

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still new to contributing here so just trying get confirmation before I step on toes

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes let's follow YT behaviour since this is copying YT keyboard shortcuts :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and pushed

auto-merge was automatically disabled July 11, 2025 04:24

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 11, 2025 04:24
Co-authored-by: PikachuEXE <git@pikachuexe.net>
auto-merge was automatically disabled July 11, 2025 04:25

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 11, 2025 04:26
PikachuEXE
PikachuEXE previously approved these changes Jul 11, 2025
Co-authored-by: efb4f5ff-1298-471a-8973-3d47447115dc <73130443+efb4f5ff-1298-471a-8973-3d47447115dc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: waiting for review For PRs that are complete, tested, and ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add remaining YT player keyboard shortcuts
3 participants