diff --git a/Tweak.xm b/Tweak.xm
index 9a52edf..e7b3b06 100644
--- a/Tweak.xm
+++ b/Tweak.xm
@@ -10,6 +10,7 @@ BOOL autoPlayNextVideo;
BOOL changeRegion;
BOOL showProgressBar;
BOOL canHideUI;
+BOOL showAdditionalDownloadButton;
NSDictionary *region;
static void reloadPrefs() {
@@ -23,6 +24,7 @@ static void reloadPrefs() {
region = [settings objectForKey:@"region"] ?: [@{} mutableCopy];
showProgressBar = [[settings objectForKey:@"showProgressBar"] ?: @(NO) boolValue];
canHideUI = [[settings objectForKey:@"canHideUI"] ?: @(YES) boolValue];
+ showAdditionalDownloadButton = [[settings objectForKey:@"showAdditionalDownloadButton"] ?: @(NO) boolValue];
}
%group CoreLogic
@@ -122,7 +124,7 @@ static void reloadPrefs() {
- (void)viewDidLoad {
%orig;
- if (downloadWithoutWatermark) {
+ if (downloadWithoutWatermark && showAdditionalDownloadButton) {
self.hDownloadButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.hDownloadButton.titleLabel setFont:[UIFont systemFontOfSize:15]];
[self.hDownloadButton addTarget:self action:@selector(hDownloadButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
@@ -169,7 +171,6 @@ static void reloadPrefs() {
}
if (canHideUI) {
- // add hide/show ui button
AWEFeedContainerViewController *afcVC = (AWEFeedContainerViewController *)[%c(AWEFeedContainerViewController) sharedInstance];
self.hideUIButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.hideUIButton.titleLabel setFont:[UIFont systemFontOfSize:15]];
@@ -280,12 +281,16 @@ static void reloadPrefs() {
%hook AWEDownloadShareChannel
- (void)startDownloadingWithCompletion:(id)arg1 {
- %orig;
- // if (!downloadWithoutWatermark) {
- // %orig;
- // return;
- // }
- // [HDownloadMedia checkPermissionToPhotosAndDownload:self.downloadOptions.awemeModel.video.playURL.originURLList.firstObject appendExtension:@"mp4" mediaType:Video toAlbum:@"TikTok"];
+ if (!downloadWithoutWatermark) {
+ %orig;
+ return;
+ }
+ NSString *videoURLString = self.downloadOptions.awemeModel.video.playURL.originURLList.firstObject;
+ if ([videoURLString containsString:@".m3u8"]) {
+ [HCommon showAlertMessage:@"This video format is not supported (.m3u8 file extension)" withTitle:@"Not supported" viewController:nil];
+ %orig;
+ }
+ [HDownloadMedia checkPermissionToPhotosAndDownload:videoURLString appendExtension:@"mp4" mediaType:Video toAlbum:@"TikTok"];
}
%end
@@ -295,8 +300,12 @@ static void reloadPrefs() {
%orig;
return;
}
- [HDownloadMedia checkPermissionToPhotosAndDownload:self.model.video.playURL.originURLList.firstObject appendExtension:@"mp4" mediaType:Video toAlbum:@"TikTok"];
- // [[[HDownloadMediaWithProgress alloc] init] checkPermissionToPhotosAndDownload:self.model.video.playURL.originURLList.firstObject appendExtension:@"mp4" mediaType:Video toAlbum:@"TikTok" viewController:self.viewController];
+ NSString *videoURLString = self.model.video.playURL.originURLList.firstObject;
+ if ([videoURLString containsString:@".m3u8"]) {
+ [HCommon showAlertMessage:@"This video format is not supported (.m3u8 file extension)" withTitle:@"Not supported" viewController:nil];
+ %orig;
+ }
+ [[[HDownloadMediaWithProgress alloc] init] checkPermissionToPhotosAndDownload:videoURLString appendExtension:@"mp4" mediaType:Video toAlbum:@"TikTok" viewController:self.viewController];
}
%end
%end
diff --git a/control b/control
index 059087c..e5687d2 100644
--- a/control
+++ b/control
@@ -1,7 +1,7 @@
Package: com.haoict.tiktokgod
Name: TikTok God
Depends: mobilesubstrate, preferenceloader, com.haoict.libhdev (>= 4.1.0), firmware (>= 10)
-Version: 1.8.0
+Version: 1.8.1
Architecture: iphoneos-arm
Description: The best tweak for TikTok app.
The best tweak for TikTok app.
diff --git a/pref/Resources/Localization-contribute.md b/pref/Resources/Localization-contribute.md
index 80f8c45..e65252f 100644
--- a/pref/Resources/Localization-contribute.md
+++ b/pref/Resources/Localization-contribute.md
@@ -9,11 +9,27 @@ Here are base strings
"DO_YOU_REALLY_WANT_TO_KILL_TIKTOK" = "Do you really want to kill TikTok?";
"CONFIRM" = "Confirm";
"CANCEL" = "Cancel";
+"DEFAULT" = "Default";
"MAIN_PREFERENCES" = "Main Preferences";
"NO_ADS" = "No Ads";
+"REMOVE_SPONSORED_VIDEO" = "Remove \"Sponsored\" videos";
"UNLIMITED_DOWNLOAD" = "Unlimited Download";
+"CAN_DOWNLOAD_UNDOWNLOADABLE_VIDEO" = "Can download undownloadable videos";
+"DOWNLOAD_WITHOUT_WATERMARK" = "Download Without Watermark";
+"PRESS_AND_HOLD_VIDEO_TO_SHOW_DOWNLOAD_BUTTON" = "Press and hold video to show download butto";
+"AUTO_PLAY_NEXT_VIDEO" = "Auto Play Next Video";
+"FINGER_FREE" = "Finger free, yeah!";
+"CHANGE_REGION" = "Change Region";
+"VIEW_TIKTOK_FROM_ANOTHER_COUNTRY" = "View TikTok from another country";
+"MAY_NOT_WORK_FOR_IPAD_AND_SOME_DEVICES" = "(may not work for iPad and some devices";
+"SELECT_COUNTRY" = "Select Country";
+"SHOW_PROGRESS_BAR" = "Show progress bar";
+"FOR_FAST_FORWARD_OR_REWIND_VIDEO" = "For fast forward or rewind video";
+"CAN_HIDE_UI" = "Can hide UI";
+"ENABLE_SHOW_HIDE_UI_BUTTON" = "Enable Show/Hide UI button";
"MORE_FEATURES_COMMING_SOON" = "More Features Comming Soon";
"OTHER_PREFERENCES" = "Other Preferences";
+"SHOW_TOP_RIGHT_CORNER_DOWNLOAD_BUTTON" = "Show Top Right Corner Download Button";
"RESET_SETTINGS" = "Reset Settings";
"SUPPORT_ME" = "Support Me";
"DONATION" = "Donation 💰";
diff --git a/pref/Resources/Root.plist b/pref/Resources/Root.plist
index c69abfc..0c09c96 100755
--- a/pref/Resources/Root.plist
+++ b/pref/Resources/Root.plist
@@ -585,11 +585,31 @@
label
OTHER_PREFERENCES
+
+
+ cell
+ PSSwitchCell
+ cellClass
+ HPSSwitchCell
+ default
+
+ defaults
+ com.haoict.tiktokgodpref
+ key
+ showAdditionalDownloadButton
+ label
+ SHOW_TOP_RIGHT_CORNER_DOWNLOAD_BUTTON
+ PostNotification
+ com.haoict.tiktokgodpref/PrefChanged
+
+
cell
PSLinkCell
cellClass
HPSLinkCell
+ defaults
+ com.haoict.tiktokgodpref
label
RESET_SETTINGS
action
diff --git a/pref/Resources/base.lproj/Root.strings b/pref/Resources/base.lproj/Root.strings
index fc97dc9..bdf2f71 100644
--- a/pref/Resources/base.lproj/Root.strings
+++ b/pref/Resources/base.lproj/Root.strings
@@ -10,7 +10,7 @@
"UNLIMITED_DOWNLOAD" = "Unlimited Download";
"CAN_DOWNLOAD_UNDOWNLOADABLE_VIDEO" = "Can download undownloadable videos";
"DOWNLOAD_WITHOUT_WATERMARK" = "Download Without Watermark";
- "PRESS_AND_HOLD_VIDEO_TO_SHOW_DOWNLOAD_BUTTON" = "Press Download at top right corner";
+ "PRESS_AND_HOLD_VIDEO_TO_SHOW_DOWNLOAD_BUTTON" = "Press and hold video to show download butto";
"AUTO_PLAY_NEXT_VIDEO" = "Auto Play Next Video";
"FINGER_FREE" = "Finger free, yeah!";
"CHANGE_REGION" = "Change Region";
@@ -23,6 +23,7 @@
"ENABLE_SHOW_HIDE_UI_BUTTON" = "Enable Show/Hide UI button";
"MORE_FEATURES_COMMING_SOON" = "More Features Comming Soon";
"OTHER_PREFERENCES" = "Other Preferences";
+ "SHOW_TOP_RIGHT_CORNER_DOWNLOAD_BUTTON" = "Show Top Right Corner Download Button";
"RESET_SETTINGS" = "Reset Settings";
"SUPPORT_ME" = "Support Me";
"DONATION" = "Donation 💰";
diff --git a/pref/Resources/en.lproj/Root.strings b/pref/Resources/en.lproj/Root.strings
index 8c69d23..1dc921e 100644
--- a/pref/Resources/en.lproj/Root.strings
+++ b/pref/Resources/en.lproj/Root.strings
@@ -10,7 +10,7 @@
"UNLIMITED_DOWNLOAD" = "Unlimited Download";
"CAN_DOWNLOAD_UNDOWNLOADABLE_VIDEO" = "Can download undownloadable videos";
"DOWNLOAD_WITHOUT_WATERMARK" = "Download Without Watermark";
- "PRESS_AND_HOLD_VIDEO_TO_SHOW_DOWNLOAD_BUTTON" = "Press Download at top right corner";
+ "PRESS_AND_HOLD_VIDEO_TO_SHOW_DOWNLOAD_BUTTON" = "Press and hold video to show download butto";
"AUTO_PLAY_NEXT_VIDEO" = "Auto Play Next Video";
"FINGER_FREE" = "Finger free, yeah!";
"CHANGE_REGION" = "Change Region";
@@ -23,6 +23,7 @@
"ENABLE_SHOW_HIDE_UI_BUTTON" = "Enable Show/Hide UI button";
"MORE_FEATURES_COMMING_SOON" = "More Features Comming Soon";
"OTHER_PREFERENCES" = "Other Preferences";
+ "SHOW_TOP_RIGHT_CORNER_DOWNLOAD_BUTTON" = "Show Top Right Corner Download Button";
"RESET_SETTINGS" = "Reset Settings";
"SUPPORT_ME" = "Support Me";
"DONATION" = "Donation 💰";
diff --git a/pref/Resources/vi.lproj/Root.strings b/pref/Resources/vi.lproj/Root.strings
index 73a5977..1fe0e80 100644
--- a/pref/Resources/vi.lproj/Root.strings
+++ b/pref/Resources/vi.lproj/Root.strings
@@ -10,7 +10,7 @@
"UNLIMITED_DOWNLOAD" = "Download không giới hạn";
"CAN_DOWNLOAD_UNDOWNLOADABLE_VIDEO" = "Có thể download video không cho tải";
"DOWNLOAD_WITHOUT_WATERMARK" = "Download không logo (watermark)";
- "PRESS_AND_HOLD_VIDEO_TO_SHOW_DOWNLOAD_BUTTON" = "Ấn nút Download ở góc trên bên phải";
+ "PRESS_AND_HOLD_VIDEO_TO_SHOW_DOWNLOAD_BUTTON" = "Nhấn và giữ video để hiện nút download";
"AUTO_PLAY_NEXT_VIDEO" = "Tự động chơi video tiếp theo";
"FINGER_FREE" = "Rảnh tay rồi, hehe!";
"CHANGE_REGION" = "Thay đổi khu vực";
@@ -23,6 +23,7 @@
"ENABLE_SHOW_HIDE_UI_BUTTON" = "Mở chức nút năng ẩn/hiện UI";
"MORE_FEATURES_COMMING_SOON" = "Nhiều tính năng mới sẽ cập nhật sau";
"OTHER_PREFERENCES" = "Tùy chỉnh phụ";
+ "SHOW_TOP_RIGHT_CORNER_DOWNLOAD_BUTTON" = "Hiện nút download ở góc trên bên phải";
"RESET_SETTINGS" = "Đặt lại tùy chỉnh";
"SUPPORT_ME" = "Hỗ trợ tôi";
"DONATION" = "Ủng hộ 💰";
diff --git a/release/com.haoict.tiktokgod_1.8.1_iphoneos-arm.deb b/release/com.haoict.tiktokgod_1.8.1_iphoneos-arm.deb
new file mode 100644
index 0000000..4d460fd
Binary files /dev/null and b/release/com.haoict.tiktokgod_1.8.1_iphoneos-arm.deb differ