ryry-cli 4.29__tar.gz → 4.31__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-4.29/ryry_cli.egg-info → ryry_cli-4.31}/PKG-INFO +1 -1
  2. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/constant.py +2 -2
  3. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/ryry_webapi.py +6 -2
  4. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/store.py +1 -1
  5. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/upload.py +13 -4
  6. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/utils.py +21 -2
  7. {ryry_cli-4.29 → ryry_cli-4.31/ryry_cli.egg-info}/PKG-INFO +1 -1
  8. {ryry_cli-4.29 → ryry_cli-4.31}/setup.py +1 -1
  9. {ryry_cli-4.29 → ryry_cli-4.31}/LICENSE +0 -0
  10. {ryry_cli-4.29 → ryry_cli-4.31}/README.md +0 -0
  11. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/__init__.py +0 -0
  12. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/daemon_base.py +0 -0
  13. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/daemon_manager.py +0 -0
  14. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/main.py +0 -0
  15. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/proxy_manager.py +0 -0
  16. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/ryry_server_socket.py +0 -0
  17. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/ryry_service.py +0 -0
  18. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/ryry_widget.py +0 -0
  19. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/script_template/__init__.py +0 -0
  20. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/script_template/daemon.py +0 -0
  21. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/script_template/main.py +0 -0
  22. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/script_template/run.py +0 -0
  23. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/server_func.py +0 -0
  24. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/shared_memory.py +0 -0
  25. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/task.py +0 -0
  26. {ryry_cli-4.29 → ryry_cli-4.31}/ryry/taskUtils.py +0 -0
  27. {ryry_cli-4.29 → ryry_cli-4.31}/ryry_cli.egg-info/SOURCES.txt +0 -0
  28. {ryry_cli-4.29 → ryry_cli-4.31}/ryry_cli.egg-info/dependency_links.txt +0 -0
  29. {ryry_cli-4.29 → ryry_cli-4.31}/ryry_cli.egg-info/entry_points.txt +0 -0
  30. {ryry_cli-4.29 → ryry_cli-4.31}/ryry_cli.egg-info/requires.txt +0 -0
  31. {ryry_cli-4.29 → ryry_cli-4.31}/ryry_cli.egg-info/top_level.txt +0 -0
  32. {ryry_cli-4.29 → ryry_cli-4.31}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 4.29
3
+ Version: 4.31
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.29"
3
- app_bulld_anchor="Noh_2025-07-29 16:28:48.477084"
2
+ app_version="4.31"
3
+ app_bulld_anchor="Noh_2025-07-30 20:11:30.483060"
4
4
  app_name="ryry-cli"
5
5
  import sys, os
6
6
  if getattr(sys, 'frozen', False):
@@ -282,14 +282,18 @@ def _changeDomain(url, fix_domain):
282
282
  # mecord_netloc = 'm.mecordai.com'
283
283
  # mecord_url = parsed_url._replace(netloc=fix_domain)
284
284
 
285
- def upload(localFilePath, ext, keepItAlways=False):
285
+ def upload(localFilePath, ext, keepItAlways=False, needTranscode=False, additionalUrl=False):
286
286
  try:
287
287
  return _upload(localFilePath, ext, keepItAlways=False)
288
288
  except:
289
289
  pass
290
290
  from mecord import upload as mecord_upload
291
291
  try:
292
- url = mecord_upload.upload(localFilePath, None, "sg")
292
+ url = mecord_upload.upload(localFilePath,
293
+ None,
294
+ "sg",
295
+ needTranscode=needTranscode,
296
+ needAddtionUrl=True) #mecord会使用签名信息,强制needAddtionUrl
293
297
  return _changeDomain(url, "m.mecordai.com")
294
298
  except:
295
299
  pass
@@ -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.29":
158
+ elif read_data["extend"].get("app", "") == "ryry-cli 4.31":
159
159
  _genExtend()
160
160
  else:
161
161
  _genExtend()
@@ -73,7 +73,11 @@ def upload(src, taskUUID=None, needTranscode=False, keepItAlways=False, addition
73
73
  newSrc = src
74
74
 
75
75
  # 根据targetDomain判断使用不同的上传逻辑
76
- ossurl = uploadByDomain(newSrc, targetDomain, taskUUID, keepItAlways=keepItAlways, uploadPath=uploadPath)
76
+ ossurl = uploadByDomain(newSrc, targetDomain, taskUUID,
77
+ keepItAlways=keepItAlways,
78
+ uploadPath=uploadPath,
79
+ needTranscode=needTranscode,
80
+ additionalUrl=additionalUrl)
77
81
 
78
82
  if additionalUrl:
79
83
  ossurl = additionalUrl(newSrc, ossurl)
@@ -81,7 +85,7 @@ def upload(src, taskUUID=None, needTranscode=False, keepItAlways=False, addition
81
85
  os.remove(newSrc)
82
86
  return ossurl
83
87
 
84
- def uploadByDomain(src, targetDomain, taskUUID, keepItAlways=False, uploadPath=None):
88
+ def uploadByDomain(src, targetDomain, taskUUID, keepItAlways=False, uploadPath=None, needTranscode=False, additionalUrl=False):
85
89
  import os
86
90
  from pathlib import Path
87
91
  import uuid
@@ -95,7 +99,9 @@ def uploadByDomain(src, targetDomain, taskUUID, keepItAlways=False, uploadPath=N
95
99
  upload_path = uploadPath
96
100
  if isMecordConfig(parsed_domain):
97
101
  from mecord import upload as mecord_upload
98
- return mecord_upload.upload(src, taskUUID)
102
+ return mecord_upload.upload(src, taskUUID,
103
+ needTranscode=needTranscode,
104
+ needAddtionUrl=True) #mecord会使用签名信息,强制needAddtionUrl
99
105
 
100
106
  oss_config = getOssConfig(parsed_domain)
101
107
  if oss_config:
@@ -119,7 +125,10 @@ def uploadByDomain(src, targetDomain, taskUUID, keepItAlways=False, uploadPath=N
119
125
  return ftpUpload(src, file_name, ftp_config, upload_path)
120
126
 
121
127
  from ryry import ryry_webapi
122
- return ryry_webapi.upload(src, ext, keepItAlways)
128
+ return ryry_webapi.upload(src, ext,
129
+ keepItAlways=keepItAlways,
130
+ needTranscode=needTranscode,
131
+ additionalUrl=additionalUrl)
123
132
 
124
133
  def parseDomainAndPath(targetDomain):
125
134
  from urllib.parse import urlparse
@@ -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 = "TFRBSTV0THNlRkFYWTMzSkE3eldEZjRv"
235
- K2 = "MlV0ekE5Y0huZk5kWk90eExWdWhNOFNPejVIRWR2"
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")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 4.29
3
+ Version: 4.31
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.29"
6
+ ryry_version = "4.31"
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