ryry-cli 2.70__tar.gz → 2.71__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-2.70 → ryry_cli-2.71}/PKG-INFO +1 -1
- ryry_cli-2.71/ryry/constant.py +4 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/ryry_webapi.py +7 -4
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/upload.py +2 -2
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry_cli.egg-info/PKG-INFO +1 -1
- {ryry_cli-2.70 → ryry_cli-2.71}/setup.py +1 -1
- ryry_cli-2.70/ryry/constant.py +0 -4
- {ryry_cli-2.70 → ryry_cli-2.71}/LICENSE +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/README.md +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/__init__.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/main.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/ryry_widget.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/server_func.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/store.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/task.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/taskUtils.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry/utils.py +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-2.70 → ryry_cli-2.71}/setup.cfg +0 -0
|
@@ -178,18 +178,21 @@ def TaskCancel(taskUUID):
|
|
|
178
178
|
return False
|
|
179
179
|
return True
|
|
180
180
|
|
|
181
|
-
def _upload(localFilePath, ext):
|
|
181
|
+
def _upload(localFilePath, ext, keep_it_always=False):
|
|
182
182
|
with open(localFilePath, "rb") as f:
|
|
183
183
|
files = { 'file':f }
|
|
184
184
|
params = { 'ext':ext }
|
|
185
|
-
|
|
185
|
+
if keep_it_always:
|
|
186
|
+
r1, r2, r3 = _aigc_post("upload/datanet", params, files=files,timeout=100)
|
|
187
|
+
else:
|
|
188
|
+
r1, r2, r3 = _aigc_post("upload/create", params, files=files,timeout=100)
|
|
186
189
|
if r1 != 0:
|
|
187
190
|
raise Exception(f"upload fail!, reason={r2}")
|
|
188
191
|
return r3
|
|
189
192
|
|
|
190
|
-
def upload(localFilePath, ext):
|
|
193
|
+
def upload(localFilePath, ext, keep_it_always=False):
|
|
191
194
|
try:
|
|
192
|
-
return _upload(localFilePath, ext)
|
|
195
|
+
return _upload(localFilePath, ext, keep_it_always)
|
|
193
196
|
except:
|
|
194
197
|
pass
|
|
195
198
|
from mecord import upload as mecord_upload
|
|
@@ -43,7 +43,7 @@ def additionalUrl(srcFile, ossUrl):
|
|
|
43
43
|
except:
|
|
44
44
|
return ossUrl
|
|
45
45
|
|
|
46
|
-
def upload(src, taskUUID=None, timeout=300, needTranscode=True):
|
|
46
|
+
def upload(src, taskUUID=None, timeout=300, needTranscode=True, keep_it_always=False):
|
|
47
47
|
import os
|
|
48
48
|
from pathlib import Path
|
|
49
49
|
from ryry import taskUtils
|
|
@@ -68,7 +68,7 @@ def upload(src, taskUUID=None, timeout=300, needTranscode=True):
|
|
|
68
68
|
else:
|
|
69
69
|
from ryry import ryry_webapi
|
|
70
70
|
file_name = Path(newSrc).name
|
|
71
|
-
ossurl = ryry_webapi.upload(newSrc, os.path.splitext(file_name)[-1][1:])
|
|
71
|
+
ossurl = ryry_webapi.upload(newSrc, os.path.splitext(file_name)[-1][1:], keep_it_always)
|
|
72
72
|
|
|
73
73
|
ossurl = additionalUrl(newSrc, ossurl)
|
|
74
74
|
if needDeleteSrc:
|
ryry_cli-2.70/ryry/constant.py
DELETED
|
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
|