Repository navigation
Conversation
7 tasks done
theimpulson
reviewed
Oct 16, 2026
theimpulson
requested changes
Oct 16, 2026
theimpulson
left a comment
Member
There was a problem hiding this comment.
Thank you for the contribution. Just one comment about new code being written in Kotlin and missing copyright and license header.
Huge
force-pushed
the
fix/ogg-null-metadata
branch
from
October 17, 2026 06:10
2a47a86 to
a0c2409
Compare
theimpulson
reviewed
Oct 17, 2026
makeMetadata() dereferenced StreamInfo.getUploadDate() unconditionally, but the upload date is null when the service does not provide one, so remuxing such an Opus download to Ogg failed with a NullPointerException. Text fields like the category or the uploader name can be null as well, and makeOpusTagsHeader() called isBlank() on them. Only add the DATE tag when an upload date is known, and skip null values the same way blank ones are already skipped. Fixes TeamNewPipe#13870 Reported-by: BS.ehlas.cz
Huge
force-pushed
the
fix/ogg-null-metadata
branch
from
October 18, 2026 09:23
a0c2409 to
8667212
Compare
|
Author
|
Friendly ping @theimpulson @AudricV — both requested items (SPDX header attributed to NewPipe contributors, and Kotlin test with package-private Whenever you get a chance, could you please take another look? Thank you! |
AudricV
removed their request for review
October 27, 2026 09:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What is it?
Description of the changes in your PR
OggFromWebMWriter.makeMetadata()adds theDATEtag only whenStreamInfo.getUploadDate()is not null. The upload date is optional (DescriptionFragmentchecks it too), so remuxing an Opus download of a stream without one crashed with aNullPointerException.makeOpusTagsHeader()skipsnullvalues the same way it already skips blank ones, so a missing category or uploader name no longer throws inisBlank().OggFromWebMWriterTestcovers both cases. Both tests fail ondevwith the NPEs from the issue and pass with this change.Fixes the following issue(s)
Testing/QA
Devices
.opusfile plays and has the COMMENT, GENRE, ARTIST, TITLE and DATE tags. A stream without an upload date can't be picked from the UI, so that case is covered by the unit tests below.Steps for testing
./gradlew :app:testDebugUnitTest: all 157 unit tests pass, including the 2 new ones inOggFromWebMWriterTest. Without the change inOggFromWebMWriter, both new tests fail with the NPEs from NullPointerException in OggFromWebMWriter.makeMetadata() on null stream metadata fields (uploadDate, url, genre) #13870../gradlew :app:assembleDebugbuilds and checkstyle is clean.APK for 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. You can find more info and a video demonstration on this wiki page.
Due diligence