Merge remote-tracking branch 'upstream/dev' into feat/save_brightness
This commit is contained in:
commit
3a81731c31
42
CHANGELOG.md
42
CHANGELOG.md
|
@ -1,3 +1,45 @@
|
|||
# [1.8.0-dev.13](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.12...v1.8.0-dev.13) (2024-04-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Hide Shorts components:** Hide suggested actions in incognito mode ([bba421d](https://github.com/ReVanced/revanced-integrations/commit/bba421ddb63597bf918ecccacfd4a33493016b9f))
|
||||
|
||||
# [1.8.0-dev.12](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.11...v1.8.0-dev.12) (2024-04-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([#616](https://github.com/ReVanced/revanced-integrations/issues/616)) ([13dc172](https://github.com/ReVanced/revanced-integrations/commit/13dc17288d13d024a3fbe318ee0fb23a0d46af85))
|
||||
|
||||
# [1.8.0-dev.11](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.10...v1.8.0-dev.11) (2024-04-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Return YouTube Dislike:** Do not show error toast if API success response contains new lines ([#612](https://github.com/ReVanced/revanced-integrations/issues/612)) ([9108205](https://github.com/ReVanced/revanced-integrations/commit/9108205445c533550db454731d4f9460a3241a03))
|
||||
|
||||
# [1.8.0-dev.10](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.9...v1.8.0-dev.10) (2024-04-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([#615](https://github.com/ReVanced/revanced-integrations/issues/615)) ([0586fb7](https://github.com/ReVanced/revanced-integrations/commit/0586fb70e347c25742e03102441cfb37315b5937))
|
||||
|
||||
# [1.8.0-dev.9](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.8...v1.8.0-dev.9) (2024-04-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Use correct hide playables setting key ([a2b1543](https://github.com/ReVanced/revanced-integrations/commit/a2b15433cffec082394a50d14f7eef625a6351c1))
|
||||
|
||||
# [1.8.0-dev.8](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.7...v1.8.0-dev.8) (2024-04-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide layout components:** Hide playables ([d6cd550](https://github.com/ReVanced/revanced-integrations/commit/d6cd550880596de5cd2eb4a0d1325a73326d4af9))
|
||||
|
||||
# [1.8.0-dev.7](https://github.com/ReVanced/revanced-integrations/compare/v1.8.0-dev.6...v1.8.0-dev.7) (2024-04-12)
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.Objects;
|
|||
* All saved JSON text is converted to lowercase to keep the output less obnoxious.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class EnumSetting<T extends Enum> extends Setting<T> {
|
||||
public class EnumSetting<T extends Enum<?>> extends Setting<T> {
|
||||
public EnumSetting(String key, T defaultValue) {
|
||||
super(key, defaultValue);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class EnumSetting<T extends Enum> extends Setting<T> {
|
|||
@NonNull
|
||||
private T getEnumFromString(String enumName) {
|
||||
//noinspection ConstantConditions
|
||||
for (Enum value : defaultValue.getClass().getEnumConstants()) {
|
||||
for (Enum<?> value : defaultValue.getClass().getEnumConstants()) {
|
||||
if (value.name().equalsIgnoreCase(enumName)) {
|
||||
// noinspection unchecked
|
||||
return (T) value;
|
||||
|
|
|
@ -53,7 +53,7 @@ public class SharedPrefCategory {
|
|||
/**
|
||||
* @param value a NULL parameter removes the value from the preferences
|
||||
*/
|
||||
public void saveEnumAsString(@NonNull String key, @Nullable Enum value) {
|
||||
public void saveEnumAsString(@NonNull String key, @Nullable Enum<?> value) {
|
||||
saveObjectAsString(key, value);
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ public class SharedPrefCategory {
|
|||
}
|
||||
|
||||
@NonNull
|
||||
public <T extends Enum> T getEnum(@NonNull String key, @NonNull T _default) {
|
||||
public <T extends Enum<?>> T getEnum(@NonNull String key, @NonNull T _default) {
|
||||
Objects.requireNonNull(_default);
|
||||
try {
|
||||
String enumName = preferences.getString(key, null);
|
||||
|
|
|
@ -113,8 +113,8 @@ public final class LayoutComponentsFilter extends Filter {
|
|||
"medical_panel"
|
||||
);
|
||||
|
||||
final var paidContent = new StringFilterGroup(
|
||||
Settings.HIDE_PAID_CONTENT,
|
||||
final var paidPromotion = new StringFilterGroup(
|
||||
Settings.HIDE_PAID_PROMOTION_LABEL,
|
||||
"paid_content_overlay"
|
||||
);
|
||||
|
||||
|
@ -177,6 +177,11 @@ public final class LayoutComponentsFilter extends Filter {
|
|||
"fullscreen_related_videos"
|
||||
);
|
||||
|
||||
final var playables = new StringFilterGroup(
|
||||
Settings.HIDE_PLAYABLES,
|
||||
"horizontal_gaming_shelf.eml"
|
||||
);
|
||||
|
||||
final var quickActions = new StringFilterGroup(
|
||||
Settings.HIDE_QUICK_ACTIONS,
|
||||
"quick_actions"
|
||||
|
@ -251,11 +256,12 @@ public final class LayoutComponentsFilter extends Filter {
|
|||
notifyMe,
|
||||
channelBar,
|
||||
communityPosts,
|
||||
paidContent,
|
||||
paidPromotion,
|
||||
searchResultVideo,
|
||||
latestPosts,
|
||||
channelWatermark,
|
||||
communityGuidelines,
|
||||
playables,
|
||||
quickActions,
|
||||
relatedVideos,
|
||||
compactBanner,
|
||||
|
|
|
@ -22,19 +22,12 @@ public final class ShortsFilter extends Filter {
|
|||
private final StringFilterGroup shortsCompactFeedVideoPath;
|
||||
private final ByteArrayFilterGroup shortsCompactFeedVideoBuffer;
|
||||
|
||||
private final StringFilterGroup channelBar;
|
||||
private final StringFilterGroup fullVideoLinkLabel;
|
||||
private final StringFilterGroup videoTitle;
|
||||
private final StringFilterGroup reelSoundMetadata;
|
||||
private final StringFilterGroup subscribeButton;
|
||||
private final StringFilterGroup subscribeButtonPaused;
|
||||
private final StringFilterGroup soundButton;
|
||||
private final StringFilterGroup infoPanel;
|
||||
private final StringFilterGroup joinButton;
|
||||
private final StringFilterGroup shelfHeader;
|
||||
|
||||
private final StringFilterGroup suggestedActionPath;
|
||||
private final ByteArrayFilterGroupList suggestedActions = new ByteArrayFilterGroupList();
|
||||
private final StringFilterGroup suggestedAction;
|
||||
private final ByteArrayFilterGroupList suggestedActionsGroupList = new ByteArrayFilterGroupList();
|
||||
|
||||
private final StringFilterGroup actionBar;
|
||||
private final ByteArrayFilterGroupList videoActionButtonGroupList = new ByteArrayFilterGroupList();
|
||||
|
@ -44,7 +37,7 @@ public final class ShortsFilter extends Filter {
|
|||
// Identifier components.
|
||||
//
|
||||
|
||||
var shorts = new StringFilterGroup(
|
||||
var shortsIdentifiers = new StringFilterGroup(
|
||||
null, // Setting is based on navigation state.
|
||||
"shorts_shelf",
|
||||
"inline_shorts",
|
||||
|
@ -52,6 +45,7 @@ public final class ShortsFilter extends Filter {
|
|||
"shorts_video_cell",
|
||||
"shorts_pivot_item"
|
||||
);
|
||||
|
||||
// Feed Shorts shelf header.
|
||||
// Use a different filter group for this pattern, as it requires an additional check after matching.
|
||||
shelfHeader = new StringFilterGroup(
|
||||
|
@ -59,14 +53,7 @@ public final class ShortsFilter extends Filter {
|
|||
"shelf_header.eml"
|
||||
);
|
||||
|
||||
// Home / subscription feed components.
|
||||
|
||||
var thanksButton = new StringFilterGroup( // Edit: Does this item show up anymore?
|
||||
Settings.HIDE_SHORTS_THANKS_BUTTON,
|
||||
"suggested_action"
|
||||
);
|
||||
|
||||
addIdentifierCallbacks(shorts, shelfHeader, thanksButton);
|
||||
addIdentifierCallbacks(shortsIdentifiers, shelfHeader);
|
||||
|
||||
//
|
||||
// Path components.
|
||||
|
@ -80,6 +67,41 @@ public final class ShortsFilter extends Filter {
|
|||
shortsCompactFeedVideoBuffer = new ByteArrayFilterGroup(null, "/frame0.jpg");
|
||||
|
||||
// Shorts player components.
|
||||
StringFilterGroup pausedOverlayButtons = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_PAUSED_OVERLAY_BUTTONS,
|
||||
"shorts_paused_state"
|
||||
);
|
||||
|
||||
StringFilterGroup channelBar = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_CHANNEL_BAR,
|
||||
REEL_CHANNEL_BAR_PATH
|
||||
);
|
||||
|
||||
StringFilterGroup fullVideoLinkLabel = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_FULL_VIDEO_LINK_LABEL,
|
||||
"reel_multi_format_link"
|
||||
);
|
||||
|
||||
StringFilterGroup videoTitle = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_VIDEO_TITLE,
|
||||
"shorts_video_title_item"
|
||||
);
|
||||
|
||||
StringFilterGroup reelSoundMetadata = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_SOUND_METADATA_LABEL,
|
||||
"reel_sound_metadata"
|
||||
);
|
||||
|
||||
StringFilterGroup soundButton = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_SOUND_BUTTON,
|
||||
"reel_pivot_button"
|
||||
);
|
||||
|
||||
StringFilterGroup infoPanel = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_INFO_PANEL,
|
||||
"shorts_info_panel_overview"
|
||||
);
|
||||
|
||||
joinButton = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_JOIN_BUTTON,
|
||||
"sponsor_button"
|
||||
|
@ -90,109 +112,77 @@ public final class ShortsFilter extends Filter {
|
|||
"subscribe_button"
|
||||
);
|
||||
|
||||
subscribeButtonPaused = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_SUBSCRIBE_BUTTON_PAUSED,
|
||||
"shorts_paused_state"
|
||||
);
|
||||
|
||||
channelBar = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_CHANNEL_BAR,
|
||||
REEL_CHANNEL_BAR_PATH
|
||||
);
|
||||
|
||||
fullVideoLinkLabel = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_FULL_VIDEO_LINK_LABEL,
|
||||
"reel_multi_format_link"
|
||||
);
|
||||
|
||||
videoTitle = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_VIDEO_TITLE,
|
||||
"shorts_video_title_item"
|
||||
);
|
||||
|
||||
reelSoundMetadata = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_SOUND_METADATA_LABEL,
|
||||
"reel_sound_metadata"
|
||||
);
|
||||
|
||||
soundButton = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_SOUND_BUTTON,
|
||||
"reel_pivot_button"
|
||||
);
|
||||
|
||||
infoPanel = new StringFilterGroup(
|
||||
Settings.HIDE_SHORTS_INFO_PANEL,
|
||||
"shorts_info_panel_overview"
|
||||
);
|
||||
|
||||
actionBar = new StringFilterGroup(
|
||||
null,
|
||||
"shorts_action_bar"
|
||||
);
|
||||
|
||||
suggestedActionPath = new StringFilterGroup(
|
||||
suggestedAction = new StringFilterGroup(
|
||||
null,
|
||||
"suggested_action.eml"
|
||||
);
|
||||
|
||||
addPathCallbacks(
|
||||
shortsCompactFeedVideoPath,
|
||||
joinButton, subscribeButton, subscribeButtonPaused, suggestedActionPath,
|
||||
channelBar, fullVideoLinkLabel, videoTitle, reelSoundMetadata,
|
||||
soundButton, infoPanel, actionBar
|
||||
shortsCompactFeedVideoPath, suggestedAction, actionBar, joinButton, subscribeButton,
|
||||
pausedOverlayButtons, channelBar, fullVideoLinkLabel, videoTitle, reelSoundMetadata,
|
||||
soundButton, infoPanel
|
||||
);
|
||||
|
||||
//
|
||||
// Action buttons
|
||||
//
|
||||
var shortsLikeButton = new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_LIKE_BUTTON,
|
||||
"shorts_like_button"
|
||||
);
|
||||
|
||||
var shortsDislikeButton = new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_DISLIKE_BUTTON,
|
||||
"shorts_dislike_button"
|
||||
);
|
||||
|
||||
var shortsCommentButton = new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_COMMENTS_BUTTON,
|
||||
"reel_comment_button"
|
||||
);
|
||||
|
||||
var shortsShareButton = new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_SHARE_BUTTON,
|
||||
"reel_share_button"
|
||||
);
|
||||
|
||||
var shortsRemixButton = new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_REMIX_BUTTON,
|
||||
"reel_remix_button"
|
||||
);
|
||||
|
||||
videoActionButtonGroupList.addAll(
|
||||
shortsLikeButton,
|
||||
shortsDislikeButton,
|
||||
shortsCommentButton,
|
||||
shortsShareButton,
|
||||
shortsRemixButton
|
||||
// This also appears as the path item 'shorts_like_button.eml'
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_LIKE_BUTTON,
|
||||
"reel_like_button",
|
||||
"reel_like_toggled_button"
|
||||
),
|
||||
// This also appears as the path item 'shorts_dislike_button.eml'
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_DISLIKE_BUTTON,
|
||||
"reel_dislike_button",
|
||||
"reel_dislike_toggled_button"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_COMMENTS_BUTTON,
|
||||
"reel_comment_button"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_SHARE_BUTTON,
|
||||
"reel_share_button"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_REMIX_BUTTON,
|
||||
"reel_remix_button"
|
||||
)
|
||||
);
|
||||
|
||||
//
|
||||
// Suggested actions.
|
||||
//
|
||||
suggestedActions.addAll(
|
||||
suggestedActionsGroupList.addAll(
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_SHOP_BUTTON,
|
||||
"yt_outline_bag_"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_LOCATION_BUTTON,
|
||||
Settings.HIDE_SHORTS_TAGGED_PRODUCTS,
|
||||
// Product buttons show pictures of the products, and does not have any unique icons to identify.
|
||||
// Instead use a unique identifier found in the buffer.
|
||||
"PAproduct_listZ"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_LOCATION_LABEL,
|
||||
"yt_outline_location_point_"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_SAVE_SOUND_BUTTON,
|
||||
"yt_outline_list_add_"
|
||||
),
|
||||
new ByteArrayFilterGroup(
|
||||
Settings.HIDE_SHORTS_SEARCH_SUGGESTIONS,
|
||||
"yt_outline_search_"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -201,15 +191,15 @@ public final class ShortsFilter extends Filter {
|
|||
boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBufferArray,
|
||||
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
|
||||
if (contentType == FilterContentType.PATH) {
|
||||
// Always filter if matched.
|
||||
if (matchedGroup == soundButton ||
|
||||
matchedGroup == infoPanel ||
|
||||
matchedGroup == channelBar ||
|
||||
matchedGroup == fullVideoLinkLabel ||
|
||||
matchedGroup == videoTitle ||
|
||||
matchedGroup == reelSoundMetadata ||
|
||||
matchedGroup == subscribeButtonPaused
|
||||
) return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
||||
if (matchedGroup == subscribeButton || matchedGroup == joinButton) {
|
||||
// Filter only when reelChannelBar is visible to avoid false positives.
|
||||
if (path.startsWith(REEL_CHANNEL_BAR_PATH)) {
|
||||
return super.isFiltered(
|
||||
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (matchedGroup == shortsCompactFeedVideoPath) {
|
||||
if (shouldHideShortsFeedItems() && contentIndex == 0
|
||||
|
@ -219,32 +209,28 @@ public final class ShortsFilter extends Filter {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (matchedGroup == subscribeButton || matchedGroup == joinButton) {
|
||||
// Filter only when reelChannelBar is visible to avoid false positives.
|
||||
if (path.startsWith(REEL_CHANNEL_BAR_PATH)) return super.isFiltered(
|
||||
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Video action buttons (like, dislike, comment, share, remix) have the same path.
|
||||
if (matchedGroup == actionBar) {
|
||||
if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) return super.isFiltered(
|
||||
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
||||
);
|
||||
if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) {
|
||||
return super.isFiltered(
|
||||
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (matchedGroup == suggestedActionPath) {
|
||||
if (contentIndex == 0 && suggestedActions.check(protobufBufferArray).isFiltered()) return super.isFiltered(
|
||||
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
||||
);
|
||||
// else, return false;
|
||||
if (matchedGroup == suggestedAction) {
|
||||
// Suggested actions can be at the start or in the middle of a path.
|
||||
if (suggestedActionsGroupList.check(protobufBufferArray).isFiltered()) {
|
||||
return super.isFiltered(
|
||||
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
// Feed/search path components.
|
||||
// Feed/search identifier components.
|
||||
if (matchedGroup == shelfHeader) {
|
||||
// Because the header is used in watch history and possibly other places, check for the index,
|
||||
// which is 0 when the shelf header is used for Shorts.
|
||||
|
|
|
@ -279,7 +279,7 @@ public class ReturnYouTubeDislikeApi {
|
|||
}
|
||||
|
||||
if (responseCode == HTTP_STATUS_CODE_SUCCESS) {
|
||||
// do not disconnect, the same server connection will likely be used again soon
|
||||
// Do not disconnect, the same server connection will likely be used again soon.
|
||||
JSONObject json = Requester.parseJSONObject(connection);
|
||||
try {
|
||||
RYDVoteData votingData = new RYDVoteData(json);
|
||||
|
@ -377,20 +377,17 @@ public class ReturnYouTubeDislikeApi {
|
|||
connection.disconnect(); // disconnect, as no more connections will be made for a little while
|
||||
return null;
|
||||
}
|
||||
String result = null;
|
||||
if (responseCode == HTTP_STATUS_CODE_SUCCESS) {
|
||||
result = Requester.parseJson(connection);
|
||||
if (result.equalsIgnoreCase("true")) {
|
||||
Logger.printDebug(() -> "Registration confirmation successful");
|
||||
return userId;
|
||||
}
|
||||
Logger.printDebug(() -> "Registration confirmation successful");
|
||||
return userId;
|
||||
}
|
||||
final String resultLog = result == null ? "(no response)" : result;
|
||||
|
||||
// Something went wrong, might as well disconnect.
|
||||
String response = Requester.parseJsonAndDisconnect(connection);
|
||||
Logger.printInfo(() -> "Failed to confirm registration for user: " + userId
|
||||
+ " solution: " + solution + " responseCode: " + responseCode + " responseString: " + resultLog);
|
||||
+ " solution: " + solution + " responseCode: " + responseCode + " response: '" + response + "''");
|
||||
handleConnectionError(str("revanced_ryd_failure_connection_status_code", responseCode),
|
||||
null, true);
|
||||
connection.disconnect(); // something went wrong, might as well disconnect
|
||||
} catch (SocketTimeoutException ex) {
|
||||
handleConnectionError(str("revanced_ryd_failure_connection_timeout"), ex, false);
|
||||
} catch (IOException ex) {
|
||||
|
@ -461,6 +458,7 @@ public class ReturnYouTubeDislikeApi {
|
|||
String solution = solvePuzzle(challenge, difficulty);
|
||||
return confirmVote(videoId, userId, solution);
|
||||
}
|
||||
|
||||
Logger.printInfo(() -> "Failed to send vote for video: " + videoId + " vote: " + vote
|
||||
+ " response code was: " + responseCode);
|
||||
handleConnectionError(str("revanced_ryd_failure_connection_status_code", responseCode),
|
||||
|
@ -501,20 +499,17 @@ public class ReturnYouTubeDislikeApi {
|
|||
connection.disconnect(); // disconnect, as no more connections will be made for a little while
|
||||
return false;
|
||||
}
|
||||
String result = null;
|
||||
if (responseCode == HTTP_STATUS_CODE_SUCCESS) {
|
||||
result = Requester.parseJson(connection);
|
||||
if (result.equalsIgnoreCase("true")) {
|
||||
Logger.printDebug(() -> "Vote confirm successful for video: " + videoId);
|
||||
return true;
|
||||
}
|
||||
Logger.printDebug(() -> "Vote confirm successful for video: " + videoId);
|
||||
return true;
|
||||
}
|
||||
final String resultLog = result == null ? "(no response)" : result;
|
||||
|
||||
// Something went wrong, might as well disconnect.
|
||||
String response = Requester.parseJsonAndDisconnect(connection);
|
||||
Logger.printInfo(() -> "Failed to confirm vote for video: " + videoId
|
||||
+ " solution: " + solution + " responseCode: " + responseCode + " responseString: " + resultLog);
|
||||
+ " solution: " + solution + " responseCode: " + responseCode + " response: '" + response + "'");
|
||||
handleConnectionError(str("revanced_ryd_failure_connection_status_code", responseCode),
|
||||
null, true);
|
||||
connection.disconnect(); // something went wrong, might as well disconnect
|
||||
} catch (SocketTimeoutException ex) {
|
||||
handleConnectionError(str("revanced_ryd_failure_connection_timeout"), ex, false);
|
||||
} catch (IOException ex) {
|
||||
|
|
|
@ -49,7 +49,7 @@ public class Settings extends BaseSettings {
|
|||
public static final BooleanSetting HIDE_GET_PREMIUM = new BooleanSetting("revanced_hide_get_premium", TRUE);
|
||||
public static final BooleanSetting HIDE_HIDE_LATEST_POSTS = new BooleanSetting("revanced_hide_latest_posts_ads", TRUE);
|
||||
public static final BooleanSetting HIDE_MERCHANDISE_BANNERS = new BooleanSetting("revanced_hide_merchandise_banners", TRUE);
|
||||
public static final BooleanSetting HIDE_PAID_CONTENT = new BooleanSetting("revanced_hide_paid_content_ads", TRUE);
|
||||
public static final BooleanSetting HIDE_PAID_PROMOTION_LABEL = new BooleanSetting("revanced_hide_paid_promotion_label", TRUE);
|
||||
public static final BooleanSetting HIDE_PRODUCTS_BANNER = new BooleanSetting("revanced_hide_products_banner", TRUE);
|
||||
public static final BooleanSetting HIDE_SHOPPING_LINKS = new BooleanSetting("revanced_hide_shopping_links", TRUE);
|
||||
public static final BooleanSetting HIDE_SELF_SPONSOR = new BooleanSetting("revanced_hide_self_sponsor_ads", TRUE);
|
||||
|
@ -117,6 +117,7 @@ public class Settings extends BaseSettings {
|
|||
public static final BooleanSetting HIDE_NOTIFY_ME_BUTTON = new BooleanSetting("revanced_hide_notify_me_button", TRUE);
|
||||
public static final BooleanSetting HIDE_PLAYER_BUTTONS = new BooleanSetting("revanced_hide_player_buttons", FALSE);
|
||||
public static final BooleanSetting HIDE_PREVIEW_COMMENT = new BooleanSetting("revanced_hide_preview_comment", FALSE, true);
|
||||
public static final BooleanSetting HIDE_PLAYABLES = new BooleanSetting("revanced_hide_playables", TRUE);
|
||||
public static final BooleanSetting HIDE_QUICK_ACTIONS = new BooleanSetting("revanced_hide_quick_actions", FALSE);
|
||||
public static final BooleanSetting HIDE_RELATED_VIDEOS = new BooleanSetting("revanced_hide_related_videos", FALSE);
|
||||
public static final BooleanSetting HIDE_SEARCH_RESULT_SHELF_HEADER = new BooleanSetting("revanced_hide_search_result_shelf_header", FALSE);
|
||||
|
@ -158,11 +159,12 @@ public class Settings extends BaseSettings {
|
|||
public static final BooleanSetting HIDE_SHORTS_SEARCH = new BooleanSetting("revanced_hide_shorts_search", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_JOIN_BUTTON = new BooleanSetting("revanced_hide_shorts_join_button", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_SUBSCRIBE_BUTTON = new BooleanSetting("revanced_hide_shorts_subscribe_button", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_SUBSCRIBE_BUTTON_PAUSED = new BooleanSetting("revanced_hide_shorts_subscribe_button_paused", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_shorts_thanks_button", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_PAUSED_OVERLAY_BUTTONS = new BooleanSetting("revanced_hide_shorts_paused_overlay_buttons", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_SHOP_BUTTON = new BooleanSetting("revanced_hide_shorts_shop_button", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_LOCATION_BUTTON = new BooleanSetting("revanced_hide_shorts_location_button", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_TAGGED_PRODUCTS = new BooleanSetting("revanced_hide_shorts_tagged_products", TRUE);
|
||||
public static final BooleanSetting HIDE_SHORTS_LOCATION_LABEL = new BooleanSetting("revanced_hide_shorts_location_label", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_SAVE_SOUND_BUTTON = new BooleanSetting("revanced_hide_shorts_save_sound_button", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_LIKE_BUTTON = new BooleanSetting("revanced_hide_shorts_like_button", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_DISLIKE_BUTTON = new BooleanSetting("revanced_hide_shorts_dislike_button", FALSE);
|
||||
public static final BooleanSetting HIDE_SHORTS_COMMENTS_BUTTON = new BooleanSetting("revanced_hide_shorts_comments_button", FALSE);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
android.useAndroidX = true
|
||||
version = 1.8.0-dev.7
|
||||
version = 1.8.0-dev.13
|
||||
|
|
Loading…
Reference in New Issue