-
Notifications
You must be signed in to change notification settings - Fork 431
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
Extract metadata for youtube, soundcloud & mediaccc #306
Conversation
...java/org/schabi/newpipe/extractor/services/media_ccc/extractors/MediaCCCStreamExtractor.java
Outdated
Show resolved
Hide resolved
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Outdated
Show resolved
Hide resolved
...java/org/schabi/newpipe/extractor/services/media_ccc/extractors/MediaCCCStreamExtractor.java
Outdated
Show resolved
Hide resolved
.../java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java
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.
According to https://github.com/voc/voctoweb/blob/master/app/admin/event.rb#L115, media.ccc.de does actually use ISO 639-2. Since they have e.g. deu
, it means they're using ISO 639-2/T.
extractor/src/main/java/org/schabi/newpipe/extractor/localization/Localization.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/localization/Localization.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/localization/Localization.java
Outdated
Show resolved
Hide resolved
5bb7234
to
de7515d
Compare
...rc/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractor.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractor.java
Outdated
Show resolved
Hide resolved
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Outdated
Show resolved
Hide resolved
Why is the license function called "getLicence" and not "getLicense"? I think it should be renamed |
Because I'm learning UK english, not American version. In contribution guidelines, it's not stated to use american english. |
@Stypox: I generally prefer US English as well for programming, as that's basically the default. I learnt UK English at school though. |
Oh, didn't know licence was a word, I only ever came across license. Then don't consider my complaint ;-) |
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Outdated
Show resolved
Hide resolved
While you are at this, could you move all of the metadata methods in the base StreamExtractor.java above the "Helper" section? It is confusing to find a helper function sorrounded by interface functions |
@B0pol: Could you rebase and fix the issue for YouTube and SoundCloud? Don't bother making it an |
@wb9688 done |
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.
Could you clean up the commits?
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/localization/Localization.java
Outdated
Show resolved
Hide resolved
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Outdated
Show resolved
Hide resolved
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/utils/JsonUtils.java
Outdated
Show resolved
Hide resolved
...a/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractorDefaultTest.java
Outdated
Show resolved
Hide resolved
...a/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractorDefaultTest.java
Outdated
Show resolved
Hide resolved
...a/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractorDefaultTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCStreamExtractorTest.java
Outdated
Show resolved
Hide resolved
b0434ec
to
eb8411f
Compare
@B0pol could you rebase this one last time? Then it should be absolutely merged 🙈 |
Yes, that just needs to be rebased. I reviewed the code before, but forgot to approve it |
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; the related tests run well on my end; I think this can be merged. @TobiGr
I also included a fix for SoundCloudStreamExtractorTest
, which contained two test-initializing functions which were nor static
neither marked as @BeforeClass
, but instead were marked as @Test
. This caused them to be run at a random time, so sometimes the extractor would be initialized beforehand, other times not, causing NullPointerException
s. Furthermore, such @Test
s were expected to throw GeographicRestrictionException
and SoundCloudGoPlusContentException
inside fetchPage()
, so I added a try-catch that ignores those exceptions. You may ask how the tests can pass if fetchPage()
fails: they pass since the exceptions are thrown after everything has been extracted (see these lines). I don't know why an exception is thrown if everything can be extracted without issues (@TiA4f8R could you investigate?), but this is unrelated to the scope of this PR.
For what tests/streams/tracks? I don't understand. |
@TiA4f8R take a look at the changes in |
It throws an exception because no streams are available for these tracks. |
Then the test for video streams should fail, but it doesn't (unless it is suppressed, I didn't make sure that was the case) |
Extraction for metadata which were added
not solong ago (now), but only for PeerTubefixes #393