FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Add: Sort Playlist Videos by Length / Duration fixed Issue#5268

Open creotove opened this issue 1 year ago • 6 comments

Title

Pull Request Type

  • [ ] Bugfix
  • [x] Feature Implementation
  • [ ] Documentation
  • [ ] Other

Related issue

Description

Screenshots

Testing

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

creotove avatar Jul 16 '24 15:07 creotove

As I mentioned on that issue, you will have to handle that the duration can be completely missing.

absidue avatar Jul 16 '24 17:07 absidue

@absidue ohh sorry, there is no way that we can sort them properly, but still we can sort them by optionally checking the property and if the there is no property of lengthSeconds then that video will be shown to the top/bottom of the playlist, should I apply this? If any other proposal you need to add to implement in this feature you can add that.

creotove avatar Jul 17 '24 06:07 creotove

If you still want to proceed with this pull request, it definitely needs some handling for videos without durations.

Here are my two suggestions, feel free to pick one or suggest alternative ideas:

  1. Hide the sort by duration option when at least one video in the playlist is missing it's duration.
  2. Your suggestion of placing videos without duration at the top or bottom of the list depending on the sort direction, with the addition of a message warning the user that the sorting is inaccurate due to one or more videos in the playlist missing their duration.

absidue avatar Jul 27 '24 10:07 absidue

@absidue okk sure i can do that and as i read your alternative consideration in the main issue that user need to manually click the "up" button several times on each video to sort videos according to user need, we can implement a drag and drop feature there instead of manual buttons.

creotove avatar Jul 27 '24 10:07 creotove

we can implement a drag and drop feature there instead of manual buttons.

I think that is out of scope of this PR though but if you want to look at it, see https://github.com/FreeTubeApp/FreeTube/issues/4872

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Aug 27 '24 01:08 github-actions[bot]

This PR was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Sep 10 '24 01:09 github-actions[bot]