-
-
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
Add Show Channel Details where it's missing #6919
Add Show Channel Details where it's missing #6919
Conversation
Need to test:Install the APK from GitHub Actions, then test
Open Android Studio and connect to the app process, open |
app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistStreamEntry.kt
Outdated
Show resolved
Hide resolved
For me that test has served it's purpose and can be deleted. An existing migration should never be changed afterwards =>code never changes => regression can never occur => tests are useless Opinions? @Stypox |
When creating a |
Mmmh, you are right. Though, we need to put a comment in the database migrations file explaining that a test must be created when creating a PR with a migration, and then be removed just before the PR is merged. Another option instead would be to always keep a migration test from the current version - 1 to the current version, so that is can be used as reference, can be easily edited and does not need to be created and then removed just afterwards (which may cause problems if e.g. something is changed after it is removed and reviewers do not notice). |
Seems like it would be a good idea to have the most recent migration test kept as a reminder / make sure there haven't been any database changes. I think any change in the database schema would make the test fail. |
This comment has been minimized.
This comment has been minimized.
Bare minimum passing test in 02aa6fc, feel free to request changes. |
In a better world, you would not test the migrations, but test if the app is still working after applying the migrations. In this case I don't see any benefit to add a test for the migration. If the feature works by trying it out manually, then the migration already succeeded. And it is simple enough, that having that manual try out is good enough. |
Ok, I get your point @XiangRongLin. Let's remove the database test completely and test migrations manually from now on then. @ktprograms sorry for having you write a bare minimum test if it is going to be removed ;-). Could you add a comment just after
Thank you :-) |
No problem. Wasn't much trouble. Changes made in 967bdf8 |
///////////////////////////////////////////////////////////////////////////// | ||
// Test new migrations manually by importing a database from daily usage // | ||
// and checking if the migration works (Use the Database Inspector // | ||
// https://developer.android.com/studio/inspect/database). // | ||
// If you add a migration point it out in the pull request, so that // | ||
// others remember to test it themselves. // | ||
///////////////////////////////////////////////////////////////////////////// |
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.
Perfect, thank you :-)
if (isNullOrEmpty(item.getUploaderUrl())) { | ||
final int serviceId = item.getServiceId(); | ||
final String url = item.getUrl(); | ||
// TODO: Some visual loading indicator |
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.
I don't know what to suggest; maybe it can do without a loading indicator (similar to the "Mark as watched" action present in 0.21.9).
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.
I think there should be some kind of indicator (even just a Toast
), won't seem like the app's hanging.
How can I comment on lines of code without doing a review? |
@ktprograms There is a review type "Comment" meant just for this. You can select that, or choose to "Add a single comment" directly. |
Thanks, I clicked the "Add single comment" button so why does it show as |
@Stypox do you mind trying to import again (maybe from a different export) since this issue can't seem to be reproduced? |
@ktprograms Because when you're commenting on the code you're also reviewing it, in essence? Does it matter, though? It's just semantics. The functionality is there for you to comment on code. How Github shows it or what it's called doesn't seem important to me. |
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.
My database was missing a CREATE INDEX `index_feed_group_sort_order` ON `feed_group` (`sort_order`);}
, probably since I used that database in a temporary version of #2309 and then exported and re-imported it in a normal NewPipe release, and the correct migrations never ran since the database version was already up to date. So yes, ignore my crash report. I can confirm this works, thank you!
Uhm, the build is failing @ktprograms |
Not sure why, seems to be a checkstyle error but it doesn't happen on my local repo. |
Oops, was testing building on the wrong branch. @Stypox can you re-run the build please? |
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.
Thank you!
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.
Thank you!
This checks if the uploaderUrl is in the database, if not it gets the uploaderUrl and puts it in the database. This is similar to the fetching of uploaderUrl when it doesn't exist done in TeamNewPipe#6919.
This checks if the uploaderUrl is in the database, if not it gets the uploaderUrl and puts it in the database. This is similar to the fetching of uploaderUrl when it doesn't exist done in TeamNewPipe#6919. Also use createNotification when error occurs in getStreamInfo.
This checks if the uploaderUrl is in the database, if not it gets the uploaderUrl and puts it in the database. This is similar to the fetching of uploaderUrl when it doesn't exist done in TeamNewPipe#6919. Also use createNotification when error occurs in getStreamInfo.
This checks if the uploaderUrl is in the database, if not it gets the uploaderUrl and puts it in the database. This is similar to the fetching of uploaderUrl when it doesn't exist done in TeamNewPipe#6919. Also use createNotification when error occurs in getStreamInfo.
This checks if the uploaderUrl is in the database, if not it gets the uploaderUrl and puts it in the database. This is similar to the fetching of uploaderUrl when it doesn't exist done in TeamNewPipe#6919. Also use createNotification when error occurs in getStreamInfo.
This checks if the uploaderUrl is in the database, if not it gets the uploaderUrl and puts it in the database. This is similar to the fetching of uploaderUrl when it doesn't exist done in TeamNewPipe#6919. Also use createNotification when error occurs in getStreamInfo.
This checks if the uploaderUrl is in the database, if not it gets the uploaderUrl and puts it in the database. This is similar to the fetching of uploaderUrl when it doesn't exist done in TeamNewPipe#6919. Also use createNotification when error occurs in getStreamInfo.
What is it?
Description of the changes in your PR
Show Channel Details
toLocal Playlists
,Watch History
andSubscription Feeds
uploader_url
column. Also added a databaseMigration
and changed the version number to4
.Show Channel Details
and theuploader_url
is empty in the database, it fetches it using theNewpipe Extractor
and saves it to the database.kapt "org.xerial:sqlite-jdbc:3.34.0"
tobuild.gradle
as a workaround on M1 Macs. Doesn't seem to hurt the build on other machines so I left it in.Before/After Screenshots/Screen Record
- After:
Fixes the following issue(s)
TODO:
uploader_url
from theNewpipe Extractor
.Options
Option 1: Just test migrating directly from `2` to `4`.Option 2: Use SupportSQLiteDatabase
query
andDatabaseUtils.dumpCusrorToString
.Option 3: Hopefully someone knows the correct way to do it...
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