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

Compare commits

...

141 Commits

Author SHA1 Message Date
semantic-release-bot
f92498d47b chore(release): 0.94.0-dev.8 [skip ci]
# [0.94.0-dev.8](https://github.com/revanced/revanced-integrations/compare/v0.94.0-dev.7...v0.94.0-dev.8) (2023-01-28)

### Bug Fixes

* **youtube:** resolve duplicate preference keys ([#307](https://github.com/revanced/revanced-integrations/issues/307)) ([923e4b9](923e4b99e6))
2023-01-28 16:22:44 +00:00
LisoUseInAIKyrios
923e4b99e6 fix(youtube): resolve duplicate preference keys (#307) 2023-01-28 17:20:57 +01:00
semantic-release-bot
9af105dd03 chore(release): 0.94.0-dev.7 [skip ci]
# [0.94.0-dev.7](https://github.com/revanced/revanced-integrations/compare/v0.94.0-dev.6...v0.94.0-dev.7) (2023-01-28)

### Bug Fixes

* **youtube/sponsorblock:** fix saving and loading settings ([#304](https://github.com/revanced/revanced-integrations/issues/304)) ([d12d747](d12d74747a))
2023-01-28 08:09:42 +00:00
LisoUseInAIKyrios
d12d74747a fix(youtube/sponsorblock): fix saving and loading settings (#304) 2023-01-28 09:07:00 +01:00
semantic-release-bot
42346ee3cf chore(release): 0.94.0-dev.6 [skip ci]
# [0.94.0-dev.6](https://github.com/revanced/revanced-integrations/compare/v0.94.0-dev.5...v0.94.0-dev.6) (2023-01-28)

### Features

* **youtube:** show toasts along exceptions ([#293](https://github.com/revanced/revanced-integrations/issues/293)) ([dbf1f3f](dbf1f3f0ce))
2023-01-28 07:40:30 +00:00
LisoUseInAIKyrios
dbf1f3f0ce feat(youtube): show toasts along exceptions (#293)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-28 08:38:31 +01:00
semantic-release-bot
a70e80dfa0 chore(release): 0.94.0-dev.5 [skip ci]
# [0.94.0-dev.5](https://github.com/revanced/revanced-integrations/compare/v0.94.0-dev.4...v0.94.0-dev.5) (2023-01-28)

### Bug Fixes

* **youtube/return-youtube-dislike:** do not fetch voting stats when watching shorts ([#302](https://github.com/revanced/revanced-integrations/issues/302)) ([7551f01](7551f0104c))
2023-01-28 07:31:27 +00:00
LisoUseInAIKyrios
7551f0104c fix(youtube/return-youtube-dislike): do not fetch voting stats when watching shorts (#302)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-28 08:28:42 +01:00
semantic-release-bot
d8bd27251c chore(release): 0.94.0-dev.4 [skip ci]
# [0.94.0-dev.4](https://github.com/revanced/revanced-integrations/compare/v0.94.0-dev.3...v0.94.0-dev.4) (2023-01-28)

### Features

* **youtube/general-ads:** remove hiding video shelf ([04147c1](04147c17c9))
2023-01-28 07:08:41 +00:00
oSumAtrIX
04147c17c9 feat(youtube/general-ads): remove hiding video shelf
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-28 06:00:34 +01:00
semantic-release-bot
32dc8a846c chore(release): 0.94.0-dev.3 [skip ci]
# [0.94.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.94.0-dev.2...v0.94.0-dev.3) (2023-01-22)

### Bug Fixes

* **youtube/return-youtube-dislike:** gracefully exit if Vanced MicroG is missing or not running ([#303](https://github.com/revanced/revanced-integrations/issues/303)) ([03764bc](03764bcc65))
2023-01-22 19:23:44 +00:00
LisoUseInAIKyrios
03764bcc65 fix(youtube/return-youtube-dislike): gracefully exit if Vanced MicroG is missing or not running (#303)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-22 20:22:02 +01:00
semantic-release-bot
0127e7251c chore(release): 0.94.0-dev.2 [skip ci]
# [0.94.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.94.0-dev.1...v0.94.0-dev.2) (2023-01-22)

### Features

* **youtube/microg-support:** check if Vanced MicroG is running in the background ([#301](https://github.com/revanced/revanced-integrations/issues/301)) ([6e31b78](6e31b7889a))
2023-01-22 16:21:15 +00:00
reis
6e31b7889a feat(youtube/microg-support): check if Vanced MicroG is running in the background (#301)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-22 17:18:55 +01:00
semantic-release-bot
057e599aec chore(release): 0.94.0-dev.1 [skip ci]
# [0.94.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.93.2-dev.1...v0.94.0-dev.1) (2023-01-22)

### Features

* **youtube:** `open-links-externally` patch ([4cbe833](4cbe8338b3))
2023-01-22 14:51:44 +00:00
Rizwan
4cbe8338b3 feat(youtube): open-links-externally patch 2023-01-22 15:49:14 +01:00
semantic-release-bot
d65a107c53 chore(release): 0.93.2-dev.1 [skip ci]
## [0.93.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.93.1...v0.93.2-dev.1) (2023-01-21)

### Bug Fixes

* **youtube:** save new instead of default value ([#298](https://github.com/revanced/revanced-integrations/issues/298)) ([559bbf9](559bbf9778))
2023-01-21 22:20:12 +00:00
LisoUseInAIKyrios
559bbf9778 fix(youtube): save new instead of default value (#298) 2023-01-21 23:17:50 +01:00
semantic-release-bot
737246636b chore(release): 0.93.1 [skip ci]
## [0.93.1](https://github.com/revanced/revanced-integrations/compare/v0.93.0...v0.93.1) (2023-01-17)

### Bug Fixes

* **youtube/microg-support:** open download link if Vanced MicroG is missing ([#290](https://github.com/revanced/revanced-integrations/issues/290)) ([0af87e2](0af87e2908))
2023-01-17 23:40:49 +00:00
oSumAtrIX
c2d121f32b chore: merge branch dev to main (#291) 2023-01-18 00:38:50 +01:00
reis
0af87e2908 fix(youtube/microg-support): open download link if Vanced MicroG is missing (#290) 2023-01-16 23:42:37 +01:00
semantic-release-bot
6960b0bda5 chore(release): 0.93.0 [skip ci]
# [0.93.0](https://github.com/revanced/revanced-integrations/compare/v0.92.2...v0.93.0) (2023-01-14)

### Features

* `remove-screenshot-restriction` patch ([#285](https://github.com/revanced/revanced-integrations/issues/285)) ([c3eff91](c3eff913dd))
* **youtube/return-youtube-dislike:** better matching color for separators ([#281](https://github.com/revanced/revanced-integrations/issues/281)) ([2a16da1](2a16da15d9))
* **youtube/return-youtube-dislike:** style for minimum width ([#284](https://github.com/revanced/revanced-integrations/issues/284)) ([a80fab7](a80fab7070))
* **youtube:** `spoof-app-version` patch ([#282](https://github.com/revanced/revanced-integrations/issues/282)) ([fd818a3](fd818a35f5))
2023-01-14 02:26:52 +00:00
oSumAtrIX
5b9a0d3d23 chore: merge branch dev to main (#289) 2023-01-14 03:24:56 +01:00
oSumAtrIX
9480f20d44 ci: fix spelling mistake 2023-01-14 03:20:37 +01:00
oSumAtrIX
557c311825 chore: merge branch dev to main (#288) 2023-01-14 03:16:53 +01:00
oSumAtrIX
62eb76415c ci: fix spelling mistake 2023-01-14 03:15:59 +01:00
oSumAtrIX
5d2cc2ca5d chore: merge branch dev to main (#287) 2023-01-13 22:35:04 +01:00
oSumAtrIX
09afccce27 ci: use PAT in step Release
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-13 22:32:40 +01:00
oSumAtrIX
f393d3790a ci: only fetch latest commit when checking out
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-13 22:32:14 +01:00
oSumAtrIX
d33c69f8c2 chore: merge branch dev to main (#283) 2023-01-13 16:03:26 +01:00
oSumAtrIX
b56f472813 ci: give jobs names
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-13 14:40:44 +01:00
semantic-release-bot
803130a693 chore(release): 0.93.0-dev.1 [skip ci]
# [0.93.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.92.2...v0.93.0-dev.1) (2023-01-10)

### Features

* `remove-screenshot-restriction` patch ([#285](https://github.com/revanced/revanced-integrations/issues/285)) ([c3eff91](c3eff913dd))
* **youtube/return-youtube-dislike:** better matching color for separators ([#281](https://github.com/revanced/revanced-integrations/issues/281)) ([2a16da1](2a16da15d9))
* **youtube/return-youtube-dislike:** style for minimum width ([#284](https://github.com/revanced/revanced-integrations/issues/284)) ([a80fab7](a80fab7070))
* **youtube:** `spoof-app-version` patch ([#282](https://github.com/revanced/revanced-integrations/issues/282)) ([fd818a3](fd818a35f5))
2023-01-10 21:45:18 +00:00
oSumAtrIX
8032a3f46a ci: bypass push permission on protected branches with owner PAT
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-10 22:43:30 +01:00
oSumAtrIX
d72937c2fd ci: downgrade semantic release and plugins to v19
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-10 22:43:30 +01:00
LisoUseInAIKyrios
fd818a35f5 feat(youtube): spoof-app-version patch (#282)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-10 19:27:43 +01:00
LisoUseInAIKyrios
a80fab7070 feat(youtube/return-youtube-dislike): style for minimum width (#284) 2023-01-10 19:01:21 +01:00
Linus
c3eff913dd feat: remove-screenshot-restriction patch (#285)
Co-authored-by: Linus789 <Linus789@users.noreply.github.com>
2023-01-08 22:24:31 +01:00
LisoUseInAIKyrios
2a16da15d9 feat(youtube/return-youtube-dislike): better matching color for separators (#281) 2023-01-08 07:31:07 +01:00
semantic-release-bot
d076fe0dce chore(release): 0.92.2 [skip ci]
## [0.92.2](https://github.com/revanced/revanced-integrations/compare/v0.92.1...v0.92.2) (2023-01-07)

### Bug Fixes

* load numeric preferences as type String ([212d3a7](212d3a72d8))
2023-01-07 13:43:20 +00:00
oSumAtrIX
e833d16bb8 chore: merge branch dev to main (#280) 2023-01-07 14:41:14 +01:00
semantic-release-bot
bcd93db9b8 chore(release): 0.92.2-dev.1 [skip ci]
## [0.92.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.92.1...v0.92.2-dev.1) (2023-01-07)

### Bug Fixes

* load numeric preferences as type String ([212d3a7](212d3a72d8))
2023-01-07 13:39:49 +00:00
oSumAtrIX
212d3a72d8 fix: load numeric preferences as type String
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-07 14:19:00 +01:00
semantic-release-bot
758b645913 chore(release): 0.92.1 [skip ci]
## [0.92.1](https://github.com/revanced/revanced-integrations/compare/v0.92.0...v0.92.1) (2023-01-07)

### Bug Fixes

* save preferences with correct type ([56c1a3c](56c1a3c03c))

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-07 13:29:21 +01:00
oSumAtrIX
e9fd05f4c6 chore: merge branch dev to main 2023-01-07 11:37:53 +01:00
semantic-release-bot
31df68d2c3 chore(release): 0.92.1-dev.1 [skip ci]
## [0.92.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.92.0...v0.92.1-dev.1) (2023-01-07)

### Bug Fixes

* save preferences with correct type ([56c1a3c](56c1a3c03c))
2023-01-07 10:32:17 +00:00
oSumAtrIX
56c1a3c03c fix: save preferences with correct type
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-07 11:30:21 +01:00
oSumAtrIX
915b8d371a refactor: early return in saveValue
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-07 11:30:21 +01:00
semantic-release-bot
eea37a9bad chore(release): 0.92.0 [skip ci]
# [0.92.0](https://github.com/revanced/revanced-integrations/compare/v0.91.2...v0.92.0) (2023-01-07)

### Bug Fixes

* ensure thread safety for class `StringRef` ([#273](https://github.com/revanced/revanced-integrations/issues/273)) ([f5c5fcb](f5c5fcb5e4))

### Features

* **youtube:** `remember-playback-rate` patch ([b5c0c84](b5c0c843a5))
2023-01-07 08:49:14 +00:00
oSumAtrIX
05cca001ac chore: merge branch dev to main (#275) 2023-01-07 09:47:28 +01:00
semantic-release-bot
a45a354d19 chore(release): 0.92.0-dev.1 [skip ci]
# [0.92.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.91.3-dev.1...v0.92.0-dev.1) (2023-01-07)

### Features

* **youtube:** `remember-playback-rate` patch ([b5c0c84](b5c0c843a5))
2023-01-07 08:45:53 +00:00
oSumAtrIX
070e1666b7 chore: bump dependency versions
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-07 09:39:49 +01:00
oSumAtrIX
b5c0c843a5 feat(youtube): remember-playback-rate patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-07 09:39:26 +01:00
oSumAtrIX
2e74fc55eb refactor: simplify SharedPrefHelper class
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-07 09:38:55 +01:00
semantic-release-bot
114a1c4004 chore(release): 0.91.3-dev.1 [skip ci]
## [0.91.3-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.91.2...v0.91.3-dev.1) (2023-01-05)

### Bug Fixes

* ensure thread safety for class `StringRef` ([#273](https://github.com/revanced/revanced-integrations/issues/273)) ([f5c5fcb](f5c5fcb5e4))
2023-01-05 21:23:31 +00:00
LisoUseInAIKyrios
f5c5fcb5e4 fix: ensure thread safety for class StringRef (#273) 2023-01-05 22:21:41 +01:00
8cAyqpVKio
954e60191e build: bump version before executing build task (#274) 2023-01-05 22:18:24 +01:00
semantic-release-bot
499a4deab3 chore(release): 0.91.2 [skip ci]
## [0.91.2](https://github.com/revanced/revanced-integrations/compare/v0.91.1...v0.91.2) (2023-01-04)

### Bug Fixes

* **youtube/return-youtube-dislike:** use manufacturer specific span styles ([#265](https://github.com/revanced/revanced-integrations/issues/265)) ([8f8e8ea](8f8e8ea87e))
2023-01-04 16:55:33 +00:00
oSumAtrIX
01f79a3398 chore: merge branch dev to main (#272) 2023-01-04 17:51:10 +01:00
LisoUseInAIKyrios
8f8e8ea87e fix(youtube/return-youtube-dislike): use manufacturer specific span styles (#265)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-04 17:49:42 +01:00
hyunsu15
0fc94e2305 refactor: use existing method ReVancedUtils.getIdentifier (#271) 2023-01-04 16:32:18 +01:00
semantic-release-bot
25604cec0a chore(release): 0.91.1 [skip ci]
## [0.91.1](https://github.com/revanced/revanced-integrations/compare/v0.91.0...v0.91.1) (2023-01-02)

### Bug Fixes

* revert removing workaround task `publish` ([64c31b8](64c31b84e7))
* **twitch/block-embedded-ads:** rewrite Kotlin classes to Java ([#270](https://github.com/revanced/revanced-integrations/issues/270)) ([843dd9d](843dd9de9e))
2023-01-02 08:05:21 +00:00
oSumAtrIX
dd11c6e062 chore: merge branch dev to main (#269) 2023-01-02 09:01:28 +01:00
oSumAtrIX
64c31b84e7 fix: revert removing workaround task publish
This reverts commit 89f866d739.
2023-01-02 08:57:11 +01:00
oSumAtrIX
843dd9de9e fix(twitch/block-embedded-ads): rewrite Kotlin classes to Java (#270)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 08:55:19 +01:00
oSumAtrIX
bc635a79c5 build: name output files & minor refactor 2023-01-02 02:58:20 +01:00
oSumAtrIX
4c18633c36 build: name output files
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 02:51:34 +01:00
oSumAtrIX
4a3d20e1f0 chore: set versionName
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 02:50:05 +01:00
oSumAtrIX
8de014583e chore: bump build tools version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 02:49:43 +01:00
oSumAtrIX
993aadd4df chore: update sdk versions
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 02:49:09 +01:00
oSumAtrIX
89f866d739 refactor: remove workaround task publish
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 02:48:51 +01:00
oSumAtrIX
6fd81770bf chore: rename root project name
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 02:48:13 +01:00
semantic-release-bot
a600239bbf chore(release): 0.91.0 [skip ci]
# [0.91.0](https://github.com/revanced/revanced-integrations/compare/v0.90.0...v0.91.0) (2022-12-31)

### Bug Fixes

* **youtube/general-ads:** restore swipe back to exit gesture ([#264](https://github.com/revanced/revanced-integrations/issues/264)) ([76c36da](76c36daee0))

### Features

* **youtube:** `copy-video-url` patch ([#263](https://github.com/revanced/revanced-integrations/issues/263)) ([e856d9d](e856d9dccd))
2022-12-31 20:24:14 +00:00
oSumAtrIX
cb560ff097 chore: merge branch dev to main (#266) 2022-12-31 21:20:20 +01:00
oSumAtrIX
a9f55d7512 build: do not comment on successful releases 2022-12-31 21:16:28 +01:00
semantic-release-bot
fcc5337d76 chore(release): 0.91.0-dev.2 [skip ci]
# [0.91.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.91.0-dev.1...v0.91.0-dev.2) (2022-12-31)

### Bug Fixes

* **youtube/general-ads:** restore swipe back to exit gesture ([#264](https://github.com/revanced/revanced-integrations/issues/264)) ([76c36da](76c36daee0))
2022-12-31 18:20:43 +00:00
0xrxL
76c36daee0 fix(youtube/general-ads): restore swipe back to exit gesture (#264)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-31 19:16:52 +01:00
semantic-release-bot
f6335267f2 chore(release): 0.91.0-dev.1 [skip ci]
# [0.91.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.90.0...v0.91.0-dev.1) (2022-12-31)

### Features

* **youtube:** `copy-video-url` patch ([#263](https://github.com/revanced/revanced-integrations/issues/263)) ([e856d9d](e856d9dccd))
2022-12-31 17:51:33 +00:00
aliernfrog
e856d9dccd feat(youtube): copy-video-url patch (#263)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-31 18:47:57 +01:00
semantic-release-bot
1f74ccf800 chore(release): 0.90.0 [skip ci]
# [0.90.0](https://github.com/revanced/revanced-integrations/compare/v0.89.0...v0.90.0) (2022-12-31)

### Features

* **youtube/return-youtube-dislike:** better formatting and LTR support ([#252](https://github.com/revanced/revanced-integrations/issues/252)) ([b839600](b839600728))

### Performance Improvements

* **youtube/general-ads-patch:** reduce list of ignored component names ([#261](https://github.com/revanced/revanced-integrations/issues/261)) ([8d233a2](8d233a2f82))
2022-12-31 06:45:39 +00:00
oSumAtrIX
240c3888cb chore: merge branch dev to main (#262) 2022-12-31 07:40:55 +01:00
LisoUseInAIKyrios
b839600728 feat(youtube/return-youtube-dislike): better formatting and LTR support (#252)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-31 07:38:47 +01:00
semantic-release-bot
a26975611e chore(release): 0.89.1-dev.1 [skip ci]
## [0.89.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.89.0...v0.89.1-dev.1) (2022-12-30)

### Performance Improvements

* **youtube/general-ads-patch:** reduce list of ignored component names ([#261](https://github.com/revanced/revanced-integrations/issues/261)) ([8d233a2](8d233a2f82))
2022-12-30 17:48:01 +00:00
0xrxL
8d233a2f82 perf(youtube/general-ads-patch): reduce list of ignored component names (#261) 2022-12-30 18:44:36 +01:00
semantic-release-bot
115af48d86 chore(release): 0.89.0 [skip ci]
# [0.89.0](https://github.com/revanced/revanced-integrations/compare/v0.88.0...v0.89.0) (2022-12-30)

### Features

* **youtube/general-ads-patch:** hide channel member shelf ([#257](https://github.com/revanced/revanced-integrations/issues/257)) ([87799e5](87799e5c55))
2022-12-30 04:24:53 +00:00
oSumAtrIX
c9bd832ee5 chore: merge branch dev to main (#260) 2022-12-30 05:20:56 +01:00
semantic-release-bot
35fb757258 chore(release): 0.89.0-dev.1 [skip ci]
# [0.89.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.88.0...v0.89.0-dev.1) (2022-12-30)

### Features

* **youtube/general-ads-patch:** hide channel member shelf ([#257](https://github.com/revanced/revanced-integrations/issues/257)) ([87799e5](87799e5c55))
2022-12-30 04:19:48 +00:00
0xrxL
87799e5c55 feat(youtube/general-ads-patch): hide channel member shelf (#257)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-30 05:16:18 +01:00
oSumAtrIX
311524c2c9 ci: do not escape in environment variable MESSAGE
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-29 19:16:29 +01:00
semantic-release-bot
b9fa8d6c09 chore(release): 0.88.0 [skip ci]
# [0.88.0](https://github.com/revanced/revanced-integrations/compare/v0.87.0...v0.88.0) (2022-12-29)

### Features

* **youtube:** `hide-breaking-news-shelf` patch ([#258](https://github.com/revanced/revanced-integrations/issues/258)) ([eec90ee](eec90ee04c))
2022-12-29 16:56:13 +00:00
oSumAtrIX
f122598e08 chore: merge branch dev to main (#259) 2022-12-29 17:52:15 +01:00
semantic-release-bot
12ee45bb68 chore(release): 0.88.0-dev.1 [skip ci]
# [0.88.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.87.0...v0.88.0-dev.1) (2022-12-29)

### Features

* **youtube:** `hide-breaking-news-shelf` patch ([#258](https://github.com/revanced/revanced-integrations/issues/258)) ([eec90ee](eec90ee04c))
2022-12-29 16:52:01 +00:00
0xrxL
eec90ee04c feat(youtube): hide-breaking-news-shelf patch (#258)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-29 17:48:18 +01:00
oSumAtrIX
0682c4c671 chore: merge branch dev to main (#253) 2022-12-26 19:33:43 +01:00
oSumAtrIX
59031d95ea ci: back-merge releases back into dev branch 2022-12-26 19:21:23 +01:00
oSumAtrIX
38e3906240 ci: do not release on build commit type 2022-12-26 19:19:29 +01:00
oSumAtrIX
5ed6a57df2 ci: open pull requests to merge dev to main 2022-12-26 19:10:57 +01:00
semantic-release-bot
33b99f0061 chore(release): 0.87.0 [skip ci]
# [0.87.0](https://github.com/revanced/revanced-integrations/compare/v0.86.1...v0.87.0) (2022-12-26)

### Features

* **youtube/general-ads-patch:** hide guidelines for subscriber ([#249](https://github.com/revanced/revanced-integrations/issues/249)) ([f4e8afe](f4e8afe7ba))
2022-12-26 17:32:27 +00:00
0xrxL
f4e8afe7ba feat(youtube/general-ads-patch): hide guidelines for subscriber (#249) 2022-12-26 18:27:37 +01:00
semantic-release-bot
878ac2a9fa chore(release): 0.86.1 [skip ci]
## [0.86.1](https://github.com/revanced/revanced-integrations/compare/v0.86.0...v0.86.1) (2022-12-24)

### Bug Fixes

* **youtube/theme:** correct background color for the shorts comment box ([#239](https://github.com/revanced/revanced-integrations/issues/239)) ([9ab8a64](9ab8a646ed))
2022-12-24 22:45:57 +00:00
hyunsu15
b663880741 refactor: apply return oriented programming convention (#248)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-22 21:14:41 +01:00
0xrxL
9ab8a646ed fix(youtube/theme): correct background color for the shorts comment box (#239)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-22 07:39:41 +01:00
semantic-release-bot
2002bf8063 chore(release): 0.86.0 [skip ci]
# [0.86.0](https://github.com/revanced/revanced-integrations/compare/v0.85.1...v0.86.0) (2022-12-21)

### Features

* **youtube/return-youtube-dislike:** debug connection statistics, toast on error, high priority background threads ([#236](https://github.com/revanced/revanced-integrations/issues/236)) ([693ef08](693ef08c6c))
2022-12-21 21:23:12 +00:00
LisoUseInAIKyrios
693ef08c6c feat(youtube/return-youtube-dislike): debug connection statistics, toast on error, high priority background threads (#236)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-21 22:19:34 +01:00
semantic-release-bot
84377b2da4 chore(release): 0.85.1 [skip ci]
## [0.85.1](https://github.com/revanced/revanced-integrations/compare/v0.85.0...v0.85.1) (2022-12-21)

### Bug Fixes

* revert semantically incorrect simplification of ˋAdRemoverAPI.HideViewWithLayout1dpˋ ([#244](https://github.com/revanced/revanced-integrations/issues/244)) ([71e81a6](71e81a6473))
2022-12-21 13:40:29 +00:00
oSumAtrIX
71e81a6473 fix: revert semantically incorrect simplification of ˋAdRemoverAPI.HideViewWithLayout1dpˋ (#244) 2022-12-21 14:37:05 +01:00
semantic-release-bot
5839f6ca4a chore(release): 0.85.0 [skip ci]
# [0.85.0](https://github.com/revanced/revanced-integrations/compare/v0.84.2...v0.85.0) (2022-12-21)

### Features

* **youtube/general-ads:** hide grid of shorts ([d125d20](d125d20974))
2022-12-21 06:31:04 +00:00
oSumAtrIX
d125d20974 feat(youtube/general-ads): hide grid of shorts 2022-12-21 07:26:49 +01:00
semantic-release-bot
5dd68e23f8 chore(release): 0.84.2 [skip ci]
## [0.84.2](https://github.com/revanced/revanced-integrations/compare/v0.84.1...v0.84.2) (2022-12-20)

### Bug Fixes

* migrate old to new settings correctly ([#241](https://github.com/revanced/revanced-integrations/issues/241)) ([98ce2df](98ce2df47d))
2022-12-20 08:22:39 +00:00
LisoUseInAIKyrios
98ce2df47d fix: migrate old to new settings correctly (#241) 2022-12-20 09:19:13 +01:00
0xrxL
0a6022c258 refactor(youtube/general-ads-patch): ignore comment components #238) 2022-12-19 16:01:21 +01:00
hyunsu15
a550d16c3f refactor : simplify AdRemoverAPI.HideViewWithLayout1dp (#240) 2022-12-19 15:05:33 +01:00
semantic-release-bot
04a89af1c9 chore(release): 0.84.1 [skip ci]
## [0.84.1](https://github.com/revanced/revanced-integrations/compare/v0.84.0...v0.84.1) (2022-12-18)

### Performance Improvements

* **youtube/general-ads-patch:** reduce amount of ignored components ([#237](https://github.com/revanced/revanced-integrations/issues/237)) ([bf368e8](bf368e8dd4))
2022-12-18 21:41:26 +00:00
0xrxL
bf368e8dd4 perf(youtube/general-ads-patch): reduce amount of ignored components (#237) 2022-12-18 22:38:03 +01:00
semantic-release-bot
4afa162f46 chore(release): 0.84.0 [skip ci]
# [0.84.0](https://github.com/revanced/revanced-integrations/compare/v0.83.1...v0.84.0) (2022-12-08)

### Features

* **youtube/general-ads:** block new ad in home feed ([934b981](934b981605))
2022-12-08 20:32:47 +00:00
oSumAtrIX
66f5808863 build: use cache for node 2022-12-08 21:28:20 +01:00
oSumAtrIX
57c56b630a build: fix argument order 2022-12-08 21:11:37 +01:00
oSumAtrIX
edaf70fd10 build: update Java version 2022-12-08 21:11:37 +01:00
oSumAtrIX
c309646d35 build: simplify step Cancel previous runs 2022-12-08 21:11:36 +01:00
oSumAtrIX
934b981605 feat(youtube/general-ads): block new ad in home feed 2022-12-08 20:20:31 +01:00
oSumAtrIX
57969661dd build: update gradle 2022-12-08 20:20:30 +01:00
oSumAtrIX
376168fecf build: use latest node version 2022-12-07 01:25:35 +01:00
semantic-release-bot
e8342ec15b chore(release): 0.83.1 [skip ci]
## [0.83.1](https://github.com/revanced/revanced-integrations/compare/v0.83.0...v0.83.1) (2022-12-06)

### Bug Fixes

* inconsistencies in preference switches ([#235](https://github.com/revanced/revanced-integrations/issues/235)) ([d64a0f9](d64a0f9599))
2022-12-06 22:52:25 +00:00
Lisouseinaikyrios
d64a0f9599 fix: inconsistencies in preference switches (#235) 2022-12-06 23:47:33 +01:00
semantic-release-bot
b93b03dc19 chore(release): 0.83.0 [skip ci]
# [0.83.0](https://github.com/revanced/revanced-integrations/compare/v0.82.0...v0.83.0) (2022-12-05)

### Features

* **twitch:** `block-embedded-ads` patch ([#231](https://github.com/revanced/revanced-integrations/issues/231)) ([a098594](a098594706))
2022-12-05 23:16:27 +00:00
Ushie
a098594706 feat(twitch): block-embedded-ads patch (#231)
Co-authored-by: Tim Schneeberger <tim.schneeberger@outlook.de>
2022-12-06 00:11:55 +01:00
semantic-release-bot
8805851a09 chore(release): 0.82.0 [skip ci]
# [0.82.0](https://github.com/revanced/revanced-integrations/compare/v0.81.0...v0.82.0) (2022-12-05)

### Features

* **youtube/debugging:** print stack traces ([a9d2487](a9d24872a8))
* **youtube/return-youtube-dislike:** do not debug log when updating the text ([080e22b](080e22b1bf))
2022-12-05 05:39:37 +00:00
oSumAtrIX
a9d24872a8 feat(youtube/debugging): print stack traces 2022-12-05 06:35:04 +01:00
oSumAtrIX
080e22b1bf feat(youtube/return-youtube-dislike): do not debug log when updating the text 2022-12-05 06:35:03 +01:00
semantic-release-bot
5a028ab834 chore(release): 0.81.0 [skip ci]
# [0.81.0](https://github.com/revanced/revanced-integrations/compare/v0.80.0...v0.81.0) (2022-12-03)

### Features

* **youtube/return-youtube-dislike:** show dislike as a percentage ([#234](https://github.com/revanced/revanced-integrations/issues/234)) ([7840bc4](7840bc48ba))
2022-12-03 16:26:47 +00:00
LisousEinaiKyrios
7840bc48ba feat(youtube/return-youtube-dislike): show dislike as a percentage (#234)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-03 17:23:00 +01:00
semantic-release-bot
718c5a75c1 chore(release): 0.80.0 [skip ci]
# [0.80.0](https://github.com/revanced/revanced-integrations/compare/v0.79.1...v0.80.0) (2022-11-30)

### Features

* **twitch:** remove `block-embedded-ads` patch ([#230](https://github.com/revanced/revanced-integrations/issues/230)) ([2f32786](2f32786661))
2022-11-30 21:40:22 +00:00
Ushie
2f32786661 feat(twitch): remove block-embedded-ads patch (#230) 2022-11-30 22:36:06 +01:00
semantic-release-bot
3a2536a86e chore(release): 0.79.1 [skip ci]
## [0.79.1](https://github.com/revanced/revanced-integrations/compare/v0.79.0...v0.79.1) (2022-11-30)

### Bug Fixes

* **youtube/return-youtube-dislike:** feedback when dislikes hidden ([#224](https://github.com/revanced/revanced-integrations/issues/224)) ([37869dc](37869dc5b8))
2022-11-30 19:01:50 +00:00
LisousEinaiKyrios
37869dc5b8 fix(youtube/return-youtube-dislike): feedback when dislikes hidden (#224)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-11-30 19:58:11 +01:00
semantic-release-bot
9dc9ce364c chore(release): 0.79.0 [skip ci]
# [0.79.0](https://github.com/revanced/revanced-integrations/compare/v0.78.1...v0.79.0) (2022-11-30)

### Features

* **twitch:** `block-embedded-ads` patch support ([#227](https://github.com/revanced/revanced-integrations/issues/227)) ([00ea006](00ea006b8c))
2022-11-30 14:11:55 +00:00
Tim Schneeberger
00ea006b8c feat(twitch): block-embedded-ads patch support (#227) 2022-11-30 15:07:54 +01:00
LisousEinaiKyrios
617a4eb5d0 refactor: improve logging (#222)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-11-30 00:49:26 +01:00
semantic-release-bot
1351358268 chore(release): 0.78.1 [skip ci]
## [0.78.1](https://github.com/revanced/revanced-integrations/compare/v0.78.0...v0.78.1) (2022-11-29)

### Bug Fixes

* **twitch/settings:** add missing classes ([#226](https://github.com/revanced/revanced-integrations/issues/226)) ([35aa4f9](35aa4f92c6))
2022-11-29 23:48:47 +00:00
Tim Schneeberger
35aa4f92c6 fix(twitch/settings): add missing classes (#226) 2022-11-30 00:45:05 +01:00
semantic-release-bot
bca96cc8b4 chore(release): 0.78.0 [skip ci]
# [0.78.0](https://github.com/revanced/revanced-integrations/compare/v0.77.1...v0.78.0) (2022-11-25)

### Features

* **tiktok:** `sim-spoof` patch ([#219](https://github.com/revanced/revanced-integrations/issues/219)) ([cea3a5e](cea3a5edc7))
2022-11-25 10:23:49 +00:00
d4rkk3y
cea3a5edc7 feat(tiktok): sim-spoof patch (#219)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-11-25 11:19:49 +01:00
97 changed files with 14136 additions and 1466 deletions

25
.github/workflows/pull_request.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: PR to main
on:
push:
branches:
- dev
workflow_dispatch:
env:
MESSAGE: merge branch `${{ github.head_ref || github.ref_name }}` to `main`
jobs:
pull-request:
name: Open pull request
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Open pull request
uses: repo-sync/pull-request@v2
with:
destination_branch: 'main'
pr_title: 'chore: ${{ env.MESSAGE }}'
pr_body: 'This pull request will ${{ env.MESSAGE }}.'
pr_draft: true

View File

@@ -12,29 +12,32 @@ on:
- dev
jobs:
build:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
- name: Cancel previou runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Repo
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 11
with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'zulu'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Build with Gradle
run: ./gradlew --no-daemon build
node-version: "latest"
cache: 'npm'
- name: Setup semantic-release
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
run: npm install semantic-release@19.0.5 @saithodev/semantic-release-backmerge @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin@1.7.4 -D
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
run: npx semantic-release

View File

@@ -7,11 +7,7 @@
}
],
"plugins": [
["@semantic-release/commit-analyzer", {
"releaseRules": [
{"type": "build", "release": "patch"}
]
}],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"gradle-semantic-release-plugin",
@@ -31,7 +27,15 @@
{
"path": "app/build/outputs/apk/release/*.apk"
}
]
],
successComment: false
}
],
[
"@saithodev/semantic-release-backmerge",
{
branches: [{from: "main", to: "dev"}],
clearWorkspace: true
}
]
]

File diff suppressed because it is too large Load Diff

View File

@@ -8,29 +8,31 @@ plugins {
android {
compileSdk = 33
buildToolsVersion = "33.0.0"
buildToolsVersion = "33.0.1"
namespace = "app.revanced.integrations"
defaultConfig {
applicationId = "app.revanced.integrations"
minSdk = 23
targetSdk = 33
versionCode = 1
versionName = "1.0"
multiDexEnabled = false
val properties = Properties()
if (rootProject.file("local.properties").exists()) {
properties.load(FileInputStream(rootProject.file("local.properties")))
}
buildConfigField("String", "YT_API_KEY", "\"${properties.getProperty("youtubeAPIKey", "")}\"")
versionName = project.version as String
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
applicationVariants.all {
outputs.all {
this as com.android.build.gradle.internal.api.ApkVariantOutputImpl
outputFileName = "${rootProject.name}-$versionName.apk"
}
}
}
compileOptions {
@@ -46,4 +48,8 @@ dependencies {
compileOnly(project(mapOf("path" to ":dummy")))
compileOnly("androidx.annotation:annotation:1.5.0")
compileOnly("androidx.appcompat:appcompat:1.5.1")
compileOnly("com.squareup.okhttp3:okhttp:5.0.0-alpha.11")
compileOnly("com.squareup.retrofit2:retrofit:2.9.0")
}
tasks.register("publish") { dependsOn("build") }

View File

@@ -0,0 +1,11 @@
package app.revanced.all.screenshot.removerestriction;
import android.view.Window;
import android.view.WindowManager;
public class RemoveScreenshotRestrictionPatch {
public static void setFlags(Window window, int flags, int mask) {
window.setFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE, mask & ~WindowManager.LayoutParams.FLAG_SECURE);
}
}

View File

@@ -35,7 +35,7 @@ public class AdRemoverAPI {
ViewGroup.LayoutParams layoutParams5 = new ViewGroup.LayoutParams(1, 1);
view.setLayoutParams(layoutParams5);
} else {
LogHelper.debug(AdRemoverAPI.class, "HideViewWithLayout1dp - Id: " + view.getId() + " Type: " + view.getClass().getName());
LogHelper.printDebug(() -> "HideViewWithLayout1dp - Id: " + view.getId() + " Type: " + view.getClass().getName());
}
}

View File

@@ -1,12 +1,11 @@
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
// Used by: app.revanced.patches.youtube.layout.watermark.patch.HideWatermarkPatch
public static boolean isBrandingWatermarkShown() {
return SettingsEnum.BRANDING_SHOWN.getBoolean();
return SettingsEnum.HIDE_VIDEO_WATERMARK.getBoolean() == false;
}
}

View File

@@ -43,13 +43,13 @@ final class ButtonsPatch extends Filter {
if (currentIsActionButton && ActionButton.doNotBlockCounter-- > 0) {
if (SettingsEnum.HIDE_SHARE_BUTTON.getBoolean()) {
LogHelper.debug(ButtonsPatch.class, "Hiding share button");
LogHelper.printDebug(() -> "Hiding share button");
return true;
} else return false;
}
if ((currentIsActionButton && ActionButton.doNotBlockCounter <= 0 && actionButtonsRule.isEnabled()) || pathRegister.contains(path)) {
LogHelper.debug(ButtonsPatch.class, "Blocked: " + path);
LogHelper.printDebug(() -> "Blocked: " + path);
return true;
} else return false;
}

View File

@@ -24,7 +24,7 @@ final class CommentsPatch extends Filter {
boolean filter(String path, String _identifier) {
if (!pathRegister.contains(path)) return false;
LogHelper.debug(CommentsPatch.class, "Blocked: " + path);
LogHelper.printDebug(() -> "Blocked: " + path);
return true;
}

View File

@@ -0,0 +1,27 @@
package app.revanced.integrations.patches;
import android.content.Context;
import android.widget.Toast;
import app.revanced.integrations.sponsorblock.StringRef;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.utils.ReVancedUtils;
public class CopyVideoUrlPatch {
public static void copyUrl(Boolean withTimestamp) {
try {
String url = String.format("https://youtu.be/%s", VideoInformation.getCurrentVideoId());
if (withTimestamp) {
long seconds = VideoInformation.getVideoTime() / 1000;
url += String.format("?t=%s", seconds);
}
Context context = ReVancedUtils.getContext();
ReVancedUtils.setClipboard(url);
if (context != null) Toast.makeText(context, StringRef.str("share_copy_url_success"), Toast.LENGTH_SHORT).show();
} catch (Exception e) {
LogHelper.printException(() -> "Failed to generate video url", e);
}
}
}

View File

@@ -0,0 +1,42 @@
package app.revanced.integrations.patches;
import com.google.android.apps.youtube.app.watchwhile.WatchWhileActivity;
import app.revanced.integrations.utils.LogHelper;
public class FixBackToExitGesturePatch {
/**
* State whether the scroll position reaches the top.
*/
public static boolean isTopView = false;
/**
* Handle the event after clicking the back button.
*
* @param activity The activity, the app is launched with to finish.
*/
public static void onBackPressed(WatchWhileActivity activity) {
if (!isTopView) return;
LogHelper.printDebug(() -> "Activity is closed");
activity.finish();
}
/**
* Handle the event when the homepage list of views is being scrolled.
*/
public static void onScrollingViews() {
LogHelper.printDebug(() -> "Views are scrolling");
isTopView = false;
}
/**
* Handle the event when the homepage list of views reached the top.
*/
public static void onTopView() {
LogHelper.printDebug(() -> "Scrolling reached the top");
isTopView = true;
}
}

View File

@@ -31,7 +31,7 @@ public final class FixPlaybackPatch {
Thread.sleep(10);
}
} catch (InterruptedException e) {
LogHelper.debug(FixPlaybackPatch.class, "Thread was interrupted");
LogHelper.printDebug(() -> "Thread was interrupted");
}
});

View File

@@ -7,7 +7,7 @@ import app.revanced.integrations.settings.SettingsEnum;
public class FullscreenPanelsRemoverPatch {
public static int getFullscreenPanelsVisibility() {
return SettingsEnum.FULLSCREEN_PANELS_SHOWN.getBoolean() ? View.VISIBLE : View.GONE;
return SettingsEnum.HIDE_FULLSCREEN_PANELS.getBoolean() ? View.GONE : View.VISIBLE;
}
}

View File

@@ -1,7 +1,6 @@
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;
@@ -12,14 +11,8 @@ public final class GeneralAdsPatch extends Filter {
"home_video_with_context",
"related_video_with_context",
"comment_thread", // skip blocking anything in the comments
"download_",
"|comment.", // skip blocking anything in the comments replies
"library_recent_shelf",
"menu",
"root",
"-count",
"-space",
"-button",
"playlist_add_to_option_wrapper" // do not block on "add to playlist" flyout menu
};
private final BlockRule custom = new CustomBlockRule(
@@ -30,13 +23,14 @@ public final class GeneralAdsPatch extends Filter {
public GeneralAdsPatch() {
var communityPosts = new BlockRule(SettingsEnum.ADREMOVER_COMMUNITY_POSTS_REMOVAL, "post_base_wrapper");
var communityGuidelines = new BlockRule(SettingsEnum.ADREMOVER_COMMUNITY_GUIDELINES_REMOVAL, "community_guidelines");
var subscribersCommunityGuidelines = new BlockRule(SettingsEnum.ADREMOVER_SUBSCRIBERS_COMMUNITY_GUIDELINES_REMOVAL, "sponsorships_comments_upsell");
var channelMemberShelf = new BlockRule(SettingsEnum.ADREMOVER_CHANNEL_MEMBER_SHELF_REMOVAL, "member_recognition_shelf");
var compactBanner = new BlockRule(SettingsEnum.ADREMOVER_COMPACT_BANNER_REMOVAL, "compact_banner");
var inFeedSurvey = new BlockRule(SettingsEnum.ADREMOVER_FEED_SURVEY_REMOVAL, "in_feed_survey");
var medicalPanel = new BlockRule(SettingsEnum.ADREMOVER_MEDICAL_PANEL_REMOVAL, "medical_panel");
var paidContent = new BlockRule(SettingsEnum.ADREMOVER_PAID_CONTENT_REMOVAL, "paid_content_overlay");
var merchandise = new BlockRule(SettingsEnum.ADREMOVER_MERCHANDISE_REMOVAL, "product_carousel");
var infoPanel = new BlockRule(SettingsEnum.ADREMOVER_INFO_PANEL_REMOVAL, "publisher_transparency_panel", "single_item_information_panel");
var suggestions = new BlockRule(SettingsEnum.ADREMOVER_SUGGESTIONS_REMOVAL, "horizontal_video_shelf");
var latestPosts = new BlockRule(SettingsEnum.ADREMOVER_HIDE_LATEST_POSTS, "post_shelf");
var channelGuidelines = new BlockRule(SettingsEnum.ADREMOVER_HIDE_CHANNEL_GUIDELINES, "channel_guidelines_entry_banner");
var artistCard = new BlockRule(SettingsEnum.HIDE_ARTIST_CARD, "official_card");
@@ -55,6 +49,7 @@ public final class GeneralAdsPatch extends Filter {
SettingsEnum.ADREMOVER_GENERAL_ADS_REMOVAL,
"ads_video_with_context",
"banner_text_icon",
"square_image_layout",
"watch_metadata_app_promo",
"video_display_full_layout"
);
@@ -72,7 +67,6 @@ public final class GeneralAdsPatch extends Filter {
buttonedAd,
communityPosts,
paidContent,
suggestions,
latestPosts,
movieAds,
chapterTeaser,
@@ -84,7 +78,9 @@ public final class GeneralAdsPatch extends Filter {
infoPanel,
channelGuidelines,
artistCard,
selfSponsor
selfSponsor,
subscribersCommunityGuidelines,
channelMemberShelf
);
var carouselAd = new BlockRule(SettingsEnum.ADREMOVER_GENERAL_ADS_REMOVAL,
@@ -93,7 +89,8 @@ public final class GeneralAdsPatch extends Filter {
var shorts = new BlockRule(SettingsEnum.ADREMOVER_SHORTS_REMOVAL,
"reels_player_overlay",
"shorts_shelf",
"inline_shorts"
"inline_shorts",
"shorts_grid"
);
this.identifierRegister.registerAll(
@@ -115,7 +112,7 @@ public final class GeneralAdsPatch extends Filter {
else
result = BlockResult.UNBLOCKED;
log(String.format("%s (ID: %s): %s", result.message, identifier, path));
LogHelper.printDebug(() -> String.format("%s (ID: %s): %s", result.message, identifier, path));
return result.filter;
}
@@ -144,7 +141,7 @@ public final class GeneralAdsPatch extends Filter {
private static void hideView(SettingsEnum condition, View view) {
if (!condition.getBoolean()) return;
log("Hiding view with setting: " + condition);
LogHelper.printDebug(() -> "Hiding view with setting: " + condition);
AdRemoverAPI.HideViewWithLayout1dp(view);
}
@@ -167,7 +164,4 @@ public final class GeneralAdsPatch extends Filter {
hideView(SettingsEnum.ADREMOVER_SHORTS_REMOVAL, view);
}
private static void log(String message) {
LogHelper.debug(GeneralAdsPatch.class, message);
}
}

View File

@@ -5,6 +5,6 @@ import app.revanced.integrations.settings.SettingsEnum;
public class HideAutoplayButtonPatch {
public static boolean isButtonShown() {
return SettingsEnum.AUTOPLAY_BUTTON_SHOWN.getBoolean();
return SettingsEnum.HIDE_AUTOPLAY_BUTTON.getBoolean() == false;
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
public class HideBreakingNewsPatch {
//Used by app.revanced.patches.youtube.layout.homepage.breakingnews.patch.BreakingNewsPatch
public static void hideBreakingNews(View view) {
if (!SettingsEnum.HIDE_BREAKING_NEWS.getBoolean()) return;
AdRemoverAPI.HideViewWithLayout1dp(view);
}
}

View File

@@ -6,8 +6,8 @@ import app.revanced.integrations.settings.SettingsEnum;
public class HideCastButtonPatch {
//Used by app.revanced.patches.youtube.layout.castbutton.patch.HideCastButonPatch
// 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;
return SettingsEnum.HIDE_CAST_BUTTON.getBoolean() ? View.GONE : original;
}
}

View File

@@ -9,9 +9,8 @@ public class HideCreateButtonPatch {
//Used by app.revanced.patches.youtube.layout.createbutton.patch.CreateButtonRemoverPatch
public static void hideCreateButton(View view) {
boolean enabled = SettingsEnum.CREATE_BUTTON_ENABLED.getBoolean();
String message = "Create button: " + (enabled ? "shown" : "hidden");
LogHelper.debug(HideCreateButtonPatch.class, message);
view.setVisibility(enabled ? View.VISIBLE : View.GONE);
boolean hidden = SettingsEnum.HIDE_CREATE_BUTTON.getBoolean();
LogHelper.printDebug(() -> "Create button: " + (hidden ? "hidden" : "shown"));
view.setVisibility(hidden ? View.GONE : View.VISIBLE);
}
}

View File

@@ -13,7 +13,7 @@ public class HideReelsPatch {
* @param view
*/
public static void HideReel(View view) {
if (!SettingsEnum.REEL_BUTTON_SHOWN.getBoolean()) {
if (SettingsEnum.HIDE_REEL_BUTTON.getBoolean()) {
AdRemoverAPI.HideViewWithLayout1dp(view);
}
}

View File

@@ -3,20 +3,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 HideShortsButtonPatch {
//Used by app.revanced.patches.youtube.layout.shorts.button.patch.ShortsButtonRemoverPatch
// 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);
boolean hide = SettingsEnum.HIDE_SHORTS_BUTTON.getBoolean();
LogHelper.printDebug(() -> hide ? "Shorts button: hidden" : "Shorts button: shown");
if (hide) {
view.setVisibility(View.GONE);
}
}
}

View File

@@ -128,7 +128,7 @@ public final class LithoFilterPatch {
var path = pathBuilder.toString();
if (path.isEmpty()) return false;
LogHelper.debug(LithoFilterPatch.class, String.format("Searching (ID: %s): %s", identifier, path));
LogHelper.printDebug(() -> String.format("Searching (ID: %s): %s", identifier, path));
for (var filter : filters) {
if (filter.filter(path, identifier)) return true;

View File

@@ -1,34 +1,72 @@
package app.revanced.integrations.patches;
import android.util.Log;
import static app.revanced.integrations.utils.ReVancedUtils.getContext;
import android.content.Context;
import app.revanced.integrations.utils.ThemeHelper;
public class LithoThemePatch {
// color constants used in relation with litho components
private static final int[] WHITECONSTANTS = {
-1, // comments chip background
-394759, // music related results panel background
-83886081, // video chapters list background
private static final int[] WHITE_VALUES = {
-1, // comments chip background
-394759, // music related results panel background
-83886081, // video chapters list background
};
private static final int[] DARKCONSTANTS = {
-14145496, // explore drawer background
-14606047, // comments chip background
-15198184, // music related results panel background
-15790321, // comments chip background (new layout)
-98492127 // video chapters list background
private static final int[] DARK_VALUES = {
-14145496, // explore drawer background
-14606047, // comments chip background
-15198184, // music related results panel background
-15790321, // comments chip background (new layout)
-98492127 // video chapters list background
};
// background colors
private static int whiteColor = 0;
private static int blackColor = 0;
// Used by app.revanced.patches.youtube.layout.theme.patch.LithoThemePatch
/**
* Change the color of Litho components.
* If the color of the component matches one of the values, return the background color .
*
* @param originalValue The original color value.
* @return The new or original color value
*/
public static int applyLithoTheme(int originalValue) {
var isDarkTheme = ThemeHelper.isDarkTheme();
if ((isDarkTheme && anyEquals(originalValue, DARKCONSTANTS)) || (!isDarkTheme && anyEquals(originalValue, WHITECONSTANTS)))
return 0;
if (ThemeHelper.isDarkTheme()) {
if (anyEquals(originalValue, DARK_VALUES)) return getBlackColor();
} else {
if (anyEquals(originalValue, WHITE_VALUES)) return getWhiteColor();
}
return originalValue;
}
private static int getBlackColor() {
if (blackColor == 0) blackColor = getColor("yt_black1");
return blackColor;
}
private static int getWhiteColor() {
if (whiteColor == 0) whiteColor = getColor("yt_white1");
return whiteColor;
}
/**
* Determines the color for a color resource.
*
* @param name The color resource name.
* @return The value of the color.
*/
private static int getColor(String name) {
Context context = getContext();
return context != null ? context.getColor(context.getResources()
.getIdentifier(name, "color", context.getPackageName())
) : 0;
}
private static boolean anyEquals(int value, int... of) {
for (int v : of) if (value == v) return true;
return false;

View File

@@ -2,11 +2,14 @@ package app.revanced.integrations.patches;
import static app.revanced.integrations.sponsorblock.StringRef.str;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.widget.Toast;
import java.util.Objects;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.utils.ReVancedUtils;
@@ -14,20 +17,35 @@ public class MicroGSupport {
private static final String MICROG_VENDOR = "com.mgoogle";
private static final String MICROG_PACKAGE_NAME = "com.mgoogle.android.gms";
private static final String VANCED_MICROG_DOWNLOAD_LINK = "https://github.com/TeamVanced/VancedMicroG/releases/latest";
private static final String DONT_KILL_MY_APP_LINK = "https://dontkillmyapp.com";
private static final Uri VANCED_MICROG_PROVIDER = Uri.parse("content://com.mgoogle.android.gsf.gservices/prefix");
private static void startIntent(Context context, String uriString, String message) {
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
var intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setData(Uri.parse(uriString));
context.startActivity(intent);
}
public static void checkAvailability() {
var context = ReVancedUtils.getContext();
assert context != null;
var context = Objects.requireNonNull(ReVancedUtils.getContext());
try {
context.getPackageManager().getPackageInfo(MICROG_PACKAGE_NAME, PackageManager.GET_ACTIVITIES);
LogHelper.debug(ReVancedUtils.class, "MicroG is installed on the device");
} catch (PackageManager.NameNotFoundException exception) {
LogHelper.printException(ReVancedUtils.class, "MicroG was not found", exception);
Toast.makeText(context, str("microg_not_installed_warning"), Toast.LENGTH_LONG).show();
LogHelper.printInfo(() -> "Vanced MicroG was not found", exception);
startIntent(context, VANCED_MICROG_DOWNLOAD_LINK, str("microg_not_installed_warning"));
var intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(VANCED_MICROG_DOWNLOAD_LINK));
context.startActivity(intent);
// Gracefully exit the app, so it does not crash.
System.exit(0);
}
try (var client = context.getContentResolver().acquireContentProviderClient(VANCED_MICROG_PROVIDER)) {
if (client != null) return;
LogHelper.printInfo(() -> "Vanced MicroG is not running in the background");
startIntent(context, DONT_KILL_MY_APP_LINK, str("microg_not_running_warning"));
}
}
}

View File

@@ -0,0 +1,19 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class OpenLinksExternallyPatch {
/**
* Override 'android.support.customtabs.action.CustomTabsService',
* in order to open links in the default browser. This is done by returning an empty string,
* for the service that handles custom tabs in the Android support library
* which opens links in the default service instead.
*
* @param original The original custom tabs service.
* @return The new, default service to open links with or the original service.
*/
public static String enableExternalBrowser(String original) {
if (SettingsEnum.ENABLE_EXTERNAL_BROWSER.getBoolean()) original = "";
return original;
}
}

View File

@@ -2,8 +2,8 @@ package app.revanced.integrations.patches;
import androidx.annotation.Nullable;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.shared.PlayerType;
import app.revanced.integrations.utils.LogHelper;
/**
* Hook receiver class for 'player-type-hook' patch
@@ -24,9 +24,11 @@ public class PlayerTypeHookPatch {
// update current player type
final PlayerType newType = PlayerType.safeParseFromString(type.toString());
if (newType != null) {
if (newType == null) {
LogHelper.printException(() -> "Unknown PlayerType encountered: " + type);
} else {
PlayerType.setCurrent(newType);
LogHelper.debug(PlayerTypeHookPatch.class, "YouTubePlayerOverlaysLayout player type was updated to " + newType);
LogHelper.printDebug(() -> "YouTubePlayerOverlaysLayout player type was updated to " + newType);
}
}
}

View File

@@ -0,0 +1,15 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class SpoofAppVersionPatch {
public static String getYouTubeVersionOverride(String version) {
if (SettingsEnum.SPOOF_APP_VERSION.getBoolean()){
// Override with the most recent version that does not show the new UI player layout.
// If the new UI shows up for some users, then change this to an older version (such as 17.29.34).
return "17.30.34";
}
return version;
}
}

View File

@@ -17,6 +17,7 @@ public final class VideoInformation {
private static WeakReference<Object> playerController;
private static Method seekMethod;
private static String videoId = "";
private static long videoLength = 1;
private static long videoTime = -1;
@@ -35,17 +36,28 @@ public final class VideoInformation {
seekMethod = thisRef.getClass().getMethod(SEEK_METHOD_NAME, Long.TYPE);
seekMethod.setAccessible(true);
} catch (NoSuchMethodException ex) {
LogHelper.debug(VideoInformation.class, "Failed to initialize: " + ex.getMessage());
LogHelper.printException(() -> "Failed to initialize", ex);
}
}
/**
* Set the video id.
*
* @param videoId The id of the video.
*/
public static void setVideoId(String videoId) {
LogHelper.printDebug(() -> "Setting current video id to: " + videoId);
VideoInformation.videoId = videoId;
}
/**
* Set the video length.
*
* @param length The length of the video in milliseconds.
*/
public static void setVideoLength(final long length) {
LogHelper.debug(VideoInformation.class, "Setting current video length to " + length);
LogHelper.printDebug(() -> "Setting current video length to " + length);
videoLength = length;
}
@@ -55,7 +67,7 @@ public final class VideoInformation {
* @param time The time of the video in milliseconds.
*/
public static void setVideoTime(final long time) {
LogHelper.debug(VideoInformation.class, "Current video time " + time);
LogHelper.printDebug(() -> "Current video time " + time);
videoTime = time;
}
@@ -67,19 +79,28 @@ public final class VideoInformation {
public static void seekTo(final long millisecond) {
new Handler(Looper.getMainLooper()).post(() -> {
if (seekMethod == null) {
LogHelper.debug(VideoInformation.class, "seekMethod was null");
LogHelper.printDebug(() -> "seekMethod was null");
return;
}
try {
LogHelper.debug(VideoInformation.class, "Seeking to " + millisecond);
LogHelper.printDebug(() -> "Seeking to " + millisecond);
seekMethod.invoke(playerController.get(), millisecond);
} catch (Exception ex) {
LogHelper.debug(VideoInformation.class, "Failed to seek: " + ex.getMessage());
LogHelper.printException(() -> "Failed to seek", ex);
}
});
}
/**
* Get the id of the current video playing.
*
* @return The id of the video. Empty string if not set yet.
*/
public static String getCurrentVideoId() {
return videoId;
}
/**
* Get the length of the current video playing.
*

View File

@@ -1,172 +0,0 @@
package app.revanced.integrations.patches;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.utils.ReVancedUtils;
public class VideoSpeedPatch {
public static final float[] videoSpeeds = { 0, 0 }; // Values are useless as they are being overridden by the respective patch
private static Boolean userChangedSpeed = false;
public static int getDefaultSpeed(Object[] speeds, int speed, Object qInterface) {
int speed2;
Exception e;
if (!ReVancedUtils.isNewVideoStarted()) {
return speed;
}
ReVancedUtils.setNewVideo(false);
LogHelper.debug(VideoSpeedPatch.class, "Speed: " + speed);
float preferredSpeed = SettingsEnum.PREFERRED_VIDEO_SPEED.getFloat();
LogHelper.debug(VideoSpeedPatch.class, "Preferred speed: " + preferredSpeed);
if (preferredSpeed == -2.0f) {
return speed;
}
Class<?> floatType = Float.TYPE;
ArrayList<Float> iStreamSpeeds = new ArrayList<>();
try {
for (Object streamSpeed : speeds) {
Field[] fields = streamSpeed.getClass().getFields();
for (Field field : fields) {
if (field.getType().isAssignableFrom(floatType)) {
float value = field.getFloat(streamSpeed);
if (field.getName().length() <= 2) {
iStreamSpeeds.add(value);
}
}
}
}
} catch (Exception ignored) {
}
Iterator<Float> it = iStreamSpeeds.iterator();
int index = 0;
while (it.hasNext()) {
float streamSpeed2 = it.next();
LogHelper.debug(VideoSpeedPatch.class, "Speed at index " + index + ": " + streamSpeed2);
index++;
}
int speed3 = -1;
for (float streamSpeed3 : iStreamSpeeds) {
if (streamSpeed3 <= preferredSpeed) {
speed3++;
LogHelper.debug(VideoSpeedPatch.class, "Speed loop at index " + speed3 + ": " + streamSpeed3);
}
}
if (speed3 == -1) {
LogHelper.debug(VideoSpeedPatch.class, "Speed was not found");
speed2 = 3;
} else {
speed2 = speed3;
}
try {
Method[] declaredMethods = qInterface.getClass().getDeclaredMethods();
for (Method method : declaredMethods) {
if (method.getName().length() <= 2) {
LogHelper.debug(VideoSpeedPatch.class, "Method name: " + method.getName());
try {
try {
method.invoke(qInterface, videoSpeeds[speed2]);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ignored) {
} catch (Exception e6) {
e = e6;
LogHelper.printException(VideoSpeedPatch.class, e.getMessage());
return speed2;
}
} catch (Exception ignored) {
}
}
}
} catch (Exception e10) {
e = e10;
}
LogHelper.debug(VideoSpeedPatch.class, "Speed changed to: " + speed2);
return speed2;
}
public static void userChangedSpeed() {
userChangedSpeed = true;
}
public static float getSpeedValue(Object[] speeds, int speed) {
int i = 0;
if (!ReVancedUtils.isNewVideoStarted() || userChangedSpeed) {
if (SettingsEnum.DEBUG.getBoolean() && userChangedSpeed) {
LogHelper.debug(VideoSpeedPatch.class, "Skipping speed change because user changed it: " + speed);
}
userChangedSpeed = false;
return -1.0f;
}
ReVancedUtils.setNewVideo(false);
LogHelper.debug(VideoSpeedPatch.class, "Speed: " + speed);
float preferredSpeed = SettingsEnum.PREFERRED_VIDEO_SPEED.getFloat();
LogHelper.debug(VideoSpeedPatch.class, "Preferred speed: " + preferredSpeed);
if (preferredSpeed == -2.0f) {
return -1.0f;
}
Class<?> floatType = Float.TYPE;
ArrayList<Float> iStreamSpeeds = new ArrayList<>();
try {
int length = speeds.length;
int i2 = 0;
while (i2 < length) {
Object streamSpeed = speeds[i2];
Field[] fields = streamSpeed.getClass().getFields();
int length2 = fields.length;
while (i < length2) {
Field field = fields[i];
if (field.getType().isAssignableFrom(floatType)) {
float value = field.getFloat(streamSpeed);
if (field.getName().length() <= 2) {
iStreamSpeeds.add(value);
}
}
i++;
}
i2++;
i = 0;
}
} catch (Exception ignored) {
}
int index = 0;
for (Float iStreamSpeed : iStreamSpeeds) {
float streamSpeed2 = iStreamSpeed;
LogHelper.debug(VideoSpeedPatch.class, "Speed at index " + index + ": " + streamSpeed2);
index++;
}
int newSpeedIndex = -1;
for (Float iStreamSpeed : iStreamSpeeds) {
float streamSpeed3 = iStreamSpeed;
if (streamSpeed3 <= preferredSpeed) {
newSpeedIndex++;
LogHelper.debug(VideoSpeedPatch.class, "Speed loop at index " + newSpeedIndex + ": " + streamSpeed3);
}
}
if (newSpeedIndex == -1) {
LogHelper.debug(VideoSpeedPatch.class, "Speed was not found");
newSpeedIndex = 3;
}
if (newSpeedIndex == speed) {
LogHelper.debug(VideoSpeedPatch.class, "Trying to set speed to what it already is, skipping...: " + newSpeedIndex);
return -1.0f;
}
LogHelper.debug(VideoSpeedPatch.class, "Speed changed to: " + newSpeedIndex);
return getSpeedByIndex(newSpeedIndex);
}
private static float getSpeedByIndex(int index) {
if (index == -2) {
return 1.0f;
}
try {
return videoSpeeds[index];
} catch (Exception e) {
return 1.0f;
}
}
}

View File

@@ -1,27 +0,0 @@
package app.revanced.integrations.patches.downloads;
import app.revanced.integrations.utils.LogHelper;
/**
* Used by app.revanced.patches.youtube.interaction.downloads.bytecode.patch.DownloadsBytecodePatch
*/
public class DownloadsPatch {
private static String videoId;
/**
* Called when the video changes
* @param videoId The current video id
*/
public static void setVideoId(String videoId) {
LogHelper.debug(DownloadsPatch.class, "newVideoLoaded - " + videoId);
DownloadsPatch.videoId = videoId;
}
/**
* @return The current video id
*/
public static String getCurrentVideoId() {
return videoId;
}
}

View File

@@ -10,19 +10,19 @@ import app.revanced.integrations.utils.LogHelper;
public class OldQualityLayoutPatch {
public static void showOldQualityMenu(ListView listView)
{
if (!SettingsEnum.OLD_STYLE_QUALITY_SETTINGS.getBoolean()) return;
if (!SettingsEnum.OLD_STYLE_VIDEO_QUALITY_PLAYER_SETTINGS.getBoolean()) return;
listView.setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() {
@Override
public void onChildViewAdded(View parent, View child) {
LogHelper.debug(OldQualityLayoutPatch.class, "Added: " + child);
LogHelper.printDebug(() -> "Added: " + child);
parent.setVisibility(View.GONE);
final var indexOfAdvancedQualityMenuItem = 4;
if (listView.indexOfChild(child) != indexOfAdvancedQualityMenuItem) return;
LogHelper.debug(OldQualityLayoutPatch.class, "Found advanced menu: " + child);
LogHelper.printDebug(() -> "Found advanced menu: " + child);
final var qualityItemMenuPosition = 4;
listView.performItemClick(null, qualityItemMenuPosition, 0);

View File

@@ -1,5 +1,6 @@
package app.revanced.integrations.patches.playback.quality;
import android.annotation.SuppressLint;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
@@ -25,25 +26,26 @@ public class RememberVideoQualityPatch {
Context context = ReVancedUtils.getContext();
if (isConnectedWifi(context)) {
try {
SharedPrefHelper.saveString(context, SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "wifi_quality", defaultQuality + "");
SharedPrefHelper.saveString(SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "wifi_quality", defaultQuality + "");
String message = "Changing default Wi-Fi quality to: " + defaultQuality;
LogHelper.printDebug(() -> message);
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
} catch (Exception ex) {
LogHelper.printException(RememberVideoQualityPatch.class, "Failed to change default WI-FI quality:" + ex);
Toast.makeText(context, "Failed to change default WI-FI quality:", Toast.LENGTH_SHORT).show();
LogHelper.printException(() -> "Failed to change default WI-FI quality", ex);
}
LogHelper.debug(RememberVideoQualityPatch.class, "Changing default Wi-Fi quality to: " + defaultQuality);
Toast.makeText(context, "Changing default Wi-Fi quality to: " + defaultQuality, Toast.LENGTH_SHORT).show();
} else if (isConnectedMobile(context)) {
try {
SharedPrefHelper.saveString(context, SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "mobile_quality", defaultQuality + "");
SharedPrefHelper.saveString(SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "mobile_quality", defaultQuality + "");
String message = "Changing default mobile data quality to:" + defaultQuality;
LogHelper.printDebug(() -> message);
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
} catch (Exception ex) {
LogHelper.debug(RememberVideoQualityPatch.class, "Failed to change default mobile data quality" + ex);
Toast.makeText(context, "Failed to change default mobile data quality", Toast.LENGTH_SHORT).show();
LogHelper.printException(() -> "Failed to change default mobile data quality", ex);
}
LogHelper.debug(RememberVideoQualityPatch.class, "Changing default mobile data quality to:" + defaultQuality);
Toast.makeText(context, "Changing default mobile data quality to:" + defaultQuality, Toast.LENGTH_SHORT).show();
} else {
LogHelper.debug(RememberVideoQualityPatch.class, "No internet connection.");
Toast.makeText(context, "No internet connection.", Toast.LENGTH_SHORT).show();
String message = "No internet connection.";
LogHelper.printDebug(() -> message);
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
userChangedQuality = false;
}
@@ -76,34 +78,37 @@ public class RememberVideoQualityPatch {
int selectedQuality2 = qualities.length - selectedQuality1 + 1;
index++;
if (selectedQuality2 == index) {
LogHelper.debug(RememberVideoQualityPatch.class, "Quality index is: " + index + " and corresponding value is: " + convertedQuality);
final int indexToLog = index; // must be final for lambda
LogHelper.printDebug(() -> "Quality index is: " + indexToLog + " and corresponding value is: " + convertedQuality);
changeDefaultQuality(convertedQuality);
return selectedQuality2;
}
}
}
newVideo = false;
LogHelper.debug(RememberVideoQualityPatch.class, "Quality: " + quality);
final int qualityToLog = quality;
LogHelper.printDebug(() -> "Quality: " + qualityToLog);
Context context = ReVancedUtils.getContext();
if (context == null) {
LogHelper.printException(RememberVideoQualityPatch.class, "Context is null or settings not initialized, returning quality: " + quality);
LogHelper.printException(() -> "Context is null or settings not initialized, returning quality: " + qualityToLog);
return quality;
}
if (isConnectedWifi(context)) {
preferredQuality = SharedPrefHelper.getInt(context, SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "wifi_quality", -2);
LogHelper.debug(RememberVideoQualityPatch.class, "Wi-Fi connection detected, preferred quality: " + preferredQuality);
preferredQuality = SharedPrefHelper.getInt(SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "wifi_quality", -2);
LogHelper.printDebug(() -> "Wi-Fi connection detected, preferred quality: " + preferredQuality);
} else if (isConnectedMobile(context)) {
preferredQuality = SharedPrefHelper.getInt(context, SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "mobile_quality", -2);
LogHelper.debug(RememberVideoQualityPatch.class, "Mobile data connection detected, preferred quality: " + preferredQuality);
preferredQuality = SharedPrefHelper.getInt(SharedPrefHelper.SharedPrefNames.REVANCED_PREFS, "mobile_quality", -2);
LogHelper.printDebug(() -> "Mobile data connection detected, preferred quality: " + preferredQuality);
} else {
LogHelper.debug(RememberVideoQualityPatch.class, "No Internet connection!");
LogHelper.printDebug(() -> "No Internet connection!");
return quality;
}
if (preferredQuality == -2) {
return quality;
}
for (int streamQuality2 : iStreamQualities) {
LogHelper.debug(RememberVideoQualityPatch.class, "Quality at index " + index + ": " + streamQuality2);
final int indexToLog = index;
LogHelper.printDebug(() -> "Quality at index " + indexToLog + ": " + streamQuality2);
index++;
}
for (Integer iStreamQuality : iStreamQualities) {
@@ -116,24 +121,24 @@ public class RememberVideoQualityPatch {
return quality;
}
int qualityIndex = iStreamQualities.indexOf(quality);
LogHelper.debug(RememberVideoQualityPatch.class, "Index of quality " + quality + " is " + qualityIndex);
final int qualityToLog2 = quality;
LogHelper.printDebug(() -> "Index of quality " + qualityToLog2 + " is " + qualityIndex);
try {
Class<?> cl = qInterface.getClass();
Method m = cl.getMethod(qIndexMethod, Integer.TYPE);
LogHelper.debug(RememberVideoQualityPatch.class, "Method is: " + qIndexMethod);
LogHelper.printDebug(() -> "Method is: " + qIndexMethod);
m.invoke(qInterface, iStreamQualities.get(qualityIndex));
LogHelper.debug(RememberVideoQualityPatch.class, "Quality changed to: " + qualityIndex);
LogHelper.printDebug(() -> "Quality changed to: " + qualityIndex);
return qualityIndex;
} catch (Exception ex) {
LogHelper.printException(RememberVideoQualityPatch.class, "Failed to set quality", ex);
Toast.makeText(context, "Failed to set quality", Toast.LENGTH_SHORT).show();
LogHelper.printException(() -> "Failed to set quality", ex);
return qualityIndex;
}
}
public static void userChangedQuality(int selectedQuality) {
// Do not remember a **new** quality if REMEMBER_VIDEO_QUALITY is true
if (SettingsEnum.REMEMBER_VIDEO_QUALITY.getBoolean()) return;
// Do not remember a **new** quality if REMEMBER_VIDEO_QUALITY is false
if (!SettingsEnum.REMEMBER_VIDEO_QUALITY_LAST_SELECTED.getBoolean()) return;
selectedQuality1 = selectedQuality;
userChangedQuality = true;
@@ -143,6 +148,7 @@ public class RememberVideoQualityPatch {
newVideo = true;
}
@SuppressLint("MissingPermission")
private static NetworkInfo getNetworkInfo(Context context) {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
return cm.getActiveNetworkInfo();

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