ryry-cli 4.30__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.
- {ryry_cli-4.30/ryry_cli.egg-info → ryry_cli-4.31}/PKG-INFO +1 -1
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/constant.py +2 -2
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/ryry_webapi.py +6 -2
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/store.py +1 -1
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/upload.py +13 -4
- {ryry_cli-4.30 → ryry_cli-4.31/ryry_cli.egg-info}/PKG-INFO +1 -1
- {ryry_cli-4.30 → ryry_cli-4.31}/setup.py +1 -1
- {ryry_cli-4.30 → ryry_cli-4.31}/LICENSE +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/README.md +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/__init__.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/daemon_base.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/daemon_manager.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/main.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/proxy_manager.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/ryry_service.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/ryry_widget.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/script_template/daemon.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/script_template/main.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/script_template/run.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/server_func.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/shared_memory.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/task.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/taskUtils.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry/utils.py +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-4.30 → ryry_cli-4.31}/setup.cfg +0 -0
|
@@ -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,
|
|
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.
|
|
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,
|
|
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,
|
|
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
|
|
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
|