Skip to content

Commit

Permalink
fix(YouTube - Change live ring click action): Cannot play the playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 authored and anddea committed Feb 3, 2025
1 parent 7a861eb commit 374a63f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package app.revanced.extension.youtube.patches.general;

import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.facebook.litho.ComponentHost;
Expand Down Expand Up @@ -59,6 +61,14 @@ public static void fetchChannelId(@NonNull Map<Object, Object> playbackStartDesc
if (componentHost.getChildCount() != 1) {
return;
}
// Play all button in playlist cannot be filtered with the above conditions
// Check the ViewGroup tree
if (!(componentHost.getChildAt(0) instanceof ComponentHost liveRingViewGroup)) {
return;
}
if (!(liveRingViewGroup.getChildAt(0) instanceof ImageView)) {
return;
}
// Fetch channel id
videoId = newlyLoadedVideoId;
VideoDetailsRequest.fetchRequestIfNeeded(newlyLoadedVideoId);
Expand Down

0 comments on commit 374a63f

Please sign in to comment.