Skip to content

[YouTube] Refactor some extraction code using Optional#1384

Open
Isira-Seneviratne wants to merge 23 commits into
TeamNewPipe:devfrom
Isira-Seneviratne:Refactor-Optional
Open

[YouTube] Refactor some extraction code using Optional#1384
Isira-Seneviratne wants to merge 23 commits into
TeamNewPipe:devfrom
Isira-Seneviratne:Refactor-Optional

Conversation

@Isira-Seneviratne

Copy link
Copy Markdown
Member

Refactor some of the helper methods in YoutubeParsingHelper to return Optional, which allows the number of lines of code to be significantly reduced.

# Conflicts:
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
@ShareASmile ShareASmile added the code quality Improvements to the codebase to improve the code quality label Jan 29, 2026
# Conflicts:
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMetaInfoHelper.java
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemExtractor.java
# Conflicts:
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelHelper.java
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
#	extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemExtractor.java
@Isira-Seneviratne Isira-Seneviratne requested a review from TobiGr May 11, 2026 00:48
@sonarqubecloud

Copy link
Copy Markdown

@TobiGr

TobiGr commented May 25, 2026

Copy link
Copy Markdown
Contributor

I am not sure if this is going to be needed anymore. The long-term plan is to port the extractor to kotlin.

@Isira-Seneviratne

Copy link
Copy Markdown
Member Author

I am not sure if this is going to be needed anymore. The long-term plan is to port the extractor to kotlin.

When doing the migration, it could be useful as a guide, e.g. Optional#or() can be translated to a ?: block in Kotlin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Improvements to the codebase to improve the code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants