Skip to content

Commit 25b1339

Browse files
committed
[YouTube] Adapt YoutubeHttpDataSource to TVHTML5 client removal in NPE
1 parent 460cadf commit 25b1339

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/datasource/YoutubeHttpDataSource.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
import static com.google.android.exoplayer2.util.Util.castNonNull;
1515
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getAndroidUserAgent;
1616
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getIosUserAgent;
17-
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getTvHtml5UserAgent;
1817
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.isAndroidStreamingUrl;
1918
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.isIosStreamingUrl;
20-
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.isTvHtml5StreamingUrl;
2119
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.isWebStreamingUrl;
2220
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.isWebEmbeddedPlayerStreamingUrl;
2321
import static java.lang.Math.min;
@@ -661,10 +659,7 @@ private HttpURLConnection makeConnection(
661659
}
662660
}
663661

664-
final boolean isTvHtml5StreamingUrl = isTvHtml5StreamingUrl(requestUrl);
665-
666662
if (isWebStreamingUrl(requestUrl)
667-
|| isTvHtml5StreamingUrl
668663
|| isWebEmbeddedPlayerStreamingUrl(requestUrl)) {
669664
httpURLConnection.setRequestProperty(HttpHeaders.ORIGIN, YOUTUBE_BASE_URL);
670665
httpURLConnection.setRequestProperty(HttpHeaders.REFERER, YOUTUBE_BASE_URL);
@@ -685,9 +680,6 @@ private HttpURLConnection makeConnection(
685680
} else if (isIosStreamingUrl) {
686681
httpURLConnection.setRequestProperty(HttpHeaders.USER_AGENT,
687682
getIosUserAgent(null));
688-
} else if (isTvHtml5StreamingUrl) {
689-
httpURLConnection.setRequestProperty(HttpHeaders.USER_AGENT,
690-
getTvHtml5UserAgent());
691683
} else {
692684
// non-mobile user agent
693685
httpURLConnection.setRequestProperty(HttpHeaders.USER_AGENT, DownloaderImpl.USER_AGENT);

0 commit comments

Comments
 (0)