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

Compare commits

...

83 Commits

Author SHA1 Message Date
semantic-release-bot
d300cf0888 chore(release): 0.24.2 [skip ci]
## [0.24.2](https://github.com/revanced/revanced-integrations/compare/v0.24.1...v0.24.2) (2022-07-14)

### Bug Fixes

* set debug to false by default ([95b9406](95b9406701))
2022-07-14 16:47:50 +00:00
TheJeterLP
95b9406701 fix: set debug to false by default 2022-07-14 18:45:07 +02:00
TheJeterLP
ac9e239b16 refactor: prepare for settings patch (#80) 2022-07-14 18:42:43 +02:00
semantic-release-bot
ad1e42eb01 chore(release): 0.24.1 [skip ci]
## [0.24.1](https://github.com/revanced/revanced-integrations/compare/v0.24.0...v0.24.1) (2022-07-14)

### Bug Fixes

* `swipe-controls` with active engagement panel ([#82](https://github.com/revanced/revanced-integrations/issues/82)) ([669cb29](669cb295a1))
2022-07-14 15:21:45 +00:00
Chris
669cb295a1 fix: swipe-controls with active engagement panel (#82) 2022-07-14 17:18:53 +02:00
semantic-release-bot
2c2bdf6186 chore(release): 0.24.0 [skip ci]
# [0.24.0](https://github.com/revanced/revanced-integrations/compare/v0.23.2...v0.24.0) (2022-07-12)

### Features

* `force-vp9-codec` integrations ([#76](https://github.com/revanced/revanced-integrations/issues/76)) ([8a0029c](8a0029c81c))
2022-07-12 18:10:32 +00:00
TheJeterLP
8a0029c81c feat: force-vp9-codec integrations (#76) 2022-07-12 20:07:43 +02:00
semantic-release-bot
636fae622a chore(release): 0.23.2 [skip ci]
## [0.23.2](https://github.com/revanced/revanced-integrations/compare/v0.23.1...v0.23.2) (2022-07-12)

### Bug Fixes

* untangle RYD from SB. fixes [#79](https://github.com/revanced/revanced-integrations/issues/79) ([56eaef0](56eaef0670))
2022-07-12 15:51:38 +00:00
TheJeterLP
56eaef0670 fix: untangle RYD from SB. fixes #79 2022-07-12 17:48:28 +02:00
semantic-release-bot
9a5ed589d8 chore(release): 0.23.1 [skip ci]
## [0.23.1](https://github.com/revanced/revanced-integrations/compare/v0.23.0...v0.23.1) (2022-07-12)

### Bug Fixes

* crash when buffer value is less than 1 ([e2d9623](e2d962355c))
2022-07-12 15:45:20 +00:00
TheJeterLP
e2d962355c fix: crash when buffer value is less than 1 2022-07-12 17:42:06 +02:00
semantic-release-bot
5ff47b7fcc chore(release): 0.23.0 [skip ci]
# [0.23.0](https://github.com/revanced/revanced-integrations/compare/v0.22.1...v0.23.0) (2022-07-12)

### Bug Fixes

* use `getLong` instead of `getFloat` ([577a734](577a7348fe))
* wrong description for issue templates ([ea581d4](ea581d48e2))

### Features

* added issue templates. ([#77](https://github.com/revanced/revanced-integrations/issues/77)) ([51016ef](51016efcb7))
2022-07-12 01:21:03 +00:00
oSumAtrIX
577a7348fe fix: use getLong instead of getFloat 2022-07-12 03:17:33 +02:00
oSumAtrIX
feab35e76c docs: change size of headings [skip ci] 2022-07-12 01:12:06 +02:00
oSumAtrIX
ea581d48e2 fix: wrong description for issue templates 2022-07-11 20:49:53 +02:00
Aunali321
51016efcb7 feat: added issue templates. (#77) 2022-07-11 20:45:26 +02:00
semantic-release-bot
530949657f chore(release): 0.22.1 [skip ci]
## [0.22.1](https://github.com/revanced/revanced-integrations/compare/v0.22.0...v0.22.1) (2022-07-11)

### Bug Fixes

* `hdr-auto-brightness` patch ([#74](https://github.com/revanced/revanced-integrations/issues/74)) ([7314032](7314032a38))
2022-07-11 16:27:23 +00:00
Chris
7314032a38 fix: hdr-auto-brightness patch (#74) 2022-07-11 18:24:32 +02:00
semantic-release-bot
134d7e33bd chore(release): 0.22.0 [skip ci]
# [0.22.0](https://github.com/revanced/revanced-integrations/compare/v0.21.9...v0.22.0) (2022-07-11)

### Features

* `swipe-controls` rewrite ([#64](https://github.com/revanced/revanced-integrations/issues/64)) ([fcabebf](fcabebf3a7))
2022-07-11 12:32:26 +00:00
Chris
fcabebf3a7 feat: swipe-controls rewrite (#64)
* rewrite swipe controls without deep hooks
+ merge changes
+ refactor class names

* fix gesture detection behaviour

* add option to disable press-to-swipe

* add config options related to swipe

* restore default device brightness when exiting fullscreen player
fixes https://github.com/revanced/revanced-patches/issues/128

* set to default brightness after reaching 0%

* block swipe-to-dismiss when not using press-to-swipe

* fix: TouchThiefLayout potentially attaches multiple times

* remove last references to 'fenster' name

* move updatePlayerType hook into its own patch

* refactor 'swipe-controls' patch

* make feedback text backgrond semi-transparent

* update swipe-controls overlay

* fix swipe-controls leaking host activity context

* fix saved screen brightness resetting between videos

* fix crash on re-enter activity

* make overlay more configurable

* add settings to revanced_prefs.xml
2022-07-11 14:29:39 +02:00
semantic-release-bot
376ffc0844 chore(release): 0.21.9 [skip ci]
## [0.21.9](https://github.com/revanced/revanced-integrations/compare/v0.21.8...v0.21.9) (2022-07-08)

### Bug Fixes

* remove int argument from buffer functions ([#71](https://github.com/revanced/revanced-integrations/issues/71)) ([7de1994](7de199421c))
2022-07-08 21:09:51 +00:00
TheJeterLP
7de199421c fix: remove int argument from buffer functions (#71) 2022-07-08 23:06:37 +02:00
semantic-release-bot
e2a1bb7ce8 chore(release): 0.21.8 [skip ci]
## [0.21.8](https://github.com/revanced/revanced-integrations/compare/v0.21.7...v0.21.8) (2022-07-08)

### Bug Fixes

* Block some more movies in adblocker ([#69](https://github.com/revanced/revanced-integrations/issues/69)) ([391ce64](391ce64c25))
2022-07-08 07:39:03 +00:00
OxrxL
391ce64c25 fix: Block some more movies in adblocker (#69)
* browsy_bar block

* feat: add browsy block
2022-07-08 09:36:28 +02:00
TheJeterLP
f346ed6122 refactor: revert previous commit 2022-07-08 01:21:18 +02:00
TheJeterLP
4d12729306 refactor: downgrade gradle plugin so intellij can open the project 2022-07-08 01:00:34 +02:00
semantic-release-bot
9a8ddc9ca6 chore(release): 0.21.7 [skip ci]
## [0.21.7](https://github.com/revanced/revanced-integrations/compare/v0.21.6...v0.21.7) (2022-07-07)

### Bug Fixes

* enable wide-search-bar by default ([#67](https://github.com/revanced/revanced-integrations/issues/67)) ([fabc4e0](fabc4e0548))
2022-07-07 22:35:49 +00:00
TheJeterLP
fabc4e0548 fix: enable wide-search-bar by default (#67) 2022-07-08 00:32:29 +02:00
TheJeterLP
7f64a8bcab docs(debugging): Show how to use the debug logger 2022-07-07 18:58:09 +02:00
semantic-release-bot
1f29541aa7 chore(release): 0.21.6 [skip ci]
## [0.21.6](https://github.com/revanced/revanced-integrations/compare/v0.21.5...v0.21.6) (2022-07-07)

### Bug Fixes

* use Log.d for debugging ([#66](https://github.com/revanced/revanced-integrations/issues/66)) ([605124b](605124bc60))
2022-07-07 16:54:18 +00:00
TheJeterLP
605124bc60 fix: use Log.d for debugging (#66) 2022-07-07 18:50:42 +02:00
semantic-release-bot
f74a11523f chore(release): 0.21.5 [skip ci]
## [0.21.5](https://github.com/revanced/revanced-integrations/compare/v0.21.4...v0.21.5) (2022-07-07)

### Bug Fixes

* don't enable debug log by default ([bf7f138](bf7f138615))
2022-07-07 09:47:34 +00:00
TheJeterLP
bf7f138615 fix: don't enable debug log by default 2022-07-07 11:44:48 +02:00
semantic-release-bot
f29c608808 chore(release): 0.21.4 [skip ci]
## [0.21.4](https://github.com/revanced/revanced-integrations/compare/v0.21.3...v0.21.4) (2022-07-06)

### Bug Fixes

* change overlay time of swipe-controls ([#60](https://github.com/revanced/revanced-integrations/issues/60)) ([7da963c](7da963cf8e))
2022-07-06 20:38:59 +00:00
EXAM454
7da963cf8e fix: change overlay time of swipe-controls (#60)
* Update FensterOverlayController.kt

change overlay time to 250ms for fast volume & brightness panel switch. Also 2sec is iritating.

* Update FensterOverlayController.kt
2022-07-06 22:36:12 +02:00
semantic-release-bot
d7161938f3 chore(release): 0.21.3 [skip ci]
## [0.21.3](https://github.com/revanced/revanced-integrations/compare/v0.21.2...v0.21.3) (2022-07-06)

### Bug Fixes

* Reduce padding DPI for swipe zones ([b944f6b](b944f6bd59))
2022-07-06 18:26:20 +00:00
EXAM454
b944f6bd59 fix: Reduce padding DPI for swipe zones 2022-07-06 20:23:07 +02:00
semantic-release-bot
eb41894d0a chore(release): 0.21.2 [skip ci]
## [0.21.2](https://github.com/revanced/revanced-integrations/compare/v0.21.1...v0.21.2) (2022-07-06)

### Bug Fixes

* remove long-press from swipe-controls ([7c559bb](7c559bb13c))
2022-07-06 18:16:34 +00:00
OxrxL
1dcbed7eaf refactor: Litho comments blockage generalization (#57) 2022-07-06 20:14:00 +02:00
EXAM454
7c559bb13c fix: remove long-press from swipe-controls 2022-07-06 20:13:27 +02:00
semantic-release-bot
fe8f7cb62f chore(release): 0.21.1 [skip ci]
## [0.21.1](https://github.com/revanced/revanced-integrations/compare/v0.21.0...v0.21.1) (2022-07-05)

### Bug Fixes

* fix build not creating new release ([9c981f7](9c981f7203))
2022-07-05 20:41:17 +00:00
Joey Peter
9c981f7203 fix: fix build not creating new release 2022-07-05 22:38:35 +02:00
Joey Peter
ada1ac160c build: Trigger Release 2022-07-05 22:34:23 +02:00
Joey Peter
0476299570 refactor: move settings to SettingsEnum (#49) 2022-07-05 22:31:13 +02:00
semantic-release-bot
7bd3b07559 chore(release): 0.21.0 [skip ci]
# [0.21.0](https://github.com/revanced/revanced-integrations/compare/v0.20.1...v0.21.0) (2022-07-05)

### Features

* `swipe-controls` ([#50](https://github.com/revanced/revanced-integrations/issues/50)) ([4e27c9f](4e27c9f88c))
2022-07-05 20:05:14 +00:00
Chris
4e27c9f88c feat: swipe-controls (#50) 2022-07-05 22:02:27 +02:00
semantic-release-bot
a1ecb48442 chore(release): 0.20.1 [skip ci]
## [0.20.1](https://github.com/revanced/revanced-integrations/compare/v0.20.0...v0.20.1) (2022-07-05)

### Bug Fixes

* Fix NPE when opening video from different App ([#53](https://github.com/revanced/revanced-integrations/issues/53)) ([3c0408f](3c0408fa09))
2022-07-05 07:25:04 +00:00
Joey Peter
3c0408fa09 fix: Fix NPE when opening video from different App (#53) 2022-07-05 09:22:41 +02:00
OxrxL
2710d50f66 refactor: alphabetical ordering for litho componnent blocks. 2022-07-03 15:41:31 +02:00
semantic-release-bot
6c42c7588d chore(release): 0.20.0 [skip ci]
# [0.20.0](https://github.com/revanced/revanced-integrations/compare/v0.19.1...v0.20.0) (2022-07-03)

### Features

* block suggestions ([#46](https://github.com/revanced/revanced-integrations/issues/46)) ([ecb7088](ecb708898e))
2022-07-03 13:29:01 +00:00
OxrxL
ecb708898e feat: block suggestions (#46) 2022-07-03 15:27:11 +02:00
semantic-release-bot
b55cd0153c chore(release): 0.19.1 [skip ci]
## [0.19.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1) (2022-07-02)

### Bug Fixes

* add missing dummy task `publish` ([3a2655b](3a2655b38b))
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([0ce6aa8](0ce6aa854c))
2022-07-02 22:56:50 +00:00
semantic-release-bot
382c6aa36f chore(release): 0.19.1-dev.1 [skip ci]
## [0.19.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1-dev.1) (2022-07-02)

### Bug Fixes

* add missing dummy task `publish` ([3a2655b](3a2655b38b))
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([b2d08e9](b2d08e9e9f))
2022-07-03 00:52:57 +02:00
Joey Peter
20310146dd refactor: remove no longer used feature. was added from youtube already (#36) 2022-07-03 00:52:57 +02:00
Joey Peter
0ce6aa854c fix: prepare for hide-suggestions patch (#35) 2022-07-03 00:52:57 +02:00
oSumAtrIX
3a2655b38b fix: add missing dummy task publish 2022-07-02 13:40:06 +02:00
oSumAtrIX
7fe30d550e build: semantic-release (#38) 2022-07-02 06:18:52 +02:00
Joey Peter
cfb4132ed1 refactor: rename XSwipe and XSettingsActivity (#33) 2022-06-30 13:54:00 +02:00
OxrxL
7a9c61b71b refactor: Strings
closes #29
2022-06-30 13:32:08 +02:00
Joey Peter
aecafc5380 refactor: dialogs and seperate RYD from SB (#31) 2022-06-30 12:38:28 +02:00
OxrxL
d9268bc0fa refactor: use containsAny helper method (#27) 2022-06-27 23:12:28 +02:00
Joey Peter
9b1dce42ed fix: some more refactoring and cleanup (#21)
* refactor: integrations and prepare new patches

* bugfixes

* fix critical bug

* prepare BrandingWaterMark patch

* fixing create button

* dont use Strings in ReVancedSettingsFragment when we have a wonderful enum for that

* rename classes from fenster to Swipe

* push

* exclude android packages from build
2022-06-27 22:08:50 +02:00
OxrxL
0938f6c59f fix: home ads (#24)
* Ads test

* refactor: cleanup code

Co-authored-by: Sculas <contact@sculas.xyz>
2022-06-27 22:08:24 +02:00
bogadana
a2bb4a5f03 refactor: move whole speeds array to new class (#22) 2022-06-25 15:15:59 +02:00
oSumAtrIX
773357d6e6 feat: workflow_dispatch 2022-06-24 00:55:50 +02:00
Joey Peter
d26b9339fb refactor: integrations (#17) 2022-06-24 00:16:32 +02:00
bogadana
61ed39722e feat: add array for custom-playback-speed patch (#20) 2022-06-23 01:54:37 +02:00
Robert
54baa3c2e5 Fix: ./gradlew: 23: cd: can't cd to "./ (#19) 2022-06-22 16:55:45 +02:00
Oskar
5dd10f6978 ci: chmod +x gradlew is not required (#15) 2022-06-21 15:08:19 +02:00
Canny1913
9bf804219e feat: hide cast button by default (#12) 2022-06-16 00:09:28 +02:00
oSumAtrIX
d7631f371b fix: info panel removal 2022-06-15 11:05:42 +02:00
oSumAtrIX
a30776f69f feat: reels_player_overlay ads 2022-06-13 20:02:09 +02:00
oSumAtrIX
dcfcc36fb8 fix: containsAd returning true for regular video templates 2022-06-12 01:12:41 +02:00
oSumAtrIX
8ff5f0e68d feat: make containsAd more efficient & add new values 2022-06-11 21:37:26 +02:00
oSumAtrIX
468c72e2a5 refactor: deduplicate code 2022-06-08 15:47:34 +02:00
oSumAtrIX
94c2c9d6e6 feat: additional annoyance removal options 2022-06-08 15:47:34 +02:00
oSumAtrIX
40857b1b34 refactor: remove unnecessary method containsAd(String) 2022-06-08 15:47:33 +02:00
oSumAtrIX
a96bbe6469 feat: app promo banner removal setting 2022-06-08 15:47:22 +02:00
oSumAtrIX
4fd2abc409 Merge pull request #10 from josesilveiraa/patch-1
refactor: rename applicationId
2022-06-07 00:18:36 +02:00
josesilveiraa
d007deedd2 refactor: rename applicationId
Refactor `applicationId` from `revanced.integrationspp` to `revanced.integrationsapp`.
2022-06-06 22:13:25 +00:00
oSumAtrIX
a27ec45be8 feat: additional annoyance removal options 2022-06-05 07:13:03 +02:00
oSumAtrIX
8fb1a251a2 refactor: remove unnecessary method containsAd(String) 2022-06-05 07:12:08 +02:00
oSumAtrIX
30724583e3 feat: app promo banner removal setting 2022-06-04 17:02:16 +02:00
170 changed files with 5075 additions and 6812 deletions

25
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a bug report on the integrations. Do not submit suggestions for patches
here.
title: 'problem: some problem'
labels: bug
assignees: ''
---
## 🐞 Issue
<!-- Describe your issue in detail here -->
## ⚙ Reproduce
<!-- Include your environment and steps to reproduce the issue as detailed as possible -->
## 🛠 Solution
<!-- If applicable, add a possible solution -->
## ⚠ Additional context
<!-- Add any other context about the problem here -->

View File

@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest a change on the integrations. Do not submit suggestions for patches
here.
title: 'feat: some feature'
labels: feature-request
assignees: ''
---
## 🐞 Issue
<!-- Explain here, what the current problem is and why it leads you to request a feature change -->
## ❗ Solution
<!-- Explain how your current issue can be solved -->
## ❓ Motivation
<!-- Explain why your feature should be considered -->
## ⚠ Additional context
<!-- Add any other context or screenshots about the feature request here -->

View File

@@ -1,12 +1,15 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
build:
@@ -16,34 +19,22 @@ jobs:
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "lts/*"
- name: Build with Gradle
run: ./gradlew --no-daemon build
- name: Github Tag Bump
uses: anothrNick/github-tag-action@1.39.0
- name: Setup semantic-release
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
id: bump_version
- name: Upload APKs to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./app/build/outputs/apk/release/*.apk
tag: ${{ steps.bump_version.outputs.new_tag }}
token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
run: npx semantic-release

38
.releaserc Normal file
View File

@@ -0,0 +1,38 @@
{
"branches": [
"main",
{
"name": "dev",
"prerelease": true
}
],
"plugins": [
["@semantic-release/commit-analyzer", {
"releaseRules": [
{"type": "build", "release": "patch"}
]
}],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"gradle-semantic-release-plugin",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"gradle.properties"
]
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "app/build/outputs/apk/release/*.apk"
}
]
}
]
]
}

161
CHANGELOG.md Normal file
View File

@@ -0,0 +1,161 @@
## [0.24.2](https://github.com/revanced/revanced-integrations/compare/v0.24.1...v0.24.2) (2022-07-14)
### Bug Fixes
* set debug to false by default ([95b9406](https://github.com/revanced/revanced-integrations/commit/95b940670190c155ba14b1f0a56db3647201e601))
## [0.24.1](https://github.com/revanced/revanced-integrations/compare/v0.24.0...v0.24.1) (2022-07-14)
### Bug Fixes
* `swipe-controls` with active engagement panel ([#82](https://github.com/revanced/revanced-integrations/issues/82)) ([669cb29](https://github.com/revanced/revanced-integrations/commit/669cb295a1621d2da2ee2b4a5801228a3e2e62ff))
# [0.24.0](https://github.com/revanced/revanced-integrations/compare/v0.23.2...v0.24.0) (2022-07-12)
### Features
* `force-vp9-codec` integrations ([#76](https://github.com/revanced/revanced-integrations/issues/76)) ([8a0029c](https://github.com/revanced/revanced-integrations/commit/8a0029c81cfd29788b1d556cdd31feacc152b3c1))
## [0.23.2](https://github.com/revanced/revanced-integrations/compare/v0.23.1...v0.23.2) (2022-07-12)
### Bug Fixes
* untangle RYD from SB. fixes [#79](https://github.com/revanced/revanced-integrations/issues/79) ([56eaef0](https://github.com/revanced/revanced-integrations/commit/56eaef0670121cd262de51862c8d23fd34724999))
## [0.23.1](https://github.com/revanced/revanced-integrations/compare/v0.23.0...v0.23.1) (2022-07-12)
### Bug Fixes
* crash when buffer value is less than 1 ([e2d9623](https://github.com/revanced/revanced-integrations/commit/e2d962355cf34dccfd233f65f475acbb8b895694))
# [0.23.0](https://github.com/revanced/revanced-integrations/compare/v0.22.1...v0.23.0) (2022-07-12)
### Bug Fixes
* use `getLong` instead of `getFloat` ([577a734](https://github.com/revanced/revanced-integrations/commit/577a7348fe023aba4858cceb0830062ee0a653d1))
* wrong description for issue templates ([ea581d4](https://github.com/revanced/revanced-integrations/commit/ea581d48e29b3f40d12e82448788a1151d4892d1))
### Features
* added issue templates. ([#77](https://github.com/revanced/revanced-integrations/issues/77)) ([51016ef](https://github.com/revanced/revanced-integrations/commit/51016efcb7c7fcc73f25ecfab48ffa96fbae4f47))
## [0.22.1](https://github.com/revanced/revanced-integrations/compare/v0.22.0...v0.22.1) (2022-07-11)
### Bug Fixes
* `hdr-auto-brightness` patch ([#74](https://github.com/revanced/revanced-integrations/issues/74)) ([7314032](https://github.com/revanced/revanced-integrations/commit/7314032a38f2c70f4e56326b592c5a01be218f88))
# [0.22.0](https://github.com/revanced/revanced-integrations/compare/v0.21.9...v0.22.0) (2022-07-11)
### Features
* `swipe-controls` rewrite ([#64](https://github.com/revanced/revanced-integrations/issues/64)) ([fcabebf](https://github.com/revanced/revanced-integrations/commit/fcabebf3a74fd517e7ac72d3231cb68fad37b8cd))
## [0.21.9](https://github.com/revanced/revanced-integrations/compare/v0.21.8...v0.21.9) (2022-07-08)
### Bug Fixes
* remove int argument from buffer functions ([#71](https://github.com/revanced/revanced-integrations/issues/71)) ([7de1994](https://github.com/revanced/revanced-integrations/commit/7de199421c37b3fd77488f60bbd5d492e3bd810e))
## [0.21.8](https://github.com/revanced/revanced-integrations/compare/v0.21.7...v0.21.8) (2022-07-08)
### Bug Fixes
* Block some more movies in adblocker ([#69](https://github.com/revanced/revanced-integrations/issues/69)) ([391ce64](https://github.com/revanced/revanced-integrations/commit/391ce64c252cf6fa858b26334dd4563b42672f67))
## [0.21.7](https://github.com/revanced/revanced-integrations/compare/v0.21.6...v0.21.7) (2022-07-07)
### Bug Fixes
* enable wide-search-bar by default ([#67](https://github.com/revanced/revanced-integrations/issues/67)) ([fabc4e0](https://github.com/revanced/revanced-integrations/commit/fabc4e0548faa3a8d4d2a894a9f452a770b8bbb7))
## [0.21.6](https://github.com/revanced/revanced-integrations/compare/v0.21.5...v0.21.6) (2022-07-07)
### Bug Fixes
* use Log.d for debugging ([#66](https://github.com/revanced/revanced-integrations/issues/66)) ([605124b](https://github.com/revanced/revanced-integrations/commit/605124bc607952eb91e57c2b3e3594fb62464534))
## [0.21.5](https://github.com/revanced/revanced-integrations/compare/v0.21.4...v0.21.5) (2022-07-07)
### Bug Fixes
* don't enable debug log by default ([bf7f138](https://github.com/revanced/revanced-integrations/commit/bf7f138615fed0e336174559282ed1a058646985))
## [0.21.4](https://github.com/revanced/revanced-integrations/compare/v0.21.3...v0.21.4) (2022-07-06)
### Bug Fixes
* change overlay time of swipe-controls ([#60](https://github.com/revanced/revanced-integrations/issues/60)) ([7da963c](https://github.com/revanced/revanced-integrations/commit/7da963cf8ebdf25e7498b4a2fc9a76c9f8c59bad))
## [0.21.3](https://github.com/revanced/revanced-integrations/compare/v0.21.2...v0.21.3) (2022-07-06)
### Bug Fixes
* Reduce padding DPI for swipe zones ([b944f6b](https://github.com/revanced/revanced-integrations/commit/b944f6bd5928c42658987e7dbbc56feb404e2a76))
## [0.21.2](https://github.com/revanced/revanced-integrations/compare/v0.21.1...v0.21.2) (2022-07-06)
### Bug Fixes
* remove long-press from swipe-controls ([7c559bb](https://github.com/revanced/revanced-integrations/commit/7c559bb13c6c5c0292a67bf2c0fdf4d5f8b04823))
## [0.21.1](https://github.com/revanced/revanced-integrations/compare/v0.21.0...v0.21.1) (2022-07-05)
### Bug Fixes
* fix build not creating new release ([9c981f7](https://github.com/revanced/revanced-integrations/commit/9c981f72034a6e8c20df764ee19428ca4306a183))
# [0.21.0](https://github.com/revanced/revanced-integrations/compare/v0.20.1...v0.21.0) (2022-07-05)
### Features
* `swipe-controls` ([#50](https://github.com/revanced/revanced-integrations/issues/50)) ([4e27c9f](https://github.com/revanced/revanced-integrations/commit/4e27c9f88c4fe9381e1ba1833da1252828a1627e))
## [0.20.1](https://github.com/revanced/revanced-integrations/compare/v0.20.0...v0.20.1) (2022-07-05)
### Bug Fixes
* Fix NPE when opening video from different App ([#53](https://github.com/revanced/revanced-integrations/issues/53)) ([3c0408f](https://github.com/revanced/revanced-integrations/commit/3c0408fa09793cbab335065c323ec57eb2a591d2))
# [0.20.0](https://github.com/revanced/revanced-integrations/compare/v0.19.1...v0.20.0) (2022-07-03)
### Features
* block suggestions ([#46](https://github.com/revanced/revanced-integrations/issues/46)) ([ecb7088](https://github.com/revanced/revanced-integrations/commit/ecb708898e62adb02efe3650fbc85cd2b5cece95))
## [0.19.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1) (2022-07-02)
### Bug Fixes
* add missing dummy task `publish` ([3a2655b](https://github.com/revanced/revanced-integrations/commit/3a2655b38b7e2994ece550ccefadbc70a31f7fa4))
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([0ce6aa8](https://github.com/revanced/revanced-integrations/commit/0ce6aa854ce6248c5eb37b1207023f4127a137be))
## [0.19.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1-dev.1) (2022-07-02)
### Bug Fixes
* add missing dummy task `publish` ([3a2655b](https://github.com/revanced/revanced-integrations/commit/3a2655b38b7e2994ece550ccefadbc70a31f7fa4))
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([b2d08e9](https://github.com/revanced/revanced-integrations/commit/b2d08e9e9fbb1df69ceb5234d3f092027904c1e1))

View File

@@ -1 +1,9 @@
# ReVanced Integrations
# ReVanced Integrations
# How to use debugging:
- Include the enable-debugging patch
- Set ```DEBUG_BOOLEAN("revanced_debug_enabled", false),``` to ```true```
- Usage on Windows: ```adb logcat | findstr "ReVanced" > log.txt```
- Usage on Linux: ```adb logcat | grep --line-buffered "ReVanced" > log.txt```
This will write the log to a file called log.txt which you can view then.

View File

@@ -1,12 +1,14 @@
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'
android {
compileSdkVersion 32
namespace 'app.revanced.integrations'
defaultConfig {
applicationId "revanced.integrationspp"
applicationId "app.revanced.integrations"
minSdkVersion 23
targetSdkVersion 31
targetSdkVersion 32
versionCode 1
versionName "1.0"
multiDexEnabled false
@@ -26,13 +28,13 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}
dependencies {
implementation 'androidx.annotation:annotation:1.3.0'
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
compileOnly 'androidx.annotation:annotation:1.4.0'
compileOnly 'androidx.constraintlayout:constraintlayout:2.1.4'
}

View File

@@ -1,6 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="vanced.integrations">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />

View File

@@ -1,16 +0,0 @@
package app.revanced.integrations;
import android.content.Context;
import android.util.Log;
public class Globals {
public static Context context;
public static Context getAppContext() {
if (context != null) {
return context;
}
Log.e("Globals", "Context is null!");
return null;
}
}

View File

@@ -0,0 +1,44 @@
package app.revanced.integrations.adremover;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Toolbar;
import app.revanced.integrations.patches.HideShortsButtonPatch;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.LogHelper;
public class AdRemoverAPI {
/**
* Removes Reels and Home ads
*
* @param view
*/
//ToDo: refactor this
public static void HideViewWithLayout1dp(View view) {
if (view instanceof LinearLayout) {
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(1, 1);
view.setLayoutParams(layoutParams);
} else if (view instanceof FrameLayout) {
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(1, 1);
view.setLayoutParams(layoutParams2);
} else if (view instanceof RelativeLayout) {
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(1, 1);
view.setLayoutParams(layoutParams3);
} else if (view instanceof Toolbar) {
Toolbar.LayoutParams layoutParams4 = new Toolbar.LayoutParams(1, 1);
view.setLayoutParams(layoutParams4);
} else if (view instanceof ViewGroup) {
ViewGroup.LayoutParams layoutParams5 = new ViewGroup.LayoutParams(1, 1);
view.setLayoutParams(layoutParams5);
} else {
LogHelper.debug(AdRemoverAPI.class, "HideViewWithLayout1dp - Id: " + view.getId() + " Type: " + view.getClass().getName());
}
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class AutoRepeatPatch {
//Used by app.revanced.patches.youtube.layout.autorepeat.patch.AutoRepeatPatch
public static boolean shouldAutoRepeat() {
return SettingsEnum.PREFERRED_AUTO_REPEAT.getBoolean();
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
public class BrandingWaterMarkPatch {
//Used by: app.revanced.patches.youtube.layout.watermark.patch.HideWatermarkPatch
public static boolean isBrandingWatermarkShown() {
return SettingsEnum.BRANDING_SHOWN.getBoolean();
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class DisableAutoCaptions {
//ToDo: Write Patch for it
public static boolean autoCaptionsEnabled() {
return SettingsEnum.AUTO_CAPTIONS_ENABLED.getBoolean();
}
}

View File

@@ -0,0 +1,22 @@
package app.revanced.integrations.patches;
import android.os.Build;
import app.revanced.integrations.settings.SettingsEnum;
public class ForceCodecPatch {
public static String getManufacturer() {
return SettingsEnum.CODEC_OVERRIDE.getBoolean() ? "samsung" : Build.MANUFACTURER;
}
public static String getModel() {
return SettingsEnum.CODEC_OVERRIDE.getBoolean() ? "SM-G920F" : Build.MODEL;
}
public static boolean shouldForceVP9() {
return SettingsEnum.CODEC_OVERRIDE.getBoolean();
}
}

View File

@@ -0,0 +1,151 @@
package app.revanced.integrations.patches;
import android.os.Build;
import androidx.annotation.RequiresApi;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.LogHelper;
public class GeneralBytecodeAdsPatch {
//Used by app.revanced.patches.youtube.ad.general.bytecode.patch.GeneralBytecodeAdsPatch
@RequiresApi(api = Build.VERSION_CODES.N)
public static boolean containsAd(String value, ByteBuffer buffer) {
return containsLithoAd(value, buffer);
}
@RequiresApi(api = Build.VERSION_CODES.N)
private static boolean containsLithoAd(String value, ByteBuffer buffer) {
boolean enabled = false;
for (SettingsEnum setting : SettingsEnum.getAdRemovalSettings()) {
if (setting.getBoolean()) {
enabled = true;
break;
}
}
try {
if (value == null || value.isEmpty() || !enabled) return false;
LogHelper.debug(GeneralBytecodeAdsPatch.class, "Searching for AD: " + value);
List<String> blockList = new ArrayList<>();
List<String> bufferBlockList = new ArrayList<>();
if (SettingsEnum.ADREMOVER_AD_REMOVAL.getBoolean()) {
blockList.add("_ad");
blockList.add("ad_badge");
blockList.add("ads_video_with_context");
blockList.add("cell_divider");
blockList.add("reels_player_overlay");
blockList.add("shelf_header");
blockList.add("text_search_ad_with_description_first");
blockList.add("watch_metadata_app_promo");
bufferBlockList.add("ad_cpn");
}
if (SettingsEnum.ADREMOVER_SUGGESTED_FOR_YOU_REMOVAL.getBoolean()) {
bufferBlockList.add("watch-vrecH");
}
if (SettingsEnum.ADREMOVER_MOVIE_REMOVAL.getBoolean()) {
blockList.add("browsy_bar");
blockList.add("compact_movie");
blockList.add("horizontal_movie_shelf");
blockList.add("movie_and_show_upsell_card");
bufferBlockList.add("YouTube Movies");
}
if (containsAny(value, "home_video_with_context", "related_video_with_context") &&
bufferBlockList.stream().anyMatch(StandardCharsets.UTF_8.decode(buffer).toString()::contains)
) return true;
if (SettingsEnum.ADREMOVER_COMMENTS_REMOVAL.getBoolean()) {
blockList.add("comments_");
}
if (SettingsEnum.ADREMOVER_COMMUNITY_GUIDELINES.getBoolean()) {
blockList.add("community_guidelines");
}
if (SettingsEnum.ADREMOVER_COMPACT_BANNER_REMOVAL.getBoolean()) {
blockList.add("compact_banner");
}
if (SettingsEnum.ADREMOVER_EMERGENCY_BOX_REMOVAL.getBoolean()) {
blockList.add("emergency_onebox");
}
if (SettingsEnum.ADREMOVER_FEED_SURVEY_REMOVAL.getBoolean()) {
blockList.add("in_feed_survey");
}
if (SettingsEnum.ADREMOVER_MEDICAL_PANEL_REMOVAL.getBoolean()) {
blockList.add("medical_panel");
}
if (SettingsEnum.ADREMOVER_PAID_CONTECT_REMOVAL.getBoolean()) {
blockList.add("paid_content_overlay");
}
if (SettingsEnum.ADREMOVER_COMMUNITY_POSTS_REMOVAL.getBoolean()) {
blockList.add("post_base_wrapper");
}
if (SettingsEnum.ADREMOVER_MERCHANDISE_REMOVAL.getBoolean()) {
blockList.add("product_carousel");
}
if (SettingsEnum.ADREMOVER_SHORTS_SHELF.getBoolean()) {
blockList.add("shorts_shelf");
}
if (SettingsEnum.ADREMOVER_INFO_PANEL_REMOVAL.getBoolean()) {
blockList.add("publisher_transparency_panel");
blockList.add("single_item_information_panel");
}
if (SettingsEnum.ADREMOVER_HIDE_SUGGESTIONS.getBoolean()) {
blockList.add("horizontal_video_shelf");
}
if (SettingsEnum.ADREMOVER_HIDE_LATEST_POSTS.getBoolean()) {
blockList.add("post_shelf");
}
if (containsAny(value,
"home_video_with_context",
"related_video_with_context",
"search_video_with_context",
"menu",
"root",
"-count",
"-space",
"-button"
)) return false;
if (blockList.stream().anyMatch(value::contains)) {
LogHelper.debug(GeneralBytecodeAdsPatch.class, "Blocking ad: " + value);
return true;
}
if (SettingsEnum.DEBUG.getBoolean()) {
if (value.contains("related_video_with_context")) {
LogHelper.debug(GeneralBytecodeAdsPatch.class, value + " | " + bytesToHex(buffer.array()));
return false;
}
LogHelper.debug(GeneralBytecodeAdsPatch.class, value + " returns false.");
}
return false;
} catch (Exception ex) {
LogHelper.printException(GeneralBytecodeAdsPatch.class, ex.getMessage(), ex);
return false;
}
}
private static boolean containsAny(String value, String... targets) {
for (String string : targets)
if (value.contains(string)) return true;
return false;
}
private static String bytesToHex(byte[] bytes) {
StringBuilder builder = new StringBuilder(bytes.length * 2);
for (byte b : bytes)
builder.append(String.format("%02x", b));
return builder.toString();
}
}

View File

@@ -0,0 +1,41 @@
package app.revanced.integrations.patches;
import android.view.WindowManager;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.swipecontrols.views.SwipeControlsHostLayout;
/**
* Patch class for 'hdr-max-brightness' patch
*
* @usedBy app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch
* @smali app/revanced/integrations/patches/HDRMaxBrightnessPatch
*/
public class HDRMaxBrightnessPatch {
/**
* get brightness override for HDR brightness
*
* @param original brightness youtube would normally set
* @return brightness to set on HRD video
* @smali getHDRBrightness(F)F
*/
public static float getHDRBrightness(float original) {
// do nothing if disabled
if (!SettingsEnum.USE_HDR_AUTO_BRIGHTNESS.getBoolean()) {
return original;
}
// override with brightness set by swipe-controls
// only when swipe-controls is active and has overridden the brightness
final SwipeControlsHostLayout swipeControlsHost = SwipeControlsPatch.CURRENT_HOST.get();
if (swipeControlsHost != null
&& swipeControlsHost.getScreen() != null
&& swipeControlsHost.getConfig().getEnableBrightnessControl()
&& !swipeControlsHost.getScreen().isDefaultBrightness()) {
return swipeControlsHost.getScreen().getRawScreenBrightness();
}
// otherwise, set the brightness to auto
return WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE;
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.settings.SettingsEnum;
public class HideCastButtonPatch {
//Used by app.revanced.patches.youtube.layout.castbutton.patch.HideCastButonPatch
public static int getCastButtonOverrideV2(int original) {
return SettingsEnum.CAST_BUTTON_SHOWN.getBoolean() ? original : View.GONE;
}
}

View File

@@ -0,0 +1,18 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.LogHelper;
public class HideCreateButtonPatch {
//Used by app.revanced.patches.youtube.layout.createbutton.patch.CreateButtonRemoverPatch
public static void hideCreateButton(View view) {
boolean show = SettingsEnum.CREATE_BUTTON_SHOWN.getBoolean();
String message = show ? "Create button: Shown" : "Create button: Hidden";
LogHelper.debug(HideCreateButtonPatch.class, message);
view.setVisibility(show ? View.VISIBLE : View.GONE);
}
}

View File

@@ -0,0 +1,20 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
public class HideHomeAdsPatch {
/**
* Used by package app.revanced.extensions.Extensions
* @param view
*/
public static void HideHomeAds(View view) {
if (!SettingsEnum.HOME_ADS_SHOWN.getBoolean()) {
AdRemoverAPI.HideViewWithLayout1dp(view);
}
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.settings.SettingsEnum;
public class HideInfoCardSuggestionsPatch {
public static int hideInfoCardSuggestions() {
return SettingsEnum.INFO_CARDS_SHOWN.getBoolean() ? View.VISIBLE : View.GONE;
}
}

View File

@@ -0,0 +1,20 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
public class HideReelsPatch {
/**
* Used by app.revanced.patches.youtube.layout.reels.patch.HideReelsPatch
*
* @param view
*/
public static void HideReel(View view) {
if (!SettingsEnum.REEL_BUTTON_SHOWN.getBoolean()) {
AdRemoverAPI.HideViewWithLayout1dp(view);
}
}
}

View File

@@ -0,0 +1,26 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.LogHelper;
public class HideShortsButtonPatch {
//Used by app.revanced.patches.youtube.layout.shorts.button.patch.ShortsButtonRemoverPatch
public static void hideShortsButton(View view) {
if (lastPivotTab != null && lastPivotTab.name() == "TAB_SHORTS") {
boolean show = SettingsEnum.SHORTS_BUTTON_SHOWN.getBoolean();
String message = show ? "Shorts button: shown" : "Shorts button: hidden";
LogHelper.debug(HideShortsButtonPatch.class, message);
if (!show) {
view.setVisibility(show ? View.VISIBLE : View.GONE);
}
}
}
//Needed for the ShortsButtonRemoverPatch
public static Enum lastPivotTab;
}

View File

@@ -0,0 +1,14 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class MiniplayerOverridePatch {
//ToDo: Write Patch for it.
//See https://drive.google.com/file/d/1G7jn2EdWgNls0Htgs-wPPjjObZL1emzK/view?usp=sharing
//And https://drive.google.com/file/d/1-QlgSiKzqQ5lHXQnvRUpijk0GH9T1Sn7/view?usp=sharing
// for where it needs to be used.
public static boolean getTabletMiniplayerOverride() {
return SettingsEnum.USE_TABLET_MINIPLAYER.getBoolean();
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class NewActionbarPatch {
//Used by app.revanced.patches.youtube.layout.widesearchbar.patch.WideSearchbarPatch
public static boolean getNewActionBar() {
return SettingsEnum.USE_NEW_ACTIONBAR.getBoolean();
}
}

View File

@@ -0,0 +1,11 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class OldStyleQualityPatch {
//Used by app.revanced.patches.youtube.layout.oldqualitylayout.patch.OldQualityLayoutPatch
public static boolean useOldStyleQualitySettings() {
return SettingsEnum.OLD_STYLE_QUALITY_SETTINGS.getBoolean();
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class OverrideCodecPatch {
//ToDo: Write Patch for it.
//See https://drive.google.com/file/d/14d2R-5JF97gOZggoobVEVazPWbORbZVp/view?usp=sharing for where it needs to be used.
public static boolean isOverrideCodedUsed() {
return SettingsEnum.CODEC_OVERRIDE.getBoolean();
}
}

View File

@@ -0,0 +1,29 @@
package app.revanced.integrations.patches;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.PlayerOverlays;
/**
* Hook receiver class for 'player-overlays-hook' patch
*
* @usedBy app.revanced.patches.youtube.misc.playeroverlay.patch.PlayerOverlaysHookPatch
* @smali Lapp/revanced/integrations/patches/PlayerOverlaysHookPatch;
*/
@SuppressWarnings("unused")
public class PlayerOverlaysHookPatch {
/**
* Hook into YouTubePlayerOverlaysLayout.onFinishInflate() method
*
* @param thisRef reference to the view
* @smali YouTubePlayerOverlaysLayout_onFinishInflateHook(Ljava / lang / Object ;)V
*/
public static void YouTubePlayerOverlaysLayout_onFinishInflateHook(@Nullable Object thisRef) {
if (thisRef == null) return;
if (thisRef instanceof ViewGroup) {
PlayerOverlays.attach((ViewGroup) thisRef);
}
}
}

View File

@@ -0,0 +1,32 @@
package app.revanced.integrations.patches;
import androidx.annotation.Nullable;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.shared.PlayerType;
/**
* Hook receiver class for 'player-type-hook' patch
*
* @usedBy app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
* @smali Lapp/revanced/integrations/patches/PlayerTypeHookPatch;
*/
@SuppressWarnings("unused")
public class PlayerTypeHookPatch {
/**
* Hook into YouTubePlayerOverlaysLayout.updatePlayerLayout() method
*
* @param type the new player type
* @smali YouTubePlayerOverlaysLayout_updatePlayerTypeHookEX(Ljava/lang/Object;)V
*/
public static void YouTubePlayerOverlaysLayout_updatePlayerTypeHookEX(@Nullable Object type) {
if (type == null) return;
// update current player type
final PlayerType newType = PlayerType.safeParseFromString(type.toString());
if (newType != null) {
PlayerType.setCurrent(newType);
LogHelper.debug(PlayerTypeHookPatch.class, "YouTubePlayerOverlaysLayout player type was updated to " + newType);
}
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class SeekbarTappingPatch {
//Used by app.revanced.patches.youtube.interaction.seekbar.patch.EnableSeekbarTappingPatch
public static boolean isTapSeekingEnabled() {
return SettingsEnum.TAP_SEEKING_ENABLED.getBoolean();
}
}

View File

@@ -0,0 +1,42 @@
package app.revanced.integrations.patches;
import android.app.Activity;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.ref.WeakReference;
import app.revanced.integrations.swipecontrols.views.SwipeControlsHostLayout;
/**
* Hook receiver class for 'swipe-controls' patch
*
* @usedBy app.revanced.patches.youtube.interaction.swipecontrols.patch.SwipeControlsPatch
* @smali Lapp/revanced/integrations/patches/SwipeControlsPatch;
*/
@SuppressWarnings("unused")
public class SwipeControlsPatch {
/**
* the currently active swipe controls host.
* the reference may be null!
*/
@NonNull
public static WeakReference<SwipeControlsHostLayout> CURRENT_HOST = new WeakReference<>(null);
/**
* Hook into the main activity lifecycle
* (using onStart here, but really anything up until onResume should be fine)
*
* @param thisRef reference to the WatchWhileActivity instance
* @smali WatchWhileActivity_onStartHookEX(Ljava / lang / Object ;)V
*/
public static void WatchWhileActivity_onStartHookEX(@Nullable Object thisRef) {
if (thisRef == null) return;
if (thisRef instanceof Activity) {
SwipeControlsHostLayout swipeControlsHost = SwipeControlsHostLayout.attachTo((Activity) thisRef, false);
CURRENT_HOST = new WeakReference<>(swipeControlsHost);
}
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.whitelist.Whitelist;
public class VideoAdsPatch {
//Used by app.revanced.patches.youtube.ad.general.video.patch.VideoAdsPatch
//depends on Whitelist Patch. Still needs to be written
public static boolean shouldShowAds() {
return SettingsEnum.VIDEO_ADS_SHOWN.getBoolean() && Whitelist.shouldShowAds();
}
}

View File

@@ -0,0 +1,26 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class VideoBufferPatch {
public static int getMaxBuffer() {
int confVal = SettingsEnum.MAX_BUFFER.getInt();
if (confVal < 1) confVal = 1;
return confVal;
}
public static int getPlaybackBuffer() {
int confVal = SettingsEnum.PLAYBACK_MAX_BUFFER.getInt();
if (confVal < 1) confVal = 1;
return confVal;
}
public static int getReBuffer() {
int confVal = SettingsEnum.MAX_PLAYBACK_BUFFER_AFTER_REBUFFER.getInt();
if (confVal < 1) confVal = 1;
return confVal;
}
}

Some files were not shown because too many files have changed in this diff Show More