Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge branch dev to main #4330

Merged
merged 41 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f03da98
fix(YouTube - Theme): Replace custom seekbar gradient colors instead …
LisoUseInAIKyrios Jan 21, 2025
f4febac
chore: Release v5.9.1-dev.1 [skip ci]
semantic-release-bot Jan 21, 2025
5b47a5f
fix(YouTube - Theme): Fix 19.25 - 19.45 patch error
LisoUseInAIKyrios Jan 22, 2025
c84eb82
chore: Release v5.9.1-dev.2 [skip ci]
semantic-release-bot Jan 22, 2025
f5cf6f2
fix(YouTube - Hide seekbar): Do not hide player seekbar if hide feed …
LisoUseInAIKyrios Jan 22, 2025
1feba63
chore: Release v5.9.1-dev.3 [skip ci]
semantic-release-bot Jan 22, 2025
02685c4
fix(YouTube - Hide layout components): Hide new kind of community pos…
Bceez Jan 22, 2025
e69197c
chore: Release v5.9.1-dev.4 [skip ci]
semantic-release-bot Jan 22, 2025
952b4fc
feat(YouTube - Theme): Add option to use custom seekbar accent color …
LisoUseInAIKyrios Jan 23, 2025
6f2e474
chore: Release v5.10.0-dev.1 [skip ci]
semantic-release-bot Jan 23, 2025
0528f7c
feat(YouTube): Add patch `Disable HDR video` (#4347)
LisoUseInAIKyrios Jan 25, 2025
59db22c
chore: Release v5.10.0-dev.2 [skip ci]
semantic-release-bot Jan 25, 2025
5505087
feat(YouTube - Hide ads): Add `Hide end screen store banner` (#4351)
ILoveOpenSourceApplications Jan 27, 2025
440b41f
chore: Release v5.10.0-dev.3 [skip ci]
semantic-release-bot Jan 27, 2025
68ec54e
feat(YouTube - Hide video description components): Add `Hide How this…
ILoveOpenSourceApplications Jan 27, 2025
71b0098
chore: Release v5.10.0-dev.4 [skip ci]
semantic-release-bot Jan 27, 2025
0f28c2b
fix(YouTube - Hide video description components): Use correct string …
LisoUseInAIKyrios Jan 27, 2025
9b6f78a
chore: Release v5.10.0-dev.5 [skip ci]
semantic-release-bot Jan 27, 2025
7e68390
fix(YouTube - Hide Ads): Hide end screen store banner without leaving…
LisoUseInAIKyrios Jan 29, 2025
525bad2
chore: Release v5.10.0-dev.6 [skip ci]
semantic-release-bot Jan 29, 2025
9d63ea9
fix(YouTube - Hide ads): fix 'Hide the Visit store button on channel …
ILoveOpenSourceApplications Jan 29, 2025
34bdbc0
chore: Release v5.10.0-dev.7 [skip ci]
semantic-release-bot Jan 29, 2025
e5b3aa1
fix(YouTube - Spoof video streams): Update settings side effects summ…
LisoUseInAIKyrios Jan 29, 2025
ed34100
chore: Release v5.10.0-dev.8 [skip ci]
semantic-release-bot Jan 29, 2025
1faa9c6
chore: Sync translations (#4374)
github-actions[bot] Jan 29, 2025
d8ed474
fix(SwissId - Play integrity Removal): Add recommended app version (#…
corentin-c Jan 29, 2025
70c8a12
chore: Release v5.10.0-dev.9 [skip ci]
semantic-release-bot Jan 29, 2025
574bcc8
fix(YouTube - Hide ads): Hide new types of tablet ads
LisoUseInAIKyrios Jan 29, 2025
b809d37
chore: Release v5.10.0-dev.10 [skip ci]
semantic-release-bot Jan 29, 2025
5ff4ee8
fix: Use correct path to fix invalid file paths
oSumAtrIX Jan 30, 2025
152e507
chore: Release v5.10.0-dev.11 [skip ci]
semantic-release-bot Jan 30, 2025
2036bac
chore: Sync translations (#4379)
github-actions[bot] Jan 30, 2025
f350162
ci: Fix Crowdin cron pull strings?
LisoUseInAIKyrios Jan 30, 2025
ceffac7
chore: Sync translations (#4380)
github-actions[bot] Jan 30, 2025
d0d4595
chore: Sync translations (#4381)
github-actions[bot] Jan 30, 2025
d003fd2
chore: Sync translations (#4382)
github-actions[bot] Jan 30, 2025
1172da2
ci: Preprocess strings before pushing to Crowdin (#4383)
LisoUseInAIKyrios Jan 31, 2025
5e1809c
chore: Add translatable string tags
LisoUseInAIKyrios Jan 31, 2025
f2a1640
ci: Fix Crowdin pull
LisoUseInAIKyrios Jan 31, 2025
509139e
chore: Sync translations (#4385)
github-actions[bot] Jan 31, 2025
b00b914
chore: Sync translations (#4386)
github-actions[bot] Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pull_strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Pull strings

on:
schedule:
- cron: "0 */8 * * *"
- cron: "0 */6 * * *"
workflow_dispatch:

jobs:
Expand All @@ -26,6 +26,7 @@ jobs:
config: crowdin.yml
upload_sources: false
download_translations: true
skip_ref_checkout: true
localization_branch_name: feat/translations
create_pull_request: false
env:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/push_strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
with:
fetch-depth: 0

- name: Preprocess strings
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew clean preprocessCrowdinStrings

- name: Push strings
uses: crowdin/github-action@v2
with:
Expand Down
105 changes: 105 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,108 @@
# [5.10.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.10...v5.10.0-dev.11) (2025-01-30)


### Bug Fixes

* Use correct path to fix invalid file paths ([5ff4ee8](https://github.com/ReVanced/revanced-patches/commit/5ff4ee823da55c7b135eab8b62e07be465612b55))

# [5.10.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.9...v5.10.0-dev.10) (2025-01-29)


### Bug Fixes

* **YouTube - Hide ads:** Hide new types of tablet ads ([574bcc8](https://github.com/ReVanced/revanced-patches/commit/574bcc844746b7445ec3e93b47daceafefad85e7))

# [5.10.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.8...v5.10.0-dev.9) (2025-01-29)


### Bug Fixes

* **SwissId - Play integrity Removal:** Add recommended app version ([#4370](https://github.com/ReVanced/revanced-patches/issues/4370)) ([d8ed474](https://github.com/ReVanced/revanced-patches/commit/d8ed474b165f094fdedc32caaae1f82ebc99eb3d))

# [5.10.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.7...v5.10.0-dev.8) (2025-01-29)


### Bug Fixes

* **YouTube - Spoof video streams:** Update settings side effects summary text ([#4369](https://github.com/ReVanced/revanced-patches/issues/4369)) ([e5b3aa1](https://github.com/ReVanced/revanced-patches/commit/e5b3aa1cc6a2465cb006487d528de888bc7cd430))

# [5.10.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.6...v5.10.0-dev.7) (2025-01-29)


### Bug Fixes

* **YouTube - Hide ads:** fix 'Hide the Visit store button on channel pages' not working ([#4364](https://github.com/ReVanced/revanced-patches/issues/4364)) ([9d63ea9](https://github.com/ReVanced/revanced-patches/commit/9d63ea9a10ab5128ce18a1f53a946e84550da258))

# [5.10.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.5...v5.10.0-dev.6) (2025-01-29)


### Bug Fixes

* **YouTube - Hide Ads:** Hide end screen store banner without leaving empty space ([#4367](https://github.com/ReVanced/revanced-patches/issues/4367)) ([7e68390](https://github.com/ReVanced/revanced-patches/commit/7e683906418434dd4e2104337d73a2292415c615))

# [5.10.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.4...v5.10.0-dev.5) (2025-01-27)


### Bug Fixes

* **YouTube - Hide video description components:** Use correct string key names ([0f28c2b](https://github.com/ReVanced/revanced-patches/commit/0f28c2b44c0051ea7ab3136433b84c73321cf5bd))

# [5.10.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.3...v5.10.0-dev.4) (2025-01-27)


### Features

* **YouTube - Hide video description components:** Add `Hide How this content was made section` ([#4355](https://github.com/ReVanced/revanced-patches/issues/4355)) ([68ec54e](https://github.com/ReVanced/revanced-patches/commit/68ec54ef850ae8d6461dd0ef2846e6efbb59e482))

# [5.10.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.2...v5.10.0-dev.3) (2025-01-27)


### Features

* **YouTube - Hide ads:** Add `Hide end screen store banner` ([#4351](https://github.com/ReVanced/revanced-patches/issues/4351)) ([5505087](https://github.com/ReVanced/revanced-patches/commit/55050878028fed82b0f583a9f7ba06b8f267f8ec))

# [5.10.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.10.0-dev.1...v5.10.0-dev.2) (2025-01-25)


### Features

* **YouTube:** Add patch `Disable HDR video` ([#4347](https://github.com/ReVanced/revanced-patches/issues/4347)) ([0528f7c](https://github.com/ReVanced/revanced-patches/commit/0528f7cad856a2b1347e41944167b0583fc4a3d9))

# [5.10.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.9.1-dev.4...v5.10.0-dev.1) (2025-01-23)


### Features

* **YouTube - Theme:** Add option to use custom seekbar accent color ([#4337](https://github.com/ReVanced/revanced-patches/issues/4337)) ([952b4fc](https://github.com/ReVanced/revanced-patches/commit/952b4fc4c9291e1a3e71437b503857763c973dd4))

## [5.9.1-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.9.1-dev.3...v5.9.1-dev.4) (2025-01-22)


### Bug Fixes

* **YouTube - Hide layout components:** Hide new kind of community post ([#4341](https://github.com/ReVanced/revanced-patches/issues/4341)) ([02685c4](https://github.com/ReVanced/revanced-patches/commit/02685c4567aca55f22d45dc238a7d1f0ea264143))

## [5.9.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.9.1-dev.2...v5.9.1-dev.3) (2025-01-22)


### Bug Fixes

* **YouTube - Hide seekbar:** Do not hide player seekbar if hide feed seekbar is enabled ([#4333](https://github.com/ReVanced/revanced-patches/issues/4333)) ([f5cf6f2](https://github.com/ReVanced/revanced-patches/commit/f5cf6f2a445492d33815a9772f49deac2d70eba9))

## [5.9.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.9.1-dev.1...v5.9.1-dev.2) (2025-01-22)


### Bug Fixes

* **YouTube - Theme:** Fix 19.25 - 19.45 patch error ([5b47a5f](https://github.com/ReVanced/revanced-patches/commit/5b47a5f0f6299daaae209341064fd85f16ca18a6))

## [5.9.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.9.0...v5.9.1-dev.1) (2025-01-21)


### Bug Fixes

* **YouTube - Theme:** Replace custom seekbar gradient colors instead of disabling ([#4329](https://github.com/ReVanced/revanced-patches/issues/4329)) ([f03da98](https://github.com/ReVanced/revanced-patches/commit/f03da983051021e0c372557a5354d5d967409564))

# [5.9.0](https://github.com/ReVanced/revanced-patches/compare/v5.8.1...v5.9.0) (2025-01-20)


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package app.revanced.extension.youtube.patches;

import app.revanced.extension.youtube.settings.Settings;

@SuppressWarnings("unused")
public class DisableHdrPatch {

/**
* Injection point.
*/
public static boolean disableHDRVideo() {
return !Settings.DISABLE_HDR_VIDEO.get();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@
@SuppressWarnings("unused")
public final class EnableDebuggingPatch {

private static final ConcurrentMap<Long, Boolean> featureFlags
= new ConcurrentHashMap<>(300, 0.75f, 1);
/**
* Only log if debugging is enabled on startup.
* This prevents enabling debugging
* while the app is running then failing to restart
* resulting in an incomplete log.
*/
private static final boolean LOG_FEATURE_FLAGS = BaseSettings.DEBUG.get();

private static final ConcurrentMap<Long, Boolean> featureFlags = LOG_FEATURE_FLAGS
? new ConcurrentHashMap<>(800, 0.5f, 1)
: null;

/**
* Injection point.
*/
public static boolean isBooleanFeatureFlagEnabled(boolean value, long flag) {
if (value && BaseSettings.DEBUG.get()) {
if (LOG_FEATURE_FLAGS && value) {
if (featureFlags.putIfAbsent(flag, true) == null) {
Logger.printDebug(() -> "boolean feature is enabled: " + flag);
}
Expand All @@ -29,7 +38,7 @@ public static boolean isBooleanFeatureFlagEnabled(boolean value, long flag) {
* Injection point.
*/
public static double isDoubleFeatureFlagEnabled(double value, long flag, double defaultValue) {
if (defaultValue != value && BaseSettings.DEBUG.get()) {
if (LOG_FEATURE_FLAGS && defaultValue != value) {
if (featureFlags.putIfAbsent(flag, true) == null) {
// Align the log outputs to make post processing easier.
Logger.printDebug(() -> " double feature is enabled: " + flag
Expand All @@ -44,7 +53,7 @@ public static double isDoubleFeatureFlagEnabled(double value, long flag, double
* Injection point.
*/
public static long isLongFeatureFlagEnabled(long value, long flag, long defaultValue) {
if (defaultValue != value && BaseSettings.DEBUG.get()) {
if (LOG_FEATURE_FLAGS && defaultValue != value) {
if (featureFlags.putIfAbsent(flag, true) == null) {
Logger.printDebug(() -> " long feature is enabled: " + flag
+ " value: " + value + (defaultValue == 0 ? "" : " default: " + defaultValue));
Expand All @@ -58,7 +67,7 @@ public static long isLongFeatureFlagEnabled(long value, long flag, long defaultV
* Injection point.
*/
public static String isStringFeatureFlagEnabled(String value, long flag, String defaultValue) {
if (BaseSettings.DEBUG.get() && !defaultValue.equals(value)) {
if (LOG_FEATURE_FLAGS && !defaultValue.equals(value)) {
if (featureFlags.putIfAbsent(flag, true) == null) {
Logger.printDebug(() -> " string feature is enabled: " + flag
+ " value: " + value + (defaultValue.isEmpty() ? "" : " default: " + defaultValue));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
@SuppressWarnings("unused")
public class VideoAdsPatch {

// Used by app.revanced.patches.youtube.ad.general.video.patch.VideoAdsPatch
// depends on Whitelist patch (still needs to be written)
private static final boolean SHOW_VIDEO_ADS = !Settings.HIDE_VIDEO_ADS.get();

/**
* Injection point.
*/
public static boolean shouldShowAds() {
return !Settings.HIDE_VIDEO_ADS.get(); // TODO && Whitelist.shouldShowAds();
return SHOW_VIDEO_ADS;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

import androidx.annotation.Nullable;

import app.revanced.extension.youtube.settings.Settings;
import java.util.List;

import app.revanced.extension.shared.Logger;
import app.revanced.extension.shared.Utils;
import app.revanced.extension.youtube.StringTrieSearch;
import app.revanced.extension.youtube.settings.Settings;

@SuppressWarnings("unused")
public final class AdsFilter extends Filter {
Expand All @@ -22,6 +24,11 @@ public final class AdsFilter extends Filter {

// endregion

// https://encrypted-tbn0.gstatic.com/shopping?q=abc
private static final String STORE_BANNER_DOMAIN = "gstatic.com/shopping";
private static final boolean HIDE_END_SCREEN_STORE_BANNER =
Settings.HIDE_END_SCREEN_STORE_BANNER.get();

private final StringTrieSearch exceptions = new StringTrieSearch();

private final StringFilterGroup playerShoppingShelf;
Expand Down Expand Up @@ -66,7 +73,9 @@ public AdsFilter() {
"full_width_square_image_layout",
"video_display_button_group_layout",
"landscape_image_wide_button_layout",
"video_display_carousel_button_group_layout"
"video_display_carousel_button_group_layout",
"compact_landscape_image_layout", // Tablet layout search results.
"text_image_no_button_layout" // Tablet layout search results.
);

final var generalAds = new StringFilterGroup(
Expand Down Expand Up @@ -112,23 +121,24 @@ public AdsFilter() {
"expandable_list"
);

channelProfile = new StringFilterGroup(
null,
"channel_profile.eml"
);

playerShoppingShelf = new StringFilterGroup(
null,
Settings.HIDE_PLAYER_STORE_SHELF,
"horizontal_shelf.eml"
);

playerShoppingShelfBuffer = new ByteArrayFilterGroup(
Settings.HIDE_PLAYER_STORE_SHELF,
null,
"shopping_item_card_list.eml"
);

visitStoreButton = new ByteArrayFilterGroup(
channelProfile = new StringFilterGroup(
Settings.HIDE_VISIT_STORE_BUTTON,
"channel_profile.eml",
"page_header.eml"
);

visitStoreButton = new ByteArrayFilterGroup(
null,
"header_store_button"
);

Expand Down Expand Up @@ -172,6 +182,11 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff
return false;
}

// Check for the index because of likelihood of false positives.
if (matchedGroup == shoppingLinks && contentIndex != 0) {
return false;
}

if (exceptions.matches(path))
return false;

Expand All @@ -188,13 +203,25 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff
return false;
}

// Check for the index because of likelihood of false positives.
if (matchedGroup == shoppingLinks && contentIndex != 0)
return false;

return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
}

/**
* Injection point.
*
* @param elementsList List of components of the end screen container.
* @param protobufList Component (ProtobufList).
*/
public static void hideEndScreenStoreBanner(List<Object> elementsList, Object protobufList) {
if (HIDE_END_SCREEN_STORE_BANNER && protobufList.toString().contains(STORE_BANNER_DOMAIN)) {
Logger.printDebug(() -> "Hiding store banner");
return;
}

elementsList.add(protobufList);
}


/**
* Hide the view, which shows ads in the homepage.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public DescriptionComponentsFilter() {
"transcript_section"
);

final StringFilterGroup howThisWasMadeSection = new StringFilterGroup(
Settings.HIDE_HOW_THIS_WAS_MADE_SECTION,
"how_this_was_made_section"
);

macroMarkersCarousel = new StringFilterGroup(
null,
"macro_markers_carousel.eml"
Expand All @@ -64,6 +69,7 @@ public DescriptionComponentsFilter() {
addPathCallbacks(
attributesSection,
infoCardsSection,
howThisWasMadeSection,
podcastSection,
transcriptSection,
macroMarkersCarousel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ public LayoutComponentsFilter() {
"images_post_root_slim.eml",
"text_post_root_slim.eml",
"post_base_wrapper_slim.eml",
"poll_post_root.eml"
"poll_post_root.eml",
"videos_post_root.eml"
);

final var communityGuidelines = new StringFilterGroup(
Expand Down
Loading