From f39982628ea7ee5922696d0011846d0c6c661877 Mon Sep 17 00:00:00 2001 From: therealFoxster Date: Wed, 4 Sep 2024 20:34:11 -0700 Subject: [PATCH] Replace YouTube's download with uYou's (v19.20.2) --- Sources/uYouPlus.xm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 8604c6c087..9e4099b08f 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -120,8 +120,19 @@ YTMainAppControlsOverlayView *controlsOverlayView; for (ELMPBElement *element in listOptions) { ELMPBProperties *properties = [element properties]; ELMPBIdentifierProperties *identifierProperties = [properties firstSubmessage]; - NSString *identifier = [identifierProperties identifier]; - if ([identifier containsString:@"offline_upsell_dialog"]) { + // 19.30.2 + if ([identifierProperties respondsToSelector:@selector(identifier)]) { + NSString *identifier = [identifierProperties identifier]; + if ([identifier containsString:@"offline_upsell_dialog"]) { + if ([controlsOverlayView respondsToSelector:@selector(uYou)]) { + [controlsOverlayView uYou]; + } + return; + } + } + // 19.20.2 + NSString *description = [identifierProperties description]; + if ([description containsString:@"offline_upsell_dialog"]) { if ([controlsOverlayView respondsToSelector:@selector(uYou)]) { [controlsOverlayView uYou]; }