ryry-cli 4.28__tar.gz → 4.30__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ryry_cli-4.28/ryry_cli.egg-info → ryry_cli-4.30}/PKG-INFO +1 -1
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/constant.py +2 -2
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/daemon_manager.py +1 -1
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/store.py +1 -1
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/utils.py +21 -2
- {ryry_cli-4.28 → ryry_cli-4.30/ryry_cli.egg-info}/PKG-INFO +1 -1
- {ryry_cli-4.28 → ryry_cli-4.30}/setup.py +1 -1
- {ryry_cli-4.28 → ryry_cli-4.30}/LICENSE +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/README.md +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/__init__.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/daemon_base.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/main.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/proxy_manager.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/ryry_service.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/ryry_widget.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/script_template/daemon.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/script_template/main.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/script_template/run.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/server_func.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/shared_memory.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/task.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/taskUtils.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry/upload.py +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-4.28 → ryry_cli-4.30}/setup.cfg +0 -0
|
@@ -244,7 +244,7 @@ class DaemonManager:
|
|
|
244
244
|
# 等待就绪信号(通过文件)
|
|
245
245
|
ready_file = os.path.join(constant.base_path, f"daemon_ready_{widget_id}.json")
|
|
246
246
|
start_time = time.time()
|
|
247
|
-
timeout_seconds =
|
|
247
|
+
timeout_seconds = 360
|
|
248
248
|
while time.time() - start_time < timeout_seconds:
|
|
249
249
|
if os.path.exists(ready_file):
|
|
250
250
|
try:
|
|
@@ -155,7 +155,7 @@ def extend():
|
|
|
155
155
|
_genExtend()
|
|
156
156
|
elif read_data["extend"].get("device_id", "") != read_data.get("deviceInfo", {}).get("device_id", ""):
|
|
157
157
|
_genExtend()
|
|
158
|
-
elif read_data["extend"].get("app", "") == "ryry-cli 4.
|
|
158
|
+
elif read_data["extend"].get("app", "") == "ryry-cli 4.30":
|
|
159
159
|
_genExtend()
|
|
160
160
|
else:
|
|
161
161
|
_genExtend()
|
|
@@ -231,8 +231,8 @@ def begin_restart(reason, update_cli=False, simple="https://pypi.python.org/simp
|
|
|
231
231
|
"simple": simple
|
|
232
232
|
},f)
|
|
233
233
|
|
|
234
|
-
K1 = "
|
|
235
|
-
K2 = "
|
|
234
|
+
K1 = "TFRBSTV0UkR3NXhocHc1eDlVdkZaUWsy"
|
|
235
|
+
K2 = "TFVuYlRuZFRQMHpxYmU3TjVJSGw0YlVvdlJNQkR6"
|
|
236
236
|
def _decode_key(encoded_key):
|
|
237
237
|
import base64
|
|
238
238
|
try:
|
|
@@ -244,6 +244,25 @@ def _decode_key(encoded_key):
|
|
|
244
244
|
decoded_bytes = base64.b64decode(encoded_key.encode('utf-8'))
|
|
245
245
|
return decoded_bytes.hex()
|
|
246
246
|
|
|
247
|
+
def _encode_key(raw_input):
|
|
248
|
+
import base64
|
|
249
|
+
if isinstance(raw_input, bytes):
|
|
250
|
+
# 直接是字节数据,编码为 base64
|
|
251
|
+
encoded = base64.b64encode(raw_input)
|
|
252
|
+
elif isinstance(raw_input, str):
|
|
253
|
+
try:
|
|
254
|
+
# 尝试当作普通字符串
|
|
255
|
+
encoded = base64.b64encode(raw_input.encode('utf-8'))
|
|
256
|
+
except UnicodeEncodeError:
|
|
257
|
+
# 如果编码失败,尝试当作十六进制字符串
|
|
258
|
+
try:
|
|
259
|
+
encoded = base64.b64encode(bytes.fromhex(raw_input))
|
|
260
|
+
except ValueError:
|
|
261
|
+
raise ValueError("Input is not valid UTF-8 string or hex string")
|
|
262
|
+
else:
|
|
263
|
+
raise TypeError("Input must be str or bytes")
|
|
264
|
+
return encoded.decode('utf-8')
|
|
265
|
+
|
|
247
266
|
|
|
248
267
|
def check_restart():
|
|
249
268
|
restart_file = os.path.join(constant.base_path, "restart")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|