refactor(YouTube - Hide mix playlist): Do not search path or buffer unless setting is enabled
This commit is contained in:
parent
f23b7fffc8
commit
462b61c2e9
1 changed files with 5 additions and 1 deletions
|
|
@ -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="
|
||||
);
|
||||
|
||||
|
|
@ -344,6 +344,10 @@ public final class LayoutComponentsFilter extends Filter {
|
|||
*/
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue