1414import static com .google .android .exoplayer2 .util .Util .castNonNull ;
1515import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .getAndroidUserAgent ;
1616import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .getIosUserAgent ;
17- import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .getTvHtml5UserAgent ;
1817import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isAndroidStreamingUrl ;
1918import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isIosStreamingUrl ;
20- import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isTvHtml5StreamingUrl ;
2119import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isWebStreamingUrl ;
2220import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isWebEmbeddedPlayerStreamingUrl ;
2321import 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