Implement the shorts tab on channel pages #3533
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the shorts tab on channel pages
Pull Request Type
Related issue
LuanRT/YouTube.js#401 (Adds support for the accessibility labels, so we can extract the duration of shorts)
iv-org/invidious#3801 (Invidious bug report about the upcoming issue)
Description
This pull request implements the channel shorts tab for both the local and Invidious APIs. As the Invidious API currently has a bug that results in all shorts being labelled as upcoming, this pull request also includes a work around for that.
Sorting is currently broken and will always sort by newest on the Invidious API. Sorting the shorts tab is a todo in their code base: https://github.com/iv-org/invidious/blob/master/src/invidious/channels/videos.cr#L135
Screenshots
too lazy, also it just looks like the videos and live tabs anyway
Testing
Test the shorts tab on both the local and Invidious APIs, including loading more and sorting (sorting only works for the local API at the moment, see description above)
Desktop