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

Fixed a bug that caused erroneous updates of the playlist thumbnails #9755

Merged

Conversation

Jared234
Copy link
Contributor

@Jared234 Jared234 commented Feb 5, 2023

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

This is an attempt to fix the bug mentioned in #9458.
Currently, NewPipe stores the thumbnailUrl in the database. I deleted this field and replaced it with the thumbnailStreamId field, which stores the stream ID of the stream the thumbnail is from.
Since the thumbnailUrl is deeply rooted in the program, I had to make significant changes and perform a database migration to fix this problem.

This PR makes it so that the thumbnail of a playlist is not just a url to an image, but rather is a reference to a stream in the database (which in turn contains a url to an image). This fixes the mentioned bug (since there aren't outdated thumbnails anymore), but also adds the nice feature of the playlist thumbnail getting updated automatically whenever the video's thumbnail changes.

Fixes the following issue(s)

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

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Also nice change. Structure LGTM. Thanks!

@Jared234 Jared234 requested a review from Stypox February 9, 2023 22:53
@Jared234
Copy link
Contributor Author

Jared234 commented Feb 9, 2023

Thanks for the review.

@SameenAhnaf SameenAhnaf added bug Issue is related to a bug GUI Issue is related to the graphical user interface playlist Anything to do with playlists in the app labels Feb 12, 2023
@Jared234
Copy link
Contributor Author

@Stypox Could you perhaps take another look at this? I'm working on NewPipe as part of a project at my university and only contributions pushed by March 1st can count towards my grade. So I would very much appreciate another review.
However, if you don't have time in the next few days, that shouldn't be a problem for NewPipe, since I will finish work on any outstanding issues either way.

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Thanks for the ping. This is almost ready :-)

@sonarcloud
Copy link

sonarcloud bot commented Feb 25, 2023

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

@Jared234 Jared234 requested a review from Stypox February 25, 2023 22:09
@Jared234
Copy link
Contributor Author

Thanks for the review.

Copy link
Member

@Stypox Stypox 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, thank you! I tested by creating some playlists and playing with thumbnails, and then by importing my database. Good luck with the university course ;-)

@Stypox Stypox merged commit 80e0c6a into TeamNewPipe:dev Feb 26, 2023
@Jared234
Copy link
Contributor Author

Thanks for all the help and support during my course. Working with NewPipe was awesome, and I learned a lot. I had a lot of fun, and I'm definitely planning on continuing to work on it after my exams are over. Keep up the great work!

@Stypox Stypox mentioned this pull request Mar 1, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface playlist Anything to do with playlists in the app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Playlist thumbnail doesn't get updated after the "Remove Watched" dialog is used
3 participants