Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server_file type #301

Closed
antonellocaroli opened this issue May 23, 2020 · 2 comments
Closed

server_file type #301

antonellocaroli opened this issue May 23, 2020 · 2 comments

Comments

@antonellocaroli
Copy link

antonellocaroli commented May 23, 2020

I have a problem with a json file:


{
"name": "Select Directory file media",
"param": "-b",
"type": "server_file",
"file_type": "dir",
"file_dir": "/media",
"file_recursive": true,
"description": "Select Directory that contains the files"
},
{
"name": "Select file to copy",
"param": "-a",
"type": "multiselect",
"values": {
"script": "ls -1 /media/${Select Directory file media}"
},
"description": "Select file"
}


I have this mistake:


2020-05-23 10:06:14,813 [root.INFO] Starting GentooPlayer, v1.16.0-master@aaf8687
2020-05-23 10:06:14,839 [asyncio.DEBUG] Using selector: EpollSelector
Server is running on: http://0.0.0.0:5000
2020-05-23 10:06:18,311 [identification.INFO] Assigned user_id=192.168.178.22-6abfacc97aa84387 to {'ip': '192.168.178.22', 'hostname': 'GentooServer.fritz.box'}
2020-05-23 10:06:18,362 [tornado.access.INFO] 304 GET /index.html (192.168.178.22) 56.91ms
2020-05-23 10:06:18,389 [tornado.access.INFO] 304 GET /css/chunk-index-vendors.47bd9eac.css (192.168.178.22) 7.83ms
2020-05-23 10:06:18,404 [tornado.access.INFO] 304 GET /css/index.d5dd897a.css (192.168.178.22) 12.26ms
2020-05-23 10:06:18,412 [tornado.access.INFO] 304 GET /js/chunk-index-vendors.3dee9c44.js (192.168.178.22) 16.72ms
2020-05-23 10:06:18,419 [tornado.access.INFO] 304 GET /js/index.83000625.js (192.168.178.22) 20.47ms
2020-05-23 10:06:18,446 [tornado.access.INFO] 304 GET /favicon.ico (192.168.178.22) 5.20ms
2020-05-23 10:06:18,485 [tornado.access.INFO] 304 GET /auth/info (192.168.178.22) 4.06ms
2020-05-23 10:06:18,491 [tornado.access.INFO] 304 GET /conf (192.168.178.22) 4.21ms
2020-05-23 10:06:18,546 [tornado.access.INFO] 304 GET /scripts (192.168.178.22) 52.79ms
2020-05-23 10:06:18,552 [tornado.access.INFO] 304 GET /executions/active (192.168.178.22) 4.85ms
2020-05-23 10:06:18,564 [tornado.access.INFO] 101 GET /scripts/Copy%20File%20in%20RamdiskMusic (192.168.178.22) 6.45ms
2020-05-23 10:06:18,587 [tornado.access.INFO] 304 GET /img/titleBackground_small.8d99a14e.jpg (192.168.178.22) 7.51ms
2020-05-23 10:06:19,877 [tornado.access.INFO] 200 GET /scripts/Copy%20File%20in%20RamdiskMusic/Select%20Directory%20file%20media/list-files?id=171c5463-a50e-496d-8421-1ed5ae425e65 (192.168.178.22) 6.51ms
2020-05-23 10:06:22,258 [list_values.WARNING] Failed to execute script. Execution failed. Code 2: ls: cannot access '/media/[brrrr]': No such file or directory

2020-05-23 10:06:28,076 [tornado.access.INFO] 304 GET /scripts/Copy%20File%20in%20RamdiskMusic/Select%20Directory%20file%20media/list-files?id=171c5463-a50e-496d-8421-1ed5ae425e65 (192.168.178.22) 7.32ms
2020-05-23 10:06:29,345 [tornado.access.INFO] 200 GET /scripts/Copy%20File%20in%20RamdiskMusic/Select%20Directory%20file%20media/list-files?path=brrrr&id=171c5463-a50e-496d-8421-1ed5ae425e65 (192.168.178.22) 6.99ms
2020-05-23 10:06:31,094 [list_values.WARNING] Failed to execute script. Execution failed. Code 2: ls: cannot access '/media/[brrrr,': No such file or directory
ls: cannot access 'pppp]': No such file or directory


the paths are these:


ls -1 /media//
'/media/brrrr/Nuovo documento di testo (2).txt'
'/media/brrrr/Nuovo documento di testo.txt'

/media/brrrr/pppp:
prov


@bugy bugy added the bug label May 23, 2020
@bugy
Copy link
Owner

bugy commented May 23, 2020

Hi, thanks for reporting!

@bugy
Copy link
Owner

bugy commented May 23, 2020

Fixed.
Please note, that Script server will put the full path to the file (including file_dir) for substitution, so in your case, your would need to write dependant parameter like "script": "ls -1 ${Select Directory file media}" (without /media)

@bugy bugy added the resolved label May 23, 2020
@bugy bugy added this to the 1.16.0 milestone May 23, 2020
antonellocaroli pushed a commit to antonellocaroli/script-server that referenced this issue Aug 1, 2020
@bugy bugy closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants