mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-05-04 08:34:25 +02:00
chore: Merge branch dev
to main
(#526)
This commit is contained in:
commit
d6ed0c061c
21
CHANGELOG.md
21
CHANGELOG.md
@ -1,3 +1,24 @@
|
|||||||
|
## [0.124.1-dev.3](https://github.com/ReVanced/revanced-integrations/compare/v0.124.1-dev.2...v0.124.1-dev.3) (2023-11-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Hide layout components:** Prevent app from crashing on startup ([c2112e0](https://github.com/ReVanced/revanced-integrations/commit/c2112e066af31890c5d441870d24f3582e9b1dd1))
|
||||||
|
|
||||||
|
## [0.124.1-dev.2](https://github.com/ReVanced/revanced-integrations/compare/v0.124.1-dev.1...v0.124.1-dev.2) (2023-11-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Return YouTube dislike:** Fix layout of right to left languages ([11abdf1](https://github.com/ReVanced/revanced-integrations/commit/11abdf162f1a4c82a2330b16ca42800d8599c215))
|
||||||
|
|
||||||
|
## [0.124.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v0.124.0...v0.124.1-dev.1) (2023-11-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Spoof signature:** fix error toast when viewing very old YouTube videos ([#525](https://github.com/ReVanced/revanced-integrations/issues/525)) ([eede028](https://github.com/ReVanced/revanced-integrations/commit/eede028c96042e6abc18377bf16a75e4806aba4a))
|
||||||
|
|
||||||
# [0.124.0](https://github.com/ReVanced/revanced-integrations/compare/v0.123.0...v0.124.0) (2023-11-23)
|
# [0.124.0](https://github.com/ReVanced/revanced-integrations/compare/v0.123.0...v0.124.0) (2023-11-23)
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,9 +335,13 @@ public class ReturnYouTubeDislikePatch {
|
|||||||
// YouTube Rolling Numbers do not use compound drawables or drawable padding.
|
// YouTube Rolling Numbers do not use compound drawables or drawable padding.
|
||||||
if (view.getCompoundDrawablePadding() == 0) {
|
if (view.getCompoundDrawablePadding() == 0) {
|
||||||
LogHelper.printDebug(() -> "Adding rolling number TextView changes");
|
LogHelper.printDebug(() -> "Adding rolling number TextView changes");
|
||||||
ShapeDrawable leftSeparator = ReturnYouTubeDislike.getLeftSeparatorDrawable();
|
|
||||||
view.setCompoundDrawables(leftSeparator, null, null, null);
|
|
||||||
view.setCompoundDrawablePadding(ReturnYouTubeDislike.leftSeparatorShapePaddingPixels);
|
view.setCompoundDrawablePadding(ReturnYouTubeDislike.leftSeparatorShapePaddingPixels);
|
||||||
|
ShapeDrawable separator = ReturnYouTubeDislike.getLeftSeparatorDrawable();
|
||||||
|
if (ReVancedUtils.isRightToLeftTextLayout()) {
|
||||||
|
view.setCompoundDrawables(null, null, separator, null);
|
||||||
|
} else {
|
||||||
|
view.setCompoundDrawables(separator, null, null, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,10 @@ import app.revanced.integrations.utils.StringTrieSearch;
|
|||||||
public final class LayoutComponentsFilter extends Filter {
|
public final class LayoutComponentsFilter extends Filter {
|
||||||
private final StringTrieSearch exceptions = new StringTrieSearch();
|
private final StringTrieSearch exceptions = new StringTrieSearch();
|
||||||
private static final StringTrieSearch mixPlaylistsExceptions = new StringTrieSearch();
|
private static final StringTrieSearch mixPlaylistsExceptions = new StringTrieSearch();
|
||||||
private static ByteArrayAsStringFilterGroup mixPlaylistsExceptions2;
|
private static final ByteArrayAsStringFilterGroup mixPlaylistsExceptions2 = new ByteArrayAsStringFilterGroup(
|
||||||
|
null,
|
||||||
|
"cell_description_body"
|
||||||
|
);
|
||||||
private final CustomFilterGroup custom;
|
private final CustomFilterGroup custom;
|
||||||
|
|
||||||
private static final ByteArrayAsStringFilterGroup mixPlaylists = new ByteArrayAsStringFilterGroup(
|
private static final ByteArrayAsStringFilterGroup mixPlaylists = new ByteArrayAsStringFilterGroup(
|
||||||
@ -25,6 +27,13 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
private final StringFilterGroup notifyMe;
|
private final StringFilterGroup notifyMe;
|
||||||
private final StringFilterGroup expandableMetadata;
|
private final StringFilterGroup expandableMetadata;
|
||||||
|
|
||||||
|
static {
|
||||||
|
mixPlaylistsExceptions.addPatterns(
|
||||||
|
"V.ED", // Playlist browse id.
|
||||||
|
"java.lang.ref.WeakReference"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||||
public LayoutComponentsFilter() {
|
public LayoutComponentsFilter() {
|
||||||
exceptions.addPatterns(
|
exceptions.addPatterns(
|
||||||
@ -35,16 +44,6 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
"library_recent_shelf"
|
"library_recent_shelf"
|
||||||
);
|
);
|
||||||
|
|
||||||
mixPlaylistsExceptions.addPatterns(
|
|
||||||
"V.ED", // Playlist browse id.
|
|
||||||
"java.lang.ref.WeakReference"
|
|
||||||
);
|
|
||||||
|
|
||||||
mixPlaylistsExceptions2 = new ByteArrayAsStringFilterGroup(
|
|
||||||
null,
|
|
||||||
"cell_description_body"
|
|
||||||
);
|
|
||||||
|
|
||||||
custom = new CustomFilterGroup(
|
custom = new CustomFilterGroup(
|
||||||
SettingsEnum.CUSTOM_FILTER,
|
SettingsEnum.CUSTOM_FILTER,
|
||||||
SettingsEnum.CUSTOM_FILTER_STRINGS
|
SettingsEnum.CUSTOM_FILTER_STRINGS
|
||||||
@ -263,14 +262,15 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
if (mixPlaylistsExceptions.matches(conversionContext.toString()))
|
if (mixPlaylistsExceptions.matches(conversionContext.toString()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!mixPlaylists.check(bytes).isFiltered()) return false;
|
if (!mixPlaylists.check(bytes).isFiltered())
|
||||||
|
return false;
|
||||||
|
|
||||||
// Prevent hiding the description of some videos accidentally.
|
// Prevent hiding the description of some videos accidentally.
|
||||||
if (mixPlaylistsExceptions2.check(bytes).isFiltered()) return false;
|
if (mixPlaylistsExceptions2.check(bytes).isFiltered())
|
||||||
|
return false;
|
||||||
|
|
||||||
LogHelper.printDebug(() -> "Filtered mix playlist");
|
LogHelper.printDebug(() -> "Filtered mix playlist");
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean showWatermark() {
|
public static boolean showWatermark() {
|
||||||
|
@ -169,7 +169,17 @@ public class SpoofSignaturePatch {
|
|||||||
* if {@link SettingsEnum#SPOOF_STORYBOARD_RENDERER} is not enabled.
|
* if {@link SettingsEnum#SPOOF_STORYBOARD_RENDERER} is not enabled.
|
||||||
*/
|
*/
|
||||||
public static boolean getSeekbarThumbnailOverrideValue() {
|
public static boolean getSeekbarThumbnailOverrideValue() {
|
||||||
return SettingsEnum.SPOOF_SIGNATURE.getBoolean();
|
if (!SettingsEnum.SPOOF_SIGNATURE.getBoolean()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
StoryboardRenderer renderer = videoRenderer;
|
||||||
|
if (renderer == null) {
|
||||||
|
// Spoof storyboard renderer is turned off,
|
||||||
|
// video is paid, or the storyboard fetch timed out.
|
||||||
|
// Show empty thumbnails so the seek time and chapters still show up.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return renderer.getSpec() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
package app.revanced.integrations.patches.spoof;
|
package app.revanced.integrations.patches.spoof;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public final class StoryboardRenderer {
|
public final class StoryboardRenderer {
|
||||||
|
@Nullable
|
||||||
private final String spec;
|
private final String spec;
|
||||||
private final boolean isLiveStream;
|
private final boolean isLiveStream;
|
||||||
@Nullable
|
@Nullable
|
||||||
private final Integer recommendedLevel;
|
private final Integer recommendedLevel;
|
||||||
|
|
||||||
public StoryboardRenderer(String spec, boolean isLiveStream, @Nullable Integer recommendedLevel) {
|
public StoryboardRenderer(@Nullable String spec, boolean isLiveStream, @Nullable Integer recommendedLevel) {
|
||||||
this.spec = spec;
|
this.spec = spec;
|
||||||
this.isLiveStream = isLiveStream;
|
this.isLiveStream = isLiveStream;
|
||||||
this.recommendedLevel = recommendedLevel;
|
this.recommendedLevel = recommendedLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@Nullable
|
||||||
public String getSpec() {
|
public String getSpec() {
|
||||||
return spec;
|
return spec;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,14 @@ import app.revanced.integrations.utils.ReVancedUtils;
|
|||||||
|
|
||||||
public class StoryboardRendererRequester {
|
public class StoryboardRendererRequester {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For videos that have no storyboard.
|
||||||
|
* Usually for low resolution videos as old as YouTube itself.
|
||||||
|
* Does not include paid videos where the renderer fetch fails.
|
||||||
|
*/
|
||||||
|
private static final StoryboardRenderer emptyStoryboard
|
||||||
|
= new StoryboardRenderer(null, false, null);
|
||||||
|
|
||||||
private StoryboardRendererRequester() {
|
private StoryboardRendererRequester() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,6 +113,10 @@ public class StoryboardRendererRequester {
|
|||||||
private static StoryboardRenderer getStoryboardRendererUsingResponse(@NonNull JSONObject playerResponse) {
|
private static StoryboardRenderer getStoryboardRendererUsingResponse(@NonNull JSONObject playerResponse) {
|
||||||
try {
|
try {
|
||||||
LogHelper.printDebug(() -> "Parsing response: " + playerResponse);
|
LogHelper.printDebug(() -> "Parsing response: " + playerResponse);
|
||||||
|
if (!playerResponse.has("storyboards")) {
|
||||||
|
LogHelper.printDebug(() -> "Using empty storyboard");
|
||||||
|
return emptyStoryboard;
|
||||||
|
}
|
||||||
final JSONObject storyboards = playerResponse.getJSONObject("storyboards");
|
final JSONObject storyboards = playerResponse.getJSONObject("storyboards");
|
||||||
final boolean isLiveStream = storyboards.has("playerLiveStoryboardSpecRenderer");
|
final boolean isLiveStream = storyboards.has("playerLiveStoryboardSpecRenderer");
|
||||||
final String storyboardsRendererTag = isLiveStream
|
final String storyboardsRendererTag = isLiveStream
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
android.useAndroidX = true
|
android.useAndroidX = true
|
||||||
version = 0.124.0
|
version = 0.124.1-dev.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user