Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local API: Add support for hashtag pages #3483

Merged

Conversation

ChunkyProgrammer
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer commented May 3, 2023

Local API: Add support for hashtag pages

Pull Request Type

  • Feature Implementation

Description

This PR adds support for YouTube hashtag pages when the local api is enabled.

It is not added for Invidious because:

Screenshots

image

Testing

Search test

  • type https://www.youtube.com/hashtag/cats in the search/nav bar
  • scroll all the way down
  • click fetch more

Description Test - Invidious

  • enable invidious api
  • disable fallback
  • go to https://youtu.be/v6jw6KRIOmw
  • click on # in description
  • be redirected to hashtag page
  • see "only supported by local api" message

Description Test - Invidious w fallback

  • enable invidious api
  • enable fallback
  • go to https://youtu.be/v6jw6KRIOmw
  • click on # in description
  • be redirected to hashtag page
  • see videos

Description Test - Local

Desktop

  • OS: Windows
  • OS Version: 11
  • FreeTube version: 0.18.0

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label May 3, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 3, 2023 04:02
Copy link
Collaborator

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

Tested https://www.youtube.com/hashtag/pikachu
image

However I think we need more stuff tested. such as hashtag in video description
Example video with tags in description: https://youtu.be/v6jw6KRIOmw

Also here is screenshot for hashtag view when using IV
image

static/locales/en-US.yaml Outdated Show resolved Hide resolved
src/renderer/views/Hashtag/Hashtag.js Outdated Show resolved Hide resolved
src/renderer/views/Hashtag/Hashtag.js Outdated Show resolved Hide resolved
static/locales/en-US.yaml Outdated Show resolved Hide resolved
src/renderer/views/Hashtag/Hashtag.vue Outdated Show resolved Hide resolved
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
PikachuEXE
PikachuEXE previously approved these changes May 6, 2023
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.

Would be cool if you could do something similar to what we do with the channel handles, so that you can search for #shorts without needing to type out the full https://youtube.com/hashtag/shorts URL.

src/renderer/views/Hashtag/Hashtag.vue Outdated Show resolved Hide resolved
@absidue
Copy link
Member

absidue commented May 6, 2023

The #shorts thing is just a nice to have, happy to approve without that too.

@efb4f5ff-1298-471a-8973-3d47447115dc

LGTM, just curious before approval. Is there a reason u didnt add video and channel count?

Capture

@absidue
Copy link
Member

absidue commented May 6, 2023

Probably because YouTube returns it in this single line of text, which is annoying to parse (we need to parse it if we want it to be translatable) shorts-info

@ChunkyProgrammer
Copy link
Member Author

Probably because YouTube returns it in this single line of text, which is annoying to parse (we need to parse it if we want it to be translatable) shorts-info

That and invidious currently does not parse that

@ChunkyProgrammer
Copy link
Member Author

The #shorts thing is just a nice to have, happy to approve without that too.

I'll add that later tonight (if i have time)

Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
@efb4f5ff-1298-471a-8973-3d47447115dc

Im not sure if i like searching for hashtags like that. With @[insert channel name] its clear u searching for the channel because it is mostly used for that. With hashtags i get other results if i search it normally vs this special hashtag tab.

FreeTube_SSyrO3BSrz.mp4

Lets say im looking for that episode but only remembering finding it on yt using these keywords. On FT u can never find it again.

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
@ChunkyProgrammer
Copy link
Member Author

Okay, i think i'll remove the hashtag search option.
This is the way youtube does it when you search a hashtag.
Screenshots_2023-05-07-14-39-27

@efb4f5ff-1298-471a-8973-3d47447115dc

Is it possible for u to implement the #search come up in the search results in this PR?

@ChunkyProgrammer
Copy link
Member Author

ChunkyProgrammer commented May 7, 2023

Is it possible for u to implement the #search come up in the search results in this PR?

I dont think it's supported by invidious nor youtube.js at the moment

@FreeTubeBot FreeTubeBot merged commit a4d45b5 into FreeTubeApp:development May 13, 2023
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 13, 2023
@ChunkyProgrammer ChunkyProgrammer deleted the feat-hashtag-pages branch July 3, 2023 00:29
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.

None yet

5 participants