Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
no functional changes: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Oct 4, 2023
1 parent d41d54c commit 3b7e6a8
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ public final class ReturnYouTubeDislikeFilterPatch extends Filter {
private static final String VIDEO_ID_PREFIX_TEXT = "ic_right_dislike_off_shadowed";

private final ByteArrayAsStringFilterGroup videoIdFilterGroup
= new ByteArrayAsStringFilterGroup(null,VIDEO_ID_PREFIX_TEXT);
= new ByteArrayAsStringFilterGroup(null, VIDEO_ID_PREFIX_TEXT);

public ReturnYouTubeDislikeFilterPatch() {
pathFilterGroupList.addAll(
new StringFilterGroup(
SettingsEnum.RYD_SHORTS,
"|shorts_dislike_button.eml|"
)
new StringFilterGroup(SettingsEnum.RYD_SHORTS, "|shorts_dislike_button.eml|")
);
}

Expand All @@ -34,8 +31,9 @@ public boolean isFiltered(@Nullable String identifier, String path, byte[] proto
FilterGroup.FilterGroupResult result = videoIdFilterGroup.check(protobufBufferArray);
if (result.isFiltered()) {
final int minimumYouTubeVideoIdLength = 11;
final int videoIdStartIndex = result.getMatchedIndex() + VIDEO_ID_PREFIX_TEXT.length();
String videoId = findSubString(protobufBufferArray, videoIdStartIndex, minimumYouTubeVideoIdLength, (byte) ':');
final int subStringSearchStartIndex = result.getMatchedIndex() + VIDEO_ID_PREFIX_TEXT.length();
String videoId = findSubString(protobufBufferArray, subStringSearchStartIndex,
minimumYouTubeVideoIdLength, (byte) ':');
if (videoId != null) {
LogHelper.printDebug(() -> "Found shorts litho video id: " + videoId);
ReturnYouTubeDislikePatch.newVideoLoaded(videoId, false);
Expand Down

0 comments on commit 3b7e6a8

Please sign in to comment.