Skip to content

Commit

Permalink
Replace YouTube's download with uYou's
Browse files Browse the repository at this point in the history
  • Loading branch information
therealFoxster committed Sep 7, 2024
1 parent d8af7ce commit e92fe42
Show file tree
Hide file tree
Showing 25 changed files with 110 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "استخدام مؤشر تغيير الصوت الخاص بالنظام";
"STOCK_VOLUME_HUD_DESC" = "إظهار مؤشر تغيير الصوت الرسمي الخاص بـ iOS بدلاً من مؤشر يوتيوب";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 أزرار التحكم على الطبقة فوق الفيديو";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/cz.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video Controls Overlay Options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Standard iOS Lautstärke HUD aktivieren";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video Controls Overlay Optionen";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/el.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Utiliza el HUD de volumen de iOS";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opciones de superposición de controles de vídeo";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Utiliser l'affichage iOS du volume par défaut";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Options de superposition des contrôles vidéo";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/he.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/hu.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use iOS stock volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use iOS stock volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opzioni Sovrimpressione (Overlay) Video";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "標準の音量HUDを利用する";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 動画コントロールのオーバーレイ設定";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "iOS 기본 음량 표시기 사용";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 비디오 재생 오버레이 설정";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Użyj systemowego paska głośności";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opcje wyglądu odtwarzacza video";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/pt.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Usar o HUD de volume padrão do iOS";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Opções de Sobreposição de Controles de Vídeo";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/ro.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Использовать стоковый слайдер грмкости iOS";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Параметры элементов оверлея видеоплеера";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
"STOCK_VOLUME_HUD" = "Use stock iOS volume HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video controls overlay options";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Mevcut iOS baş yukarı göstergesi(HUD) alanını kullan";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Video Kontrolleri Kaplaması Seçenekleri";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/vi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "Sử dụng thanh âm lượng mặc định của iOS";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 Tùy chọn hiển thị trong trình phát video";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/zh_cn.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "使用 iOS 自带音量指示";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 视频播放器控制界面选项";

Expand Down
3 changes: 3 additions & 0 deletions Localizations/uYouPlus.bundle/zh_tw.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
"STOCK_VOLUME_HUD" = "使用 iOS 內建的音量 HUD";
"STOCK_VOLUME_HUD_DESC" = "";

"REPLACE_YT_DOWNLOAD_WITH_UYOU" = "Replace YouTube's download with uYou's";
"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC" = "";

// Video controls overlay options
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "📹 影片懸浮控制選項";

Expand Down
11 changes: 11 additions & 0 deletions Sources/uYouPlus.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@

// #import <YouTubeHeader/YTISectionListRenderer.h> // Hide search ads by @PoomSmart - https://github.com/PoomSmart/YouTube-X

// Replace YouTube's download with uYou's
#import <YouTubeHeader/ELMPBShowActionSheetCommand.h>
#import <YouTubeHeader/ELMPBElement.h>
#import <YouTubeHeader/ELMPBProperties.h>
#import <YouTubeHeader/ELMPBIdentifierProperties.h>
#import <YouTubeHeader/YTMainAppControlsOverlayView.h>
@interface YTMainAppControlsOverlayView(uYou)
- (void)uYou;
@end

#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
#define IS_ENABLED(k) [[NSUserDefaults standardUserDefaults] boolForKey:k]
#define APP_THEME_IDX [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"]
Expand All @@ -36,6 +46,7 @@ static NSString *const kHideRemixButton = @"hideRemixButton_enabled";
static NSString *const kHideClipButton = @"hideClipButton_enabled";
static NSString *const kHideDownloadButton = @"hideDownloadButton_enabled";
static NSString *const kStockVolumeHUD = @"stockVolumeHUD_enabled";
static NSString *const kReplaceYTDownloadWithuYou = @"kReplaceYTDownloadWithuYou_enabled";
// Video controls overlay
static NSString *const kHideAutoplaySwitch = @"hideAutoplaySwitch_enabled";
static NSString *const kHideCC = @"hideCC_enabled";
Expand Down
34 changes: 32 additions & 2 deletions Sources/uYouPlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
}

%hook ASCollectionView

- (CGSize)sizeForElement:(ASCollectionElement *)element {
if ([self.accessibilityIdentifier isEqualToString:@"id.video.scrollable_action_bar"]) {
ASCellNode *node = [element node];
Expand All @@ -95,7 +94,6 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
}
return %orig;
}

%end

// Use stock iOS volume HUD
Expand All @@ -106,6 +104,35 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
}
%end

// Replace YouTube's download with uYou's
YTMainAppControlsOverlayView *controlsOverlayView;
%hook YTMainAppControlsOverlayView
- (id)initWithDelegate:(id)arg1 {
controlsOverlayView = %orig;
return controlsOverlayView;
}
%end
%hook YTElementsDefaultSheetController
+ (void)showSheetController:(id)arg1 showCommand:(id)arg2 commandContext:(id)arg3 handler:(id)arg4 {
if (IS_ENABLED(kReplaceYTDownloadWithuYou) && [arg2 isKindOfClass:%c(ELMPBShowActionSheetCommand)]) {
ELMPBShowActionSheetCommand *showCommand = (ELMPBShowActionSheetCommand *)arg2;
NSArray *listOptions = [showCommand listOptionArray];
for (ELMPBElement *element in listOptions) {
ELMPBProperties *properties = [element properties];
ELMPBIdentifierProperties *identifierProperties = [properties firstSubmessage];
NSString *identifier = [identifierProperties identifier];
if ([identifier containsString:@"offline_upsell_dialog"]) {
if ([controlsOverlayView respondsToSelector:@selector(uYou)]) {
[controlsOverlayView uYou];
}
return;
}
}
}
%orig;
}
%end

# pragma mark - Video control overlay options

%hook YTMainAppControlsOverlayView
Expand Down Expand Up @@ -421,4 +448,7 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
if (![allKeys containsObject:kGoogleSigninFix]) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kGoogleSigninFix];
}
if (![allKeys containsObject:kReplaceYTDownloadWithuYou]) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kReplaceYTDownloadWithuYou];
}
}
1 change: 1 addition & 0 deletions Sources/uYouPlusSettings.xm
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ extern NSBundle *uYouPlusBundle();
SWITCH(LOC(@"HIDE_CLIP_BUTTON"), LOC(@"HIDE_CLIP_BUTTON_DESC"), kHideClipButton);
SWITCH(LOC(@"HIDE_DOWNLOAD_BUTTON"), LOC(@"HIDE_DOWNLOAD_BUTTON_DESC"), kHideDownloadButton);
SWITCH(LOC(@"STOCK_VOLUME_HUD"), LOC(@"STOCK_VOLUME_HUD_DESC"), kStockVolumeHUD);
SWITCH(LOC(@"REPLACE_YT_DOWNLOAD_WITH_UYOU"), LOC(@"REPLACE_YT_DOWNLOAD_WITH_UYOU_DESC"), kReplaceYTDownloadWithuYou);

# pragma mark - Video controls overlay options
SECTION_HEADER(LOC(@"VIDEO_CONTROLS_OVERLAY_OPTIONS"));
Expand Down

0 comments on commit e92fe42

Please sign in to comment.