Skip to content

Add Playlist Sort By Video Duration#5627

Merged
FreeTubeBot merged 16 commits intoFreeTubeApp:developmentfrom
Hoverth:development
Oct 11, 2024
Merged

Add Playlist Sort By Video Duration#5627
FreeTubeBot merged 16 commits intoFreeTubeApp:developmentfrom
Hoverth:development

Conversation

@Hoverth
Copy link
Contributor

@Hoverth Hoverth commented Aug 31, 2024

Add Playlist Sort By Video Duration

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes: #5268

Description

Closes issue #5268 and PR #5423. It works off what @creotove put in their PR, but also includes a small notification if there is a video in the playlist that does not have a time attached to it.

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 31, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 31, 2024 10:09
auto-merge was automatically disabled September 18, 2024 09:51

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 18, 2024 09:51
auto-merge was automatically disabled September 18, 2024 11:50

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 18, 2024 11:51
auto-merge was automatically disabled September 18, 2024 11:53

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 18, 2024 11:54
auto-merge was automatically disabled September 18, 2024 12:01

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 18, 2024 12:01
@Hoverth
Copy link
Contributor Author

Hoverth commented Sep 18, 2024

Odd. Now it is not displaying the toast message at all

auto-merge was automatically disabled September 18, 2024 12:13

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 18, 2024 12:13
@Hoverth
Copy link
Contributor Author

Hoverth commented Sep 18, 2024

Alright that should fix the issue.

auto-merge was automatically disabled September 19, 2024 03:31

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 19, 2024 03:32
@PikachuEXE
Copy link
Member

Works fine so far except I think the notice should be shown also when changing sort order in single playlist view (unless already shown
This is what I have in mind
(A) (already handled)

  • Enter any single playlist
  • Show notice if last used sorting based on length

(B)

  • Enter any single playlist, last used sorting NOT based on length
  • Switch sort order to based on length
  • Show notice (just once within the same view)

auto-merge was automatically disabled September 21, 2024 03:56

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 21, 2024 03:56
@Hoverth
Copy link
Contributor Author

Hoverth commented Sep 21, 2024

7143e62 moves the call to when the playlist items are sorted, so if you load a playlist and then change the sorting, it'll still show.

This means (A) and most of (B) are handled.

I'm not terribly sure how to make it only fire once though. Thoughts?

auto-merge was automatically disabled September 21, 2024 04:12

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 21, 2024 04:12
@Hoverth
Copy link
Contributor Author

Hoverth commented Sep 21, 2024

Alright, I've given single-firing only a shot, and also tweaked the time to be only 5 seconds, as 10 seemed a little long to me

@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 23, 2024
Copy link
Member

@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.

Maybe just loop it once?
Test locally before committing that change~

Co-authored-by: PikachuEXE <git@pikachuexe.net>
auto-merge was automatically disabled October 2, 2024 01:40

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 2, 2024 01:41
auto-merge was automatically disabled October 2, 2024 01:43

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 2, 2024 01:43
@Hoverth
Copy link
Contributor Author

Hoverth commented Oct 2, 2024

Maybe just loop it once? Test locally before committing that change~

It does feel a little bit faster, but that could just be placebo. Either way, it should be more efficient now.

PikachuEXE
PikachuEXE previously approved these changes Oct 2, 2024
auto-merge was automatically disabled October 4, 2024 09:26

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 4, 2024 09:26
auto-merge was automatically disabled October 4, 2024 09:31

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 4, 2024 09:31
@Hoverth Hoverth requested a review from absidue October 6, 2024 02:33
Copy link
Member

@absidue absidue left a comment

Choose a reason for hiding this comment

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

Not a fan of cloning the entire playlist, but as I can't come up with a better solution at the moment and everything else about this pull request is good, I'll approve.

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.

[Feature Request]: Sort Playlist Videos by Length / Duration

6 participants