Skip to content
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

Fix user playlist reverse button behavior #4947

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

kommunarr
Copy link
Collaborator

Fix user playlist reverse button behavior

Pull Request Type

  • Bugfix

Related issue

None

Description

Co-author: @absidue (identified where issue was occurring)

User playlists that are reversed revert to their normal ordering after the next video is loaded. This PR fixes that by making our parseUserPlaylist function maintain a reversed order. It also removes a watch property that @absidue identified as not relevant.

Testing

  • Reverse a playlist and then navigate to another video in the playlist. See that the playlist is still reversed

Desktop

  • OS: OpenSUSE
  • OS Version: TW

Additional context

CC: @PikachuEXE if we're missing a purpose for this watch property. Its removal isn't strictly required for this fix.

Note: we're doing x = x.toReversed() instead x.reverse() to avoid a warning for mutating Vuex data.

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 13, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 13, 2024 21:54
@kommunarr kommunarr requested review from PikachuEXE and absidue April 13, 2024 21:54
@PikachuEXE
Copy link
Collaborator

Not related but found that no progress bar displayed when playlist reversed (remote + local)
Expected?
image

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

About removal of playlistItemId in watch
Seems fine for playlist changes I made when playing the playlist
Should be fine to remove

@kommunarr
Copy link
Collaborator Author

kommunarr commented Apr 14, 2024

Not related but found that no progress bar displayed when playlist reversed (remote + local)
Expected?

Apparently? I'll have to check to see if there's a rationale.

<progress
v-if="!shuffleEnabled && !reversePlaylist"
id="playlistProgressBar"
class="playlistProgressBar"
:value="currentVideoIndexOneBased"
:max="playlistVideoCount"
/>

Edit: To pull out the 2-year old receipts, this is what you had to say about it:

What about only showing this when the order is "ascending" (with shuffling disabled)
We can figure out if that's useful for "reverse order" (I don't even know that exists)

@FreeTubeBot FreeTubeBot merged commit 981e8e4 into FreeTubeApp:development Apr 16, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 16, 2024
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.

5 participants