Skip to content

Commit

Permalink
[YouTube Music] Use StandardCharsets.UTF_8
Browse files Browse the repository at this point in the history
  • Loading branch information
Stypox committed Jan 27, 2021
1 parent dc7cfde commit 0cc055b
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@
import org.schabi.newpipe.extractor.search.InfoItemsSearchCollector;
import org.schabi.newpipe.extractor.search.SearchExtractor;
import org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper;
import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubePlaylistLinkHandlerFactory;
import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeStreamLinkHandlerFactory;
import org.schabi.newpipe.extractor.utils.JsonUtils;
import org.schabi.newpipe.extractor.utils.Parser;
import org.schabi.newpipe.extractor.utils.Utils;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Nonnull;

import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.*;
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.fixThumbnailUrl;
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getTextFromObject;
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getUrlFromNavigationEndpoint;
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getValidJsonResponseBody;
import static org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.MUSIC_ALBUMS;
import static org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.MUSIC_ARTISTS;
import static org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.MUSIC_PLAYLISTS;
Expand Down Expand Up @@ -106,7 +108,7 @@ public void onFetchPage(@Nonnull final Downloader downloader) throws IOException
.end()
.value("query", getSearchString())
.value("params", params)
.end().done().getBytes("UTF-8");
.end().done().getBytes(StandardCharsets.UTF_8);
// @formatter:on

final Map<String, List<String>> headers = new HashMap<>();
Expand Down Expand Up @@ -230,7 +232,7 @@ public InfoItemsPage<InfoItem> getPage(final Page page) throws IOException, Extr
.value("enableSafetyMode", false)
.end()
.end()
.end().done().getBytes("UTF-8");
.end().done().getBytes(StandardCharsets.UTF_8);
// @formatter:on

final Map<String, List<String>> headers = new HashMap<>();
Expand Down

0 comments on commit 0cc055b

Please sign in to comment.