ryry-cli 4.13__tar.gz → 4.15__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.13/ryry_cli.egg-info → ryry_cli-4.15}/PKG-INFO +1 -1
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/constant.py +2 -2
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/ryry_service.py +0 -1
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/store.py +2 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/upload.py +17 -14
- {ryry_cli-4.13 → ryry_cli-4.15/ryry_cli.egg-info}/PKG-INFO +1 -1
- {ryry_cli-4.13 → ryry_cli-4.15}/setup.py +1 -1
- {ryry_cli-4.13 → ryry_cli-4.15}/LICENSE +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/README.md +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/__init__.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/daemon_base.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/daemon_manager.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/main.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/ryry_widget.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/script_template/daemon.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/script_template/main.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/script_template/run.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/server_func.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/shared_memory.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/task.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/taskUtils.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry/utils.py +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-4.13 → ryry_cli-4.15}/setup.cfg +0 -0
|
@@ -155,6 +155,8 @@ 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.15":
|
|
159
|
+
_genExtend()
|
|
158
160
|
else:
|
|
159
161
|
_genExtend()
|
|
160
162
|
return GLOBAL_EXT_JSON
|
|
@@ -64,13 +64,7 @@ def upload(src, taskUUID=None, needTranscode=False, keepItAlways=False, addition
|
|
|
64
64
|
uuid_has_country_info = mecord_taskUtils.taskCountryWithUUID(taskUUID)
|
|
65
65
|
if uuid_has_country_info:
|
|
66
66
|
#这里不区分meco还是mecord,请求meco/mecord后端接口时,根据本地状态来向不同服务器请求
|
|
67
|
-
targetDomain = "https://m.mecoai.cn/"
|
|
68
|
-
|
|
69
|
-
if (targetDomain == None or len(targetDomain) <= 0) and (uploadPath and len(uploadPath) > 0):
|
|
70
|
-
#找不到domain,但是有uploadPath的情况下,应该是ftp配置,这里做修正
|
|
71
|
-
if '/mnt/NAS/mcn/' not in uploadPath:
|
|
72
|
-
uploadPath = os.path.join('/mnt/NAS/mcn/', uploadPath)
|
|
73
|
-
|
|
67
|
+
targetDomain = "https://m.mecoai.cn/"
|
|
74
68
|
|
|
75
69
|
needDeleteSrc = False
|
|
76
70
|
if needTranscode:
|
|
@@ -115,6 +109,11 @@ def uploadByDomain(src, targetDomain, taskUUID, keepItAlways=False, uploadPath=N
|
|
|
115
109
|
if "mnt/NAS/mcn" in upload_path:
|
|
116
110
|
ftp_config = getFtpConfig("183.6.90.205")
|
|
117
111
|
return ftpUpload(src, file_name, ftp_config, upload_path)
|
|
112
|
+
elif (targetDomain == None or len(targetDomain) <= 0) and (uploadPath and len(uploadPath) > 0):
|
|
113
|
+
#找不到domain,但是有uploadPath的情况下,默认走ftp
|
|
114
|
+
ftp_config = getFtpConfig("183.6.90.205")
|
|
115
|
+
return ftpUpload(src, file_name, ftp_config, upload_path)
|
|
116
|
+
|
|
118
117
|
|
|
119
118
|
from ryry import ryry_webapi
|
|
120
119
|
return ryry_webapi.upload(src, ext, keepItAlways)
|
|
@@ -191,7 +190,7 @@ def deepFtpUpload(file, new_file_name, ftp, writepath, readpath):
|
|
|
191
190
|
|
|
192
191
|
with open(file, 'rb') as f:
|
|
193
192
|
ftp.storbinary(f'STOR {new_file_name}', f)
|
|
194
|
-
return f"{readpath}/{new_file_name}"
|
|
193
|
+
return f"{readpath}/{writepath}/{new_file_name}"
|
|
195
194
|
|
|
196
195
|
def ftpUpload(file, new_file_name, subdomain, upload_path=""):
|
|
197
196
|
ip = subdomain["host"]
|
|
@@ -214,7 +213,9 @@ def ftpUpload(file, new_file_name, subdomain, upload_path=""):
|
|
|
214
213
|
if upload_path:
|
|
215
214
|
if upload_path[0:1] == "/":
|
|
216
215
|
upload_path = upload_path[1:]
|
|
217
|
-
|
|
216
|
+
if "mnt/NAS/mcn/" in upload_path:
|
|
217
|
+
upload_path = upload_path.replace("mnt/NAS/mcn/", "")
|
|
218
|
+
s = deepFtpUpload(file, new_file_name, ftp, upload_path, readpath)
|
|
218
219
|
else:
|
|
219
220
|
s = deepFtpUpload(file, new_file_name, ftp, writepath, readpath)
|
|
220
221
|
|
|
@@ -228,7 +229,9 @@ def ftpUpload(file, new_file_name, subdomain, upload_path=""):
|
|
|
228
229
|
if upload_path:
|
|
229
230
|
if upload_path[0:1] == "/":
|
|
230
231
|
upload_path = upload_path[1:]
|
|
231
|
-
|
|
232
|
+
if "mnt/NAS/mcn/" in upload_path:
|
|
233
|
+
upload_path = upload_path.replace("mnt/NAS/mcn/", "")
|
|
234
|
+
s = deepFtpUpload(file, new_file_name, ftp, upload_path, readpath)
|
|
232
235
|
else:
|
|
233
236
|
s = deepFtpUpload(file, new_file_name, ftp, writepath, readpath)
|
|
234
237
|
|
|
@@ -263,16 +266,16 @@ ftp_192_168_50_12={
|
|
|
263
266
|
"port": 21,
|
|
264
267
|
"username" : "mcn",
|
|
265
268
|
"password" : "meco@2024+",
|
|
266
|
-
"writepath" : "
|
|
267
|
-
"readpath" : "ftp://192.168.50.12/mnt/NAS/mcn
|
|
269
|
+
"writepath" : "cache",
|
|
270
|
+
"readpath" : "ftp://192.168.50.12/mnt/NAS/mcn"
|
|
268
271
|
}
|
|
269
272
|
ftp_183_6_90_205={
|
|
270
273
|
"host" : "183.6.90.205",
|
|
271
274
|
"port": 2221,
|
|
272
275
|
"username" : "mcn",
|
|
273
276
|
"password" : "meco@2024+",
|
|
274
|
-
"writepath" : "
|
|
275
|
-
"readpath" : "ftp://183.6.90.205/mnt/NAS/mcn
|
|
277
|
+
"writepath" : "cache",
|
|
278
|
+
"readpath" : "ftp://183.6.90.205/mnt/NAS/mcn"
|
|
276
279
|
}
|
|
277
280
|
|
|
278
281
|
from ryry import utils
|
|
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
|