ryry-cli 6.3__tar.gz → 6.8__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-6.3/ryry_cli.egg-info → ryry_cli-6.8}/PKG-INFO +1 -1
  2. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/constant.py +2 -2
  3. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/ryry_server_socket.py +3 -3
  4. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/ryry_webapi.py +13 -3
  5. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/ryry_widget.py +4 -1
  6. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/store.py +13 -2
  7. {ryry_cli-6.3 → ryry_cli-6.8/ryry_cli.egg-info}/PKG-INFO +1 -1
  8. {ryry_cli-6.3 → ryry_cli-6.8}/setup.py +1 -1
  9. {ryry_cli-6.3 → ryry_cli-6.8}/LICENSE +0 -0
  10. {ryry_cli-6.3 → ryry_cli-6.8}/README.md +0 -0
  11. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/__init__.py +0 -0
  12. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/daemon_base.py +0 -0
  13. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/daemon_manager.py +0 -0
  14. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/main.py +0 -0
  15. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/proxy_manager.py +0 -0
  16. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/ryry_service.py +0 -0
  17. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/script_template/__init__.py +0 -0
  18. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/script_template/daemon.py +0 -0
  19. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/script_template/main.py +0 -0
  20. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/script_template/run.py +0 -0
  21. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/server_func.py +0 -0
  22. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/shared_memory.py +0 -0
  23. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/task.py +0 -0
  24. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/taskUtils.py +0 -0
  25. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/upload.py +0 -0
  26. {ryry_cli-6.3 → ryry_cli-6.8}/ryry/utils.py +0 -0
  27. {ryry_cli-6.3 → ryry_cli-6.8}/ryry_cli.egg-info/SOURCES.txt +0 -0
  28. {ryry_cli-6.3 → ryry_cli-6.8}/ryry_cli.egg-info/dependency_links.txt +0 -0
  29. {ryry_cli-6.3 → ryry_cli-6.8}/ryry_cli.egg-info/entry_points.txt +0 -0
  30. {ryry_cli-6.3 → ryry_cli-6.8}/ryry_cli.egg-info/requires.txt +0 -0
  31. {ryry_cli-6.3 → ryry_cli-6.8}/ryry_cli.egg-info/top_level.txt +0 -0
  32. {ryry_cli-6.3 → ryry_cli-6.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 6.3
3
+ Version: 6.8
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="6.3"
3
- app_bulld_anchor="Noh_2025-11-13 17:04:32.025253"
2
+ app_version="6.8"
3
+ app_bulld_anchor="Noh_2025-11-13 21:05:22.488380"
4
4
  app_name="ryry-cli"
5
5
  import sys, os
6
6
  if getattr(sys, 'frozen', False):
@@ -239,15 +239,15 @@ class RyryShortConnectThread(Thread):
239
239
  time.sleep(1)
240
240
  continue
241
241
 
242
- widget_list = []
242
+ widget_list = {}
243
243
  map = store.widgetMap()
244
244
  for it in map:
245
245
  if isinstance(map[it], (dict)):
246
246
  if map[it]["isBlock"] == False and self.executor.widgetHasPower(it):
247
- widget_list.append(it)
247
+ widget_list[it] = map[it]["version"]
248
248
  else:
249
249
  if self.executor.widgetHasPower(it):
250
- widget_list.append(it)
250
+ widget_list[it] = map[it]["version"]
251
251
  datas = ryry_webapi.GetTask(widget_list)
252
252
  for it in datas:
253
253
  self.executor.appendTask(it, self.taskCallback)
@@ -9,12 +9,12 @@ from urllib.parse import urlparse, urlunparse
9
9
 
10
10
  from ryry import store, utils, taskUtils, constant, task
11
11
 
12
- user_token, author = store.get_token_and_authorization()
12
+ g_user_token, g_author = store.get_token_and_authorization()
13
13
  def _domain_post(func, params, files={}, timeout=10, domain="api.dalipen.com"):
14
14
  headers = {
15
15
  'Connection': 'close',
16
- 'Usertoken': user_token,
17
- 'Authorization': f"Bearer {author}"
16
+ 'Usertoken': g_user_token,
17
+ 'Authorization': f"Bearer {g_author}"
18
18
  }
19
19
  url = f"https://{domain}/{func}"
20
20
  try:
@@ -44,8 +44,17 @@ def _aigc_post(func, params, files={}, timeout=10):
44
44
  return status, msg, data
45
45
  return _domain_post(func, params, files, timeout, "aigc.zjtemplate.com")
46
46
 
47
+ def checkLicense():
48
+ req = { }
49
+ r1, r2, r3 = _aigc_post("aigc/task/checkLicense", req)
50
+ if r1 != 0:
51
+ raise Exception(f"check license fail!, reason={r2}")
52
+ return r3
53
+
47
54
  def set_authorization(author):
48
55
  store.save_authorization(author)
56
+ global g_user_token, g_author
57
+ g_user_token, g_author = store.get_token_and_authorization()
49
58
  if checkLicense():
50
59
  print("✅ license check success")
51
60
  else:
@@ -103,6 +112,7 @@ def GetTask(widget_list):
103
112
  "limit": 1,
104
113
  "extend": store.extend()
105
114
  }
115
+ print("====== request gettask: ", req)
106
116
  r1, r2, r3 = _aigc_post("aigc/task/getTask", req)
107
117
  if r1 != 0:
108
118
  return []
@@ -440,6 +440,7 @@ def UpdateWidgetFromPypi():
440
440
  #update
441
441
  widgetReInstall(py_package, package_url, local_path)
442
442
  widgetUpdateNotify(py_package, local_version, remote_version)
443
+ store.updateWidgetVersion(it, remote_version)
443
444
 
444
445
  # 如果daemon之前在运行且应该启动,则重启
445
446
  if daemon_manager_instance and daemon_status.get("running", False):
@@ -500,6 +501,8 @@ def installWidget(name):
500
501
  widgetReInstall(name, package_url, local_path)
501
502
  widgetInstallNotify(name, remote_version)
502
503
  addWidgetToEnv(name, True)
504
+ store.updateWidgetVersion(widgetid, remote_version)
503
505
  print(f"成功安装 {name} {remote_version}")
504
506
  else:
505
- print(f"本地已是最新版本 {remote_version}")
507
+ print(f"本地已是最新版本 {remote_version}")
508
+
@@ -134,6 +134,15 @@ def enableWidget(widget_id):
134
134
  unblock_one(widget_id)
135
135
  sp.write(read_data)
136
136
 
137
+ def updateWidgetVersion(widget_id, version):
138
+ sp = Store()
139
+ read_data = sp.read()
140
+ if "widgets" not in read_data or not isinstance(read_data["widgets"], dict):
141
+ read_data["widgets"] = {}
142
+ widgetsMap = read_data["widgets"]
143
+ if widget_id in widgetsMap:
144
+ widgetsMap[widget_id]["version"] = version
145
+ sp.write(read_data)
137
146
  #============================== device id ================================
138
147
 
139
148
  def writeDeviceInfo(data):
@@ -155,7 +164,7 @@ def extend():
155
164
  _genExtend()
156
165
  elif read_data["extend"].get("device_id", "") != read_data.get("deviceInfo", {}).get("device_id", ""):
157
166
  _genExtend()
158
- elif read_data["extend"].get("app", "") == "ryry-cli 6.3":
167
+ elif read_data["extend"].get("app", "") == "ryry-cli 6.8":
159
168
  _genExtend()
160
169
  else:
161
170
  _genExtend()
@@ -230,4 +239,6 @@ def save_user_token(user_token):
230
239
  sp = Store()
231
240
  read_data = sp.read()
232
241
  read_data["Authorization"] = user_token
233
- sp.write(read_data)
242
+ sp.write(read_data)
243
+
244
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 6.3
3
+ Version: 6.8
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 = "6.3"
6
+ ryry_version = "6.8"
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