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

Dynamic list values are not cleaned after script execution #385

Closed
bugy opened this issue Dec 26, 2020 · 13 comments
Closed

Dynamic list values are not cleaned after script execution #385

bugy opened this issue Dec 26, 2020 · 13 comments

Comments

@bugy
Copy link
Owner

bugy commented Dec 26, 2020

Steps to reproduce:

  1. Create a list parameter, which depends on another parameter (let say either 1 -> [A, B], 2 -> [C, D])
  2. Select value 1, so that the parameter has list [A,B]
  3. Select value A
  4. Execute the script, and wait for finish
  5. Change to value 2

Actual result: the list has [A, C, D] parameters
Expected result: the list has [C, D] parameters only

Demo: https://gph.is/g/Evp9OXV

Reported by @autogun

@bugy bugy added the bug label Dec 26, 2020
@bugy bugy added this to the 1.17.0 milestone Dec 26, 2020
bugy added a commit that referenced this issue Jan 6, 2021
…ith updating parameters one by one. + improved forcedValues for obsolete values with proper validation error and automatic cleanup
@bugy bugy added the resolved label Jan 6, 2021
@bugy
Copy link
Owner Author

bugy commented Jan 6, 2021

Done
Additionally I improved some other things

  • Loading dependant values for running script (or for predefined parameters) is much more stable now, and considers "included" script parameters
  • Now "obsolete values" in comboboxes are disabled and show validation error
  • Switching between execution tabs made faster (removed extra server request)
  • Multiselect comboboxes header is improved

@antonellocaroli
Copy link

@bugy

I hope this does not mean that:

if in field 1 I have a list of its values

and in field two I have to get a list based on the value I choose in the 1 item....
field 2 lists the results according to the list in field 1 and not according to the value chosen.
Because from a test I've done it seems to me that it works just like that...and this would be a mess....

@antonellocaroli
Copy link

@bugy

this is the example I used:

{
"name": "Audiocard",
"param": "-t",
"type": "list",
"required": true,
"values": {
"script": "/opt/.gentooplayer/web/scripts/script/card/card.sh"
},
"description": "Select AudioCard"
},
{
"name": "Max Sample rate",
"param": "-R",
"type": "list",
"values": {
"script": "/opt/.gentooplayer/web/scripts/script/card/maxrate.sh ${Audiocard}"
},
"required": true,
"description": "Select Max SR dac supported"
},

the first parameter lists the audio outputs...
choosing the audio output in the second parameter displays the maximum supported frequency.
but now it lists all the maximum frequencies.....for each audio output listed in parameter1

@bugy
Copy link
Owner Author

bugy commented Jan 6, 2021 via email

@bugy
Copy link
Owner Author

bugy commented Jan 7, 2021

Hi @antonellocaroli could you create some minimal reproducible config and a script, please?
For me everything works fine :(

@antonellocaroli
Copy link

Hi @bugy ,

ok, I'll check again....maybe it's a problem in the script....

@BConcept59
Copy link

Hi,

I have a little problem.

I use the dynamic list values but it isn't send full "text" of combobox.

Combobox N°1 (Naming : Etablissement)

  • Residence Tulopre
  • Residence Tarlure
  • Residence Tart Opera

i use ${Etablissement} at the end in script line, but in value in my param in script is only "residence", i don't have more text.

Do you have idea ?

Sorry for my English, i'm not very good.

@bugy
Copy link
Owner Author

bugy commented Mar 25, 2021

Hi @BConcept59, could you try wrapping the ${Etablissement} in quotes (')?
e.g. "script": "my_script.py '${Etablissement}'"

@BConcept59
Copy link

BConcept59 commented Mar 26, 2021

Hi @bugy , i try wrapping in quotes ( ' ) and adding ( " ) in my command line, it's ok !

Bad : powershell -ExecutionPolicy Unrestricted -Command ./src/features/sc_script_003.ps1 ${Etablissement}

Good : powershell -ExecutionPolicy Unrestricted -Command "./src/features/sc_script_003.ps1 '${Etablissement}'"

@bugy
Copy link
Owner Author

bugy commented Mar 26, 2021 via email

@BConcept59
Copy link

Thank for your help @bugy !!

I running on Windows.

@bugy
Copy link
Owner Author

bugy commented Mar 26, 2021 via email

@bugy
Copy link
Owner Author

bugy commented Mar 26, 2021

Hi @BConcept59. I saw your original message, with "this isn't ok." and wanted to check.
However, it seems, that quotes are working fine for you.

I created a separate ticket for making the behaviour less confusing: #420

@bugy bugy closed this as completed Mar 16, 2023
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

3 participants