Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: hide-mix-playlists patch hiding video description under some videos #454

Closed
3 tasks done
johnconner122 opened this issue Mar 11, 2023 · 1 comment
Closed
3 tasks done
Labels
Bug report Something isn't working

Comments

@johnconner122
Copy link

Type

Cosmetic

Application

YouTube_v18.09.37

Bug description

Can't see links & other info in description of some videos. If hide mix playlists is turned on.

Steps to reproduce

Step 1: Patch YouTube_v18.09.37 with hide-my-mix patch
Step 2: Open this video:

Relevant log output

Null

Screenshots or videos

No response

Solution

I used previous implementation for hiding mix playlists, it solved the problem. I used following implementation:

  private static boolean hideMixPlaylist(String value, ByteBuffer buffer) {
    List<byte[]> byteBufferList = new ArrayList<>();

    byteBufferList.add("for you".getBytes());
    byteBufferList.add("mix-watch".getBytes());
    byteBufferList.add("list=".getBytes());
    byteBufferList.add("rellist".getBytes());

    // home feed & search result
    if (value.contains("home_video_with_context.") ||
            value.contains("search_video_with_context.")) {

        for (byte[] b : byteBufferList) {
            int bufferIndex = indexOf(buffer.array(), b);
            LogHelper.printDebug(() -> "Hiding mix playlists in feed & search result");
            if (bufferIndex > 0 && bufferIndex < 1500) return true;
        }
    }

    // related video
    if (value.contains("related_video_with_context.")) {
        for (byte[] b : byteBufferList) {
            int bufferIndex = indexOf(buffer.array(), b);
            LogHelper.printDebug(() -> "Hiding mix playlists in related videos");
            if (bufferIndex > 0 && bufferIndex < 1500) return true;
        }
    }

    return false;
}

In filter(String, ByteBuffer) method:

if (SettingsEnum.HIDE_MIX_PLAYLISTS.getBoolean())
        return hideMixPlaylist(value, buffer);

Additional context

No response

Device Environment

Redmi Note 11, MIUI 13, Android 12S

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
@johnconner122 johnconner122 added the Bug report Something isn't working label Mar 11, 2023
@inotia00
Copy link
Owner

fixed in revanced-patches-v2.164.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants