ryry-cli 5.2__tar.gz → 5.4__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.
Files changed (32) hide show
  1. {ryry_cli-5.2/ryry_cli.egg-info → ryry_cli-5.4}/PKG-INFO +1 -1
  2. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/constant.py +2 -2
  3. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/server_func.py +12 -3
  4. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/store.py +1 -1
  5. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/upload.py +14 -25
  6. {ryry_cli-5.2 → ryry_cli-5.4/ryry_cli.egg-info}/PKG-INFO +1 -1
  7. {ryry_cli-5.2 → ryry_cli-5.4}/setup.py +1 -1
  8. {ryry_cli-5.2 → ryry_cli-5.4}/LICENSE +0 -0
  9. {ryry_cli-5.2 → ryry_cli-5.4}/README.md +0 -0
  10. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/__init__.py +0 -0
  11. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/daemon_base.py +0 -0
  12. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/daemon_manager.py +0 -0
  13. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/main.py +0 -0
  14. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/proxy_manager.py +0 -0
  15. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/ryry_server_socket.py +0 -0
  16. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/ryry_service.py +0 -0
  17. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/ryry_webapi.py +0 -0
  18. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/ryry_widget.py +0 -0
  19. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/script_template/__init__.py +0 -0
  20. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/script_template/daemon.py +0 -0
  21. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/script_template/main.py +0 -0
  22. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/script_template/run.py +0 -0
  23. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/shared_memory.py +0 -0
  24. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/task.py +0 -0
  25. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/taskUtils.py +0 -0
  26. {ryry_cli-5.2 → ryry_cli-5.4}/ryry/utils.py +0 -0
  27. {ryry_cli-5.2 → ryry_cli-5.4}/ryry_cli.egg-info/SOURCES.txt +0 -0
  28. {ryry_cli-5.2 → ryry_cli-5.4}/ryry_cli.egg-info/dependency_links.txt +0 -0
  29. {ryry_cli-5.2 → ryry_cli-5.4}/ryry_cli.egg-info/entry_points.txt +0 -0
  30. {ryry_cli-5.2 → ryry_cli-5.4}/ryry_cli.egg-info/requires.txt +0 -0
  31. {ryry_cli-5.2 → ryry_cli-5.4}/ryry_cli.egg-info/top_level.txt +0 -0
  32. {ryry_cli-5.2 → ryry_cli-5.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 5.2
3
+ Version: 5.4
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -1,6 +1,6 @@
1
1
  #!!!!! do not change this file !!!!!
2
- app_version="5.2"
3
- app_bulld_anchor="Noh_2025-09-28 18:46:20.763566"
2
+ app_version="5.4"
3
+ app_bulld_anchor="Noh_2025-09-28 22:05:40.262632"
4
4
  app_name="ryry-cli"
5
5
  import sys, os
6
6
  if getattr(sys, 'frozen', False):
@@ -1,7 +1,7 @@
1
1
  import time, urllib3, sys, os, uuid, json
2
2
  from threading import Thread, Lock
3
3
 
4
- from ryry import ryry_webapi, upload, taskUtils, task, constant
4
+ from ryry import ryry_webapi, upload, taskUtils, task, constant, ryry_service
5
5
 
6
6
  lock = Lock()
7
7
  def print_progress_bar(iteration, total, name, idx, total_bars):
@@ -43,8 +43,17 @@ class TaskThread(Thread):
43
43
  self.checkCount = 0
44
44
  wait_time_step = 5
45
45
  cmd = task.cmdWithWidgetName(self.func)
46
- if cmd:
47
- self.checkUUID = ryry_webapi.createLocalTask(self.func, self.params, self.timeout)
46
+
47
+ if cmd:
48
+ if not ryry_service.ryryService().is_running():
49
+ self.checkUUID = "local_" + ''.join(str(uuid.uuid4()).split('-'))
50
+ self.params["task_id"] = self.checkUUID
51
+ executeSuccess, result_obj = task.executeLocalPython(self.checkUUID, cmd, self.params, self.timeout)
52
+ if executeSuccess and result_obj["status"] == 0:
53
+ self.call_back(self.idx, result_obj["result"])
54
+ return
55
+ else:
56
+ self.checkUUID = ryry_webapi.createLocalTask(self.func, self.params, self.timeout)
48
57
  else:
49
58
  self.checkUUID = ryry_webapi.createTask(self.func, self.params)
50
59
  time.sleep(wait_time_step)
@@ -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 5.2":
158
+ elif read_data["extend"].get("app", "") == "ryry-cli 5.4":
159
159
  _genExtend()
160
160
  else:
161
161
  _genExtend()
@@ -215,22 +215,6 @@ def ftpUpload(file, new_file_name, subdomain, upload_path=""):
215
215
  import ftplib
216
216
  while retry < 3:
217
217
  try:
218
- #如果ip是外网ip,并且在FTP_REPLACEMENT内有,则先替换成内网ip上传一次
219
- if retry == 0 and "192.168" not in ip and ip in FTP_REPLACEMENT:
220
- try:
221
- local_network_config = DOMAIN_CONFIG[FTP_REPLACEMENT[ip]]["config"]
222
- ftp = ftplib.FTP()
223
- ftp.connect(local_network_config["host"], local_network_config["port"], timeout=5)
224
- ftp.login(local_network_config["username"], local_network_config["password"])
225
- if upload_path:
226
- s = deepFtpUpload(file, new_file_name, ftp, upload_path, readpath)
227
- else:
228
- s = deepFtpUpload(file, new_file_name, ftp, writepath, readpath)
229
- ftp.quit()
230
- return s
231
- except:
232
- pass
233
-
234
218
  if retry > 0:
235
219
  has_bak = FTP_REPLACEMENT.get(ip, None)
236
220
  if has_bak:
@@ -297,7 +281,7 @@ ftp_192_168_50_12={
297
281
  "writepath" : "cache",
298
282
  "readpath" : "ftp://219.136.123.179/mnt/NAS/mcn"
299
283
  }
300
- ftp_183_6_90_205={
284
+ ftp_219_136_123_179={
301
285
  "host" : "219.136.123.179",
302
286
  "port": 2221,
303
287
  "username" : "mcn",
@@ -345,11 +329,11 @@ def get_domain_config(target_domain):
345
329
 
346
330
  DOMAIN_CONFIG = {
347
331
  "192.168.50.12": {"type": "ftp", "config": ftp_192_168_50_12},
348
- "219.136.123.179": {"type": "ftp", "config": ftp_183_6_90_205},
349
- "183.6.90.205": {"type": "ftp", "config": ftp_183_6_90_205},
332
+ "219.136.123.179": {"type": "ftp", "config": ftp_219_136_123_179},
333
+ "183.6.90.205": {"type": "ftp", "config": ftp_219_136_123_179},
350
334
  "ftp://192.168.50.12/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_192_168_50_12},
351
- "ftp://183.6.90.205/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_183_6_90_205},
352
- "ftp://219.136.123.179/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_183_6_90_205},
335
+ "ftp://183.6.90.205/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_219_136_123_179},
336
+ "ftp://219.136.123.179/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_219_136_123_179},
353
337
  "res.zjtemplate.com": {"type": "oss", "config": oss_res_config},
354
338
  "upload.zjtemplate.com": {"type": "oss", "config": oss_upload_config},
355
339
  "oss.zjtemplate.com": {"type": "oss", "config": oss_template_config},
@@ -360,16 +344,21 @@ DOMAIN_CONFIG = {
360
344
  FTP_REPLACEMENT = {
361
345
  "192.168.50.12": "219.136.123.179",
362
346
  "219.136.123.179": "192.168.50.12",
347
+ "183.6.90.205": "219.136.123.179",
363
348
  }
364
349
 
365
350
  SUBDOMAIN = {
351
+ "183.6.90.205": [
352
+ ftp_192_168_50_12,
353
+ ftp_219_136_123_179,
354
+ ],
366
355
  "219.136.123.179": [
367
356
  ftp_192_168_50_12,
368
- ftp_183_6_90_205,
357
+ ftp_219_136_123_179,
369
358
  ],
370
- "192.168.50.138": [
359
+ "192.168.50.12": [
371
360
  ftp_192_168_50_12,
372
- ftp_183_6_90_205,
361
+ ftp_219_136_123_179,
373
362
  ]
374
363
  }
375
364
 
@@ -688,4 +677,4 @@ def downloadDir(url, saveDir, useCount=-1, autoDelete=False):
688
677
  print(f"url {url} not support")
689
678
  except Exception as e:
690
679
  print(f"downloadDir fail: {e}")
691
- return None
680
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 5.2
3
+ Version: 5.4
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -3,7 +3,7 @@ import os
3
3
  import subprocess
4
4
  import datetime
5
5
 
6
- ryry_version = "5.2"
6
+ ryry_version = "5.4"
7
7
  cur_dir = os.path.dirname(os.path.abspath(__file__))
8
8
  constanspy = os.path.join(cur_dir, "ryry", "constant.py")
9
9
  try:
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