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

Deduplicate SQL queries to get feed streams #8621

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Jul 13, 2022

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

While merging #8545 I noticed there was much duplicated code in the feed loading. There were 4 different SQL queries based on the wanted filtering (all the combination of "filter or not by group" and "include or not played items"). Furthermore #8545 included another condition, but it wasn't implemented in SQL (as it would have meant adding 4 more queries) but rather in code. This PR removes duplicate queries by making the now-only-one query take as input the various filtering conditions. I tested and noticed no changes in the UI behavior.

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@AudricV AudricV added the codequality Improvements to the codebase to improve the code quality label Jul 13, 2022
@litetex litetex self-requested a review July 16, 2022 12:45
Copy link
Member

@litetex litetex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Did a quick test, found no bigger problems.

Only one minor thing:

@Stypox Stypox force-pushed the deduplicate-feed branch from ab0330d to e8669d4 Compare July 18, 2022 21:40
@Stypox
Copy link
Member Author

Stypox commented Jul 18, 2022

@litetex done ;-)

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@litetex litetex merged commit 8f37015 into TeamNewPipe:dev Jul 24, 2022
@Stypox Stypox deleted the deduplicate-feed branch August 4, 2022 09:51
@Stypox Stypox mentioned this pull request Aug 27, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codequality Improvements to the codebase to improve the code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants