Skip to content

Commit

Permalink
fix: ignore sheets that don't belong to our purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
castdrian committed Dec 2, 2024
1 parent 16030a5 commit 5a93e97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Tweak.x
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,18 @@
UIView *sourceView = [self valueForKey:@"sourceView"];
id node = [sourceView valueForKey:@"asyncdisplaykit_node"];
NSString *debugDescription = [node debugDescription];

if (![debugDescription containsString:@"YTVideoWithContextNode"]) {
return;
}

NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"cellNode = <YTVideoWithContextNode: (0x[0-9a-f]+)>" options:0 error:nil];
NSTextCheckingResult *match = [regex firstMatchInString:debugDescription options:0 range:NSMakeRange(0, debugDescription.length)];

if (!match) {
return;
}

if (![action.title isEqualToString:@"Share"] && ![action.title isEqualToString:@"Don't recommend channel"]) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dev.adrian.gonerino
Name: Gonerino
Version: 0.4.2
Version: 0.4.3
Architecture: iphoneos-arm
Description: Remove videos uploaded by specific channels
Maintainer: Adrian Castro
Expand Down

0 comments on commit 5a93e97

Please sign in to comment.