-
Notifications
You must be signed in to change notification settings - Fork 422
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
Fix all tests #882
Fix all tests #882
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.
I rebased and added a commit for #877 (comment). Now all tests succeed on my PC. The code you changed also looks good; now we should handle ContentRequiredException
s in NewPipe and allow users to grant consent.
@@ -73,8 +66,13 @@ | |||
import java.util.Random; | |||
import java.util.regex.Pattern; | |||
|
|||
import javax.annotation.Nonnull; | |||
import javax.annotation.Nullable; | |||
import static org.schabi.newpipe.extractor.NewPipe.getDownloader; |
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.
Why does your editor keep moving these around? (do not do anything about it, I just see a lot of these changes in your PRs)
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 like IntelliJ uses a different code style than Android studio (despite being based on the same IDE):
I will reconfigure my IntelliJ so that it uses Android Studio's settings.
I'm not sure what settings we should use here? IntelliJ's or Android Studios?
Maybe we should also track these settings in Git so that they are consistent between developers.
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.
For now I used Android Studios code format, since it's already used in the files.
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.
Maybe we should also track these settings in Git so that they are consistent between developers.
Yeah, good idea. Could you do that, since you already looked into how it works? Thanks
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.
Not in this PR but I created an issue: #892
extractor/src/main/java/org/schabi/newpipe/extractor/exceptions/ConsentRequiredException.java
Outdated
Show resolved
Hide resolved
Yes. This PR does not allow any new consent, as it is |
What I see is that the consent variable has been wrapped in a setter/getter. I assume this is so that other NPE consumers can easily show a consent prompt, e.g. Piped? |
|
I didn't get this bit. |
@Stypox I'm done with my changes you can review again if you have time. |
The "Lofi Girl"-stream got interrupted by a copyright strike and had to be restarted. Because of this a new id is now used.
Also removed the unnecessary ``public``
Also removed the unnecessary ``public`` and reformatted the code a bit
* Removed the unnecessary ``public`` * Use parameterized tests * One song got removed (which caused the test failure), replaced it with another song
The renderers and queries got changed.
Added option to choose if you want to consent or not - currently this is done by a static variable in ``YoutubeParsingHelper`` - may not be the best long-term solution but for now the tests work again (in EU countries) 🥳
The relevant change was made in TeamNewPipe#877
Doesn't work for kurgesagt videos anymore, used music video (copyright free) instead
Update: So there have been a bunch of merge conflicts due to the recent hotfix. These should be fixed now. While fixing the conflicts I also fixed 2 additional problems:
|
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
For #882 (comment), it seems you don't have to change something, as Note that the current code as it is would not fix #876, as this consent is not applied on regular playlists. 1Here is my idea:
|
Should I react to this? If yes: Your solution doesn't make much sense to me, you can simply call Also with foresighted to #833: |
Note: I also fixed #902 by
|
@litetex Could you update the PR description to mention all the changes this makes, such as #882 (comment)? |
This PR fixes all tests.
It also introduces an option to change the YouTube
consent
cookie value, to allow fixing mixes extraction in EU.Supersedes #871, fixes #820.