-
Notifications
You must be signed in to change notification settings - Fork 845
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
Fix local API search erroring, because the default parameter values were not getting applied #4704
Merged
FreeTubeBot
merged 1 commit into
FreeTubeApp:development
from
absidue:fix-search-erroring
Feb 22, 2024
Merged
Fix local API search erroring, because the default parameter values were not getting applied #4704
FreeTubeBot
merged 1 commit into
FreeTubeApp:development
from
absidue:fix-search-erroring
Feb 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
absidue
requested review from
PikachuEXE,
efb4f5ff-1298-471a-8973-3d47447115dc,
ChunkyProgrammer,
kommunarr and
MarmadileManteater
February 22, 2024 18:24
github-actions
bot
added
the
PR: waiting for review
For PRs that are complete, tested, and ready for review
label
Feb 22, 2024
…ere not getting applied
absidue
force-pushed
the
fix-search-erroring
branch
from
February 22, 2024 18:29
53114b0
to
970359d
Compare
absidue
changed the title
Fix local API search erroring, because of default parameter values were not getting applied
Fix local API search erroring, because the default parameter values were not getting applied
Feb 22, 2024
ChunkyProgrammer
approved these changes
Feb 22, 2024
MarmadileManteater
approved these changes
Feb 22, 2024
efb4f5ff-1298-471a-8973-3d47447115dc
approved these changes
Feb 22, 2024
github-actions
bot
removed
the
PR: waiting for review
For PRs that are complete, tested, and ready for review
label
Feb 22, 2024
PikachuEXE
added a commit
to PikachuEXE/FreeTube
that referenced
this pull request
Feb 22, 2024
…-user-playlist-2 * development: (37 commits) Fix local API search erroring, because the default parameter values were not getting applied (FreeTubeApp#4704) Hide date and views separator on the watch page when views are hidden (FreeTubeApp#4697) Translated using Weblate (Ukrainian) Translated using Weblate (Polish) Translated using Weblate (Estonian) Bump webpack from 5.90.1 to 5.90.3 (FreeTubeApp#4696) Bump sass from 1.70.0 to 1.71.0 (FreeTubeApp#4693) Bump electron from 28.2.2 to 28.2.3 (FreeTubeApp#4692) Bump the stylelint group with 1 update (FreeTubeApp#4691) Remove unused isLoading from ft-community-post (FreeTubeApp#4684) Include swiper version in CSS file name, for cache busting (FreeTubeApp#4685) Translated using Weblate (Chinese (Traditional)) Fix local API erroring when the view count is missing on the channel shorts tab (FreeTubeApp#4689) Translated using Weblate (Croatian) Translated using Weblate (Polish) Fix Hungarian Locale Name (FreeTubeApp#4686) Translated using Weblate (Dutch) Translated using Weblate (French) Translated using Weblate (Spanish) Bump marked from 11.2.0 to 12.0.0 (FreeTubeApp#4638) ...
PikachuEXE
added a commit
to PikachuEXE/FreeTube
that referenced
this pull request
Feb 22, 2024
…into custom-builds/tmp * feature/playlist-search-videos-in-one-user-playlist-2: Fix local API search erroring, because the default parameter values were not getting applied (FreeTubeApp#4704) * Show message when search returns no result ! Fix load more button appears when searching & visible items under pagination limit * Update single playlist view for user playlists to add search video function
6 tasks
OothecaPickle
pushed a commit
to OothecaPickle/FreeTube
that referenced
this pull request
Feb 23, 2024
…ere not getting applied (FreeTubeApp#4704)
absidue
added a commit
that referenced
this pull request
Feb 23, 2024
…ere not getting applied (#4704)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix local API search erroring, because the default parameter values were not getting applied
Pull Request Type
Related issue
closes #4703 (discussion will have to be closed manually because github only supports automatically closing issues and pull requests)
Description
This pull request only fixes the search, it does not fix the watch page, that will require a different fix.
Previously the default values for the
createInnertube
function were only being set, if no options were passed in. As the search passes in thesafetyMode
setting, this mean that none of the defaults were getting applied.generateSessionLocally
is meant to default totrue
, but as the defaults were only getting applied when no options were passed in that meant thatgenerateSessionLocally
was actuallyundefined
for the search,undefined
is falsey, so we were actually generating a real session for every search that the user made.This pull request changes the code so that the the defaults are applied on a parameter level instead of only when the entire options object is missing.
Testing
Search with the local API. No errors should show up and in the devtools you should only see a request to the
/search
endpoint (previously it did an extra unintended request to sw.js_data).Desktop