-
-
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
Better error handling of terminated channels #5876
Conversation
SonarCloud Quality Gate failed. |
Sorely needed! But... how do you test? xD |
app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt
Outdated
Show resolved
Hide resolved
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.
Two minor things. I guess the files should probably be formatted too.
5aed9b6
to
4b04c95
Compare
4b04c95
to
edd1f6d
Compare
@opusforlife2 I added a manipulated subscription export to the PR description @Stypox Can you help me with the feed loading UI? I am unable to solve that at the moment. Just install the APK, import the subscriptions, refresh the feed and hit unsubscribe or cancel on error to see the problem. |
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 am not sure I understand what I should test. When importing the subscriptions you provided nothing happens (i.e. no subscriptions are added). I tried both importing the json from the subscription fragment and importing the zip from content settings
@Stypox Did you extract the json from the ZIP file before importing it via the subscription import dialog? Anyway, here's a screen cast of the problem. As you can see, the feed keeps loading forever, although loading the items is completed. device-2021-04-01-152332.mp4 |
@TobiGr I tried to understand how the feed loading works but I have failed so far, will try again tomorrow. |
@TobiGr @opusforlife2 what do you think of this implementation? It now shows correctly the loaded feed and shows a dialog for each invalid subscription. If something unrelated to channel being terminated goes wrong (e.g. a network error), the bar at the top correctly shows the number of channels that could not be loaded, instead of showing "Network error". Here is a settings export (--> import it from settings): NewPipeData-20210402_120407.zip |
43451ca
to
bbabf6f
Compare
Thank you. Looks good! I fixed two small bugs (see commit message) |
bbabf6f
to
64ee802
Compare
NewPipeData-20210402_120407.zip |
Sorry, this slipped my mind yesterday. From the Subscriptions tab, I can see the 2 kinds of errors you pointed out: content unavailable, and channel terminated. Refreshing a feed with the terminated Pokemon channel shows "channel terminated, wanna unsub?" so it's fine. Doing the same with the content unavailable channel shows "got error: channel does not exist." No idea if the message is correct here. "Content unavailable" and "channel does not exist" seem like two different things. Now the bugs:
|
64ee802
to
7e90cc4
Compare
Add name of unavailable channel
Fix error dialog not shown when getting elemets from first subscription failed.
7e90cc4
to
b57ecae
Compare
Rebased |
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.
LGTM, thank you :-)
Did you fix the bugs I found? |
What is it?
Description of the changes in your PR
ToDo
Fixes the following issue(s)
Relies on the following changes
Screenshots
Screenshots
APK testing
On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.
I manipulated the subscription export to contain only URls to termianted or not available channels. Extract the json and import it for testing:
newpipe_termianted.json.zip
Due diligence