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

Handle missing data in search results #3099

Merged

Conversation

absidue
Copy link
Member

@absidue absidue commented Jan 21, 2023

Handle missing data in search results

Pull Request Type

  • Bugfix

Description

YouTube's search results unfortunately don't always contain all of the information. This pull request adds logic to fix the errors that were occurring when FreeTube encountered the missing data.

Channel search results can contain any combination of handle, subscribers or video count.

Video search results don't always contain the published text.

Playlist search results don't always have a channel id, sometimes it's just some text like "Various artists".

Screenshots

Different types:
types-1-2
type-3 type-4

video

playlist

Testing

Set the search filter to channels and search for zephyr whispers
Clear the search filters and search for rihanna topic
Clear the search filters and search for zephyr vol 1

Desktop

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

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 21, 2023 15:51
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 21, 2023
@absidue
Copy link
Member Author

absidue commented Jan 21, 2023

@LuanRT RE your TODO here https://github.com/LuanRT/YouTube.js/blob/main/src/parser/classes/Channel.ts#L33, I presume that this is why they haven't renamed the properties.

PikachuEXE
PikachuEXE previously approved these changes Jan 22, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 24, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 24, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 24, 2023 17:05
@efb4f5ff-1298-471a-8973-3d47447115dc

Sorry for tapping on disable auto merge. I sometimes think this is another button😅

@FreeTubeBot FreeTubeBot merged commit 14caa8c into FreeTubeApp:development Jan 24, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 24, 2023
@absidue absidue deleted the handle-search-inconsistencies branch January 25, 2023 06:38
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.

5 participants