1
mirror of https://github.com/revanced/revanced-integrations synced 2025-11-19 03:23:27 +01:00

Compare commits

...

4 Commits

Author SHA1 Message Date
semantic-release-bot
69cc56c921 chore(release): 0.108.0-dev.24 [skip ci]
# [0.108.0-dev.24](https://github.com/revanced/revanced-integrations/compare/v0.108.0-dev.23...v0.108.0-dev.24) (2023-05-22)

### Bug Fixes

* **youtube/return-youtube-dislike:** fix dislikes not showing for video opened from feed autoplay ([#408](https://github.com/revanced/revanced-integrations/issues/408)) ([307315c](307315c43c))
2023-05-22 01:53:18 +00:00
LisoUseInAIKyrios
307315c43c fix(youtube/return-youtube-dislike): fix dislikes not showing for video opened from feed autoplay (#408) 2023-05-22 05:51:19 +04:00
semantic-release-bot
985c0d0c48 chore(release): 0.108.0-dev.23 [skip ci]
# [0.108.0-dev.23](https://github.com/revanced/revanced-integrations/compare/v0.108.0-dev.22...v0.108.0-dev.23) (2023-05-21)

### Features

* **reddit:** add `sanitize-sharing-links` patch ([#407](https://github.com/revanced/revanced-integrations/issues/407)) ([191cc71](191cc711de))
2023-05-21 15:57:09 +00:00
KAZI MMT
191cc711de feat(reddit): add sanitize-sharing-links patch (#407)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-05-21 17:54:54 +02:00
4 changed files with 42 additions and 8 deletions

View File

@@ -1,3 +1,17 @@
# [0.108.0-dev.24](https://github.com/revanced/revanced-integrations/compare/v0.108.0-dev.23...v0.108.0-dev.24) (2023-05-22)
### Bug Fixes
* **youtube/return-youtube-dislike:** fix dislikes not showing for video opened from feed autoplay ([#408](https://github.com/revanced/revanced-integrations/issues/408)) ([307315c](https://github.com/revanced/revanced-integrations/commit/307315c43c68a47c983384351a617f5c5f508b4f))
# [0.108.0-dev.23](https://github.com/revanced/revanced-integrations/compare/v0.108.0-dev.22...v0.108.0-dev.23) (2023-05-21)
### Features
* **reddit:** add `sanitize-sharing-links` patch ([#407](https://github.com/revanced/revanced-integrations/issues/407)) ([191cc71](https://github.com/revanced/revanced-integrations/commit/191cc711de1ecbf6632fc27d32ee4f0c81413c57))
# [0.108.0-dev.22](https://github.com/revanced/revanced-integrations/compare/v0.108.0-dev.21...v0.108.0-dev.22) (2023-05-20)

View File

@@ -239,12 +239,6 @@ public class ReturnYouTubeDislike {
public static void newVideoLoaded(@NonNull String videoId) {
Objects.requireNonNull(videoId);
PlayerType currentPlayerType = PlayerType.getCurrent();
if (currentPlayerType == PlayerType.INLINE_MINIMAL) {
LogHelper.printDebug(() -> "Ignoring inline playback of video: " + videoId);
setCurrentVideoId(null);
return;
}
synchronized (videoIdLockObject) {
if (videoId.equals(currentVideoId)) {
return; // already loaded
@@ -254,13 +248,14 @@ public class ReturnYouTubeDislike {
setCurrentVideoId(null);
return;
}
PlayerType currentPlayerType = PlayerType.getCurrent();
LogHelper.printDebug(() -> "New video loaded: " + videoId + " playerType: " + currentPlayerType);
setCurrentVideoId(videoId);
// If a Short is opened while a regular video is on screen, this will incorrectly set this as false.
// But this check is needed to fix unusual situations of opening/closing the app
// while both a regular video and a short are on screen.
dislikeDataIsShort = PlayerType.getCurrent().isNoneHiddenOrMinimized();
dislikeDataIsShort = currentPlayerType.isNoneHiddenOrMinimized();
RYDCachedFetch entry = futureCache.get(videoId);
if (entry != null && entry.futureInProgressOrFinishedSuccessfully()) {

View File

@@ -0,0 +1,25 @@
package app.revanced.reddit.patches;
import app.revanced.integrations.utils.LogHelper;
import java.net.MalformedURLException;
import java.net.URL;
public final class SanitizeUrlQueryPatch {
/**
* Strip query parameters from a given URL string.
*
* @param urlString URL string to strip query parameters from.
* @return URL string without query parameters if possible, otherwise the original string.
*/
public static String stripQueryParameters(final String urlString) {
try {
final var url = new URL(urlString);
return url.getProtocol() + "://" + url.getHost() + url.getPath();
} catch (MalformedURLException e) {
LogHelper.printException(() -> "Can not parse URL", e);
return urlString;
}
}
}

View File

@@ -1,3 +1,3 @@
org.gradle.jvmargs = -Xmx2048m
android.useAndroidX = true
version = 0.108.0-dev.22
version = 0.108.0-dev.24