ryry-cli 4.22__tar.gz → 4.24__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 (31) hide show
  1. {ryry_cli-4.22/ryry_cli.egg-info → ryry_cli-4.24}/PKG-INFO +1 -1
  2. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/constant.py +2 -2
  3. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/daemon_manager.py +25 -2
  4. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/main.py +6 -2
  5. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/store.py +1 -1
  6. {ryry_cli-4.22 → ryry_cli-4.24/ryry_cli.egg-info}/PKG-INFO +1 -1
  7. {ryry_cli-4.22 → ryry_cli-4.24}/setup.py +1 -1
  8. {ryry_cli-4.22 → ryry_cli-4.24}/LICENSE +0 -0
  9. {ryry_cli-4.22 → ryry_cli-4.24}/README.md +0 -0
  10. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/__init__.py +0 -0
  11. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/daemon_base.py +0 -0
  12. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/ryry_server_socket.py +0 -0
  13. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/ryry_service.py +0 -0
  14. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/ryry_webapi.py +0 -0
  15. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/ryry_widget.py +0 -0
  16. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/script_template/__init__.py +0 -0
  17. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/script_template/daemon.py +0 -0
  18. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/script_template/main.py +0 -0
  19. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/script_template/run.py +0 -0
  20. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/server_func.py +0 -0
  21. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/shared_memory.py +0 -0
  22. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/task.py +0 -0
  23. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/taskUtils.py +0 -0
  24. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/upload.py +0 -0
  25. {ryry_cli-4.22 → ryry_cli-4.24}/ryry/utils.py +0 -0
  26. {ryry_cli-4.22 → ryry_cli-4.24}/ryry_cli.egg-info/SOURCES.txt +0 -0
  27. {ryry_cli-4.22 → ryry_cli-4.24}/ryry_cli.egg-info/dependency_links.txt +0 -0
  28. {ryry_cli-4.22 → ryry_cli-4.24}/ryry_cli.egg-info/entry_points.txt +0 -0
  29. {ryry_cli-4.22 → ryry_cli-4.24}/ryry_cli.egg-info/requires.txt +0 -0
  30. {ryry_cli-4.22 → ryry_cli-4.24}/ryry_cli.egg-info/top_level.txt +0 -0
  31. {ryry_cli-4.22 → ryry_cli-4.24}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 4.22
3
+ Version: 4.24
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="4.22"
3
- app_bulld_anchor="Noh_2025-07-24 11:12:04.496003"
2
+ app_version="4.24"
3
+ app_bulld_anchor="Noh_2025-07-24 14:12:11.378741"
4
4
  app_name="ryry-cli"
5
5
  import sys, os
6
6
  if getattr(sys, 'frozen', False):
@@ -49,8 +49,31 @@ class DaemonManager:
49
49
  try:
50
50
  if pid <= 0:
51
51
  return False
52
- os.kill(pid, 0)
53
- return True
52
+
53
+ import platform
54
+ if platform.system() == "Windows":
55
+ # Windows系统使用tasklist命令检查进程
56
+ import subprocess
57
+ try:
58
+ result = subprocess.run(['tasklist', '/FI', f'PID eq {pid}'],
59
+ capture_output=True, text=True, timeout=5)
60
+ return str(pid) in result.stdout
61
+ except:
62
+ # 如果tasklist失败,尝试使用psutil
63
+ try:
64
+ import psutil
65
+ return psutil.pid_exists(pid)
66
+ except ImportError:
67
+ # 如果psutil不可用,使用os.kill但捕获异常
68
+ try:
69
+ os.kill(pid, 0)
70
+ return True
71
+ except (OSError, ProcessLookupError):
72
+ return False
73
+ else:
74
+ # Unix-like系统使用os.kill(pid, 0)
75
+ os.kill(pid, 0)
76
+ return True
54
77
  except (OSError, ProcessLookupError):
55
78
  return False
56
79
 
@@ -1,4 +1,4 @@
1
- import sys, os, urllib3, time, platform, json, curses
1
+ import sys, os, urllib3, time, platform, json
2
2
 
3
3
  from ryry import utils
4
4
  from ryry import ryry_service
@@ -127,7 +127,10 @@ def widget_status(stdscr, idx):
127
127
  max_task_number_str = ""
128
128
  if max_task_number > 0:
129
129
  max_task_number_str = f"*{max_task_number}"
130
- real_stdsrc(idx, 0, scr_str(f'{f"[{name}{max_task_number_str} v{version}] {it}{end_args}".ljust(maxJust)}'.ljust(ll*3-2)), curses.color_pair(color_pair))
130
+ if platform.system() == 'Windows':
131
+ real_stdsrc(idx, 0, scr_str(f'{f"[{name}{max_task_number_str} v{version}] {it}{end_args}".ljust(maxJust)}'.ljust(ll*3-2)))
132
+ else:
133
+ real_stdsrc(idx, 0, scr_str(f'{f"[{name}{max_task_number_str} v{version}] {it}{end_args}".ljust(maxJust)}'.ljust(ll*3-2)), curses.color_pair(color_pair))
131
134
  idx+=1
132
135
  real_stdsrc(idx, 0, scr_str(f' PATH:{path}'.ljust(ll*3-2)))
133
136
  idx+=1
@@ -186,6 +189,7 @@ def status():
186
189
  widget_status(None, 0)
187
190
  print(scr_line("-" * ll*3))
188
191
  else:
192
+ import curses
189
193
  stdscr = curses.initscr()
190
194
  curses.noecho()
191
195
  curses.cbreak()
@@ -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.22":
158
+ elif read_data["extend"].get("app", "") == "ryry-cli 4.24":
159
159
  _genExtend()
160
160
  else:
161
161
  _genExtend()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 4.22
3
+ Version: 4.24
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 = "4.22"
6
+ ryry_version = "4.24"
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