fix buhocleaner error.

This commit is contained in:
QiuChenly
2024-06-16 04:20:49 +08:00
parent e51bad172a
commit c01c6b8aa0
5 changed files with 47 additions and 12 deletions

35
adobe.py Normal file
View File

@@ -0,0 +1,35 @@
import os
import subprocess
subprocess.run(
"sudo chmod -R 777 '/Applications/Utilities/Adobe Creative Cloud/Components/Apps/Apps1_0.js'",
shell=True,
)
# 检查是否存在/Applications/Utilities/Adobe Creative Cloud/Components/Apps/Apps1_0.js
if os.path.isfile(
"/Applications/Utilities/Adobe Creative Cloud/Components/Apps/Apps1_0.js"
):
# 替换文件中的key:"getEntitlementStatus",value:function(e){为key:"getEntitlementStatus",value:function(e){return "Entitled Installed"
with open(
"/Applications/Utilities/Adobe Creative Cloud/Components/Apps/Apps1_0.js",
"r",
encoding="utf-8",
) as f:
content = f.read()
# 判断是否写过了
if (
'key:"getEntitlementStatus",value:function(e){return "Entitled Installed"'
not in content
):
# sed -i "s#key:\"getEntitlementStatus\",value:function(e){#key:\"getEntitlementStatus\",value:function(e){return \"Entitled Installed\"#g" /Applications/Utilities/Adobe\ Creative\ Cloud/Components/Apps/Apps1_0.js
content = content.replace(
'key:"getEntitlementStatus",value:function(e){',
'key:"getEntitlementStatus",value:function(e){return "Entitled Installed";',
)
with open(
"/Applications/Utilities/Adobe Creative Cloud/Components/Apps/Apps1_0.js",
"w",
encoding="utf-8",
) as f:
f.write(content)

20
main.py
View File

@@ -68,7 +68,7 @@ def check_compatible(
return False return False
def handle_helper(app_base, target_helper, component_apps, SMExtra): def handle_helper(app_base, target_helper, component_apps, SMExtra, bridge_path):
"""增强Helper """增强Helper
Args: Args:
@@ -81,7 +81,7 @@ def handle_helper(app_base, target_helper, component_apps, SMExtra):
shell=True, shell=True,
) )
subprocess.run( subprocess.run(
f"./tool/insert_dylib '{app_base}/Contents/Frameworks/91QiuChenly.dylib' '{target_helper}' '{target_helper}'", f"./tool/insert_dylib '{bridge_path}91QiuChenly.dylib' '{target_helper}' '{target_helper}'",
shell=True, shell=True,
) )
helper_name = target_helper.split("/")[-1] helper_name = target_helper.split("/")[-1]
@@ -387,20 +387,20 @@ def main():
subprocess.run(f"sudo xattr -cr '{dest}'", shell=True) subprocess.run(f"sudo xattr -cr '{dest}'", shell=True)
if auto_handle_helper and helper_file: if auto_handle_helper and helper_file:
helpers = []
if isinstance(helper_file, list): if isinstance(helper_file, list):
for helper in helper_file: helpers = helper_file
handle_helper(
app_base_locate,
f"{app_base_locate}{helper}",
componentApp,
SMExtra,
)
else: else:
helpers.append(helper_file)
for helper in helpers:
handle_helper( handle_helper(
app_base_locate, app_base_locate,
f"{app_base_locate}{helper_file}", f"{app_base_locate}{helper}",
componentApp, componentApp,
SMExtra, SMExtra,
f"{app_base_locate}{bridge_file}",
) )
if tccutil is not None: if tccutil is not None:
if tccutil := tccutil: if tccutil := tccutil:

View File

@@ -1,6 +1,6 @@
services: services:
docker_emby_system: docker_emby_system:
image: emby/embyserver:4.9.0.18 image: emby/embyserver:4.9.0.23
privileged: true privileged: true
container_name: docker_emby_system container_name: docker_emby_system
hostname: "MediaServerCenter" hostname: "MediaServerCenter"

View File

@@ -5,7 +5,7 @@
2. docker compose up -d 2. docker compose up -d
## 对应版本 ## 对应版本
emby/embyserver:4.9.0.18 emby/embyserver:4.9.0.23
## 注意事项 ## 注意事项
1. emby config自动存在于一个独立的镜像。如果需要docker compose down的时候也删掉这个配置保存内容带上-v。 1. emby config自动存在于一个独立的镜像。如果需要docker compose down的时候也删掉这个配置保存内容带上-v。