Display Subtitles/CC and 4k tag - #917
Title
Pull Request Type
- [ ] Bugfix
- [X] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
Closes #917
Description
Implementation of the "4K" and "Subtitles" labels on video search results. See screenshots. Note: I've only seen this on the search screen so they haven't been implemented anywhere else.
Screenshots
Testing
See screenshots for testing
- Search of 4k and subtitles. Results show 4K and subtitles together
- Search results including just 4K or subtitles separately
- Search results including no 4K and subtitle labels
- Rudimentary check of subscriptions, trending, most popular, history screens. Labels don't appear there. I don't see them on the Youtube website either.
Desktop
- Windows
- 10
- v0.20.0 Beta
Additional context
The implementation is flexible enough to support the addition of more labels such as "Live". I'll leave that for another ticket. Live shouldn't be that difficult, however someone will probably need to implement the icon. The alternative is a red label saying "Live" perhaps with a big text dot in front of it.
Thanks for putting in the initiative on this @dkshxd! Left some suggested changes and questions.
There is also a 8k and a new label. Could you implement those also.
The implementation is flexible enough to support the addition of more labels such as "Live". I'll leave that for another ticket. Live shouldn't be that difficult, however someone will probably need to implement the icon. The alternative is a red label saying "Live" perhaps with a big text dot in front of it.
FreeTube already labels live videos, so unless I am missing something, I doubt we'll need a second label to convey the same information. That being said, a quick look at the linked issue tells me that that paragraph was added due to a missunderstanding of an unrelated comment on that issue about support for live captions (they likely mean either Windows 11's live captions feature where the operating system displays auto-generated captions in a separate window on top of the programs window, so nothing we would have any control over or Google Chrome's closed source proprietary live captions feature, which we would have no way of implementing considering it's closed source and proprietary nature).
Agree with the "Live" label comment, it's already on the video thumbnail, so a duplication won't need to be implemented.
"8k" and "new", I don't see them being supported on the Youtube API we're using. I can see 8k on the JSON response but I suspect someone will have to implement it on the API, unless someone can point it out to me.
I don't see them being supported on the Youtube API we're using.
Do you mean the local API (so YouTube.js) or the Invidious API, because FreeTube supports both?
I don't see them being supported on the Youtube API we're using.
Do you mean the local API (so YouTube.js) or the Invidious API, because FreeTube supports both?
Do you mean the local API (so YouTube.js) or the Invidious API, because FreeTube supports both?
I'm looking at the local API using Youtubei.js. The movie and video objects don't seem have methods/attributes for 8k and new. It's there for live and 4k.
I hope next time the branch name can be non development, can't checkout branch with gh pr checkout 5119
What error are you receiving?
Can only be checkout if latest dev merged into target branch, but no point making this happen since making a new branch to make changes (especially for opening PR) is a common practice already.
I hope next time the branch name can be non development, can't checkout branch with gh pr checkout 5119
@PikachuEXE You can add --branch a-different-name to the command to make it name the local branch differently.
https://cli.github.com/manual/gh_pr_checkout