Add: Sort Playlist Videos by Length / Duration fixed Issue#5268
Title
Pull Request Type
- [ ] Bugfix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
Description
Screenshots
Testing
Desktop
- OS:
- OS Version:
- FreeTube version:
Additional context
As I mentioned on that issue, you will have to handle that the duration can be completely missing.
@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.
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:
- Hide the sort by duration option when at least one video in the playlist is missing it's duration.
- 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 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.
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.
This PR was closed because it has been stalled for 14 days with no activity.