-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fixed a bug that caused erroneous updates of the playlist thumbnails #9755
Conversation
There was a problem hiding this 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!
app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java
Outdated
Show resolved
Hide resolved
Thanks for the review. |
@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. |
There was a problem hiding this 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 :-)
app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
Thanks for the review. |
There was a problem hiding this 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 ;-)
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! |
What is it?
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 thethumbnailStreamId
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