Skip to content

Commit

Permalink
refactor(YouTube - Hide mix playlist): Do not search path or buffer u…
Browse files Browse the repository at this point in the history
…nless setting is enabled
  • Loading branch information
LisoUseInAIKyrios committed Nov 13, 2024
1 parent 612facb commit 31af587
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public final class LayoutComponentsFilter extends Filter {
"cell_description_body"
);
private static final ByteArrayFilterGroup mixPlaylists = new ByteArrayFilterGroup(
Settings.HIDE_MIX_PLAYLISTS,
null,
"&list="
);

Expand Down Expand Up @@ -344,6 +344,10 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff
*/
public static boolean filterMixPlaylists(final Object conversionContext, @Nullable final byte[] bytes) {
try {
if (!Settings.HIDE_MIX_PLAYLISTS.get()) {
return false;
}

if (bytes == null) {
Logger.printDebug(() -> "bytes is null");
return false;
Expand Down

0 comments on commit 31af587

Please sign in to comment.