Рефакторинг патчей, реализация Список патчей:

settings_urls: ✔ enabled
  disable_ad: ✔ enabled
  disable_beta_banner: ✔ enabled
  insert_new: ✔ enabled
  color_theme: ✔ enabled
  change_server: ✘ disabled
  package_name: ✔ enabled
  replace_navbar: ✔ enabled
  compress: ✔ enabled, обновление описаний
This commit is contained in:
2025-09-20 23:00:00 +03:00
parent 66336f3a5c
commit 5ff882a8d5
14 changed files with 142 additions and 60 deletions
+10 -2
View File
@@ -1,13 +1,20 @@
"""
Удаляет баннеры бета-версии
Удаляет баннеры бета-версии
"disable_beta_banner": {
"enabled": true
}
"""
priority = 0
# imports
import os
from tqdm import tqdm
from lxml import etree
# Patch
def apply(config) -> bool:
attributes = [
"paddingTop",
@@ -29,7 +36,8 @@ def apply(config) -> bool:
root = tree.getroot()
for attr in attributes:
# tqdm.write(f"set {attr} = 0.0dip")
if config["verbose"]:
tqdm.write(f"set {attr} = 0.0dip")
root.set(f"{{{config["xml_ns"]['android']}}}{attr}", "0.0dip")
tree.write(