nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
455 stars 57 forks source link

occ config does not working #267

Closed horphi0815 closed 2 years ago

horphi0815 commented 2 years ago

Nextcloud 23.0.0.

root@e5fe1d8732ce:/# occ config:app:set --value="32 64 1024" previewgenerator squareSizes Too many arguments, expected arguments "command" "app" "name". config:app:set [--output [OUTPUT]] [--value VALUE] [--update-only] [--]

only accept, but result is empty root@e5fe1d8732ce:/# occ config:app:set --value="32,64" previewgenerator squareSizes Config value squareSizes for app previewgenerator set to 32,64

root@e5fe1d8732ce:/# occ config:app:get previewgenerator squareSizes root@e5fe1d8732ce:/#

st3iny commented 2 years ago

It's previewgenerator instead of preview in the get command.

Please run occ config:app:get previewgenerator squareSizes.

horphi0815 commented 2 years ago

@st3iny Thx for this hint, but this does not solve the problem... root@e5fe1d8732ce:/# occ config:app:get previewgenerator squareSizes 32,64

i would like to configure previewgenerator, to only compute the prefered solutions grafik

horphi0815 commented 2 years ago

@st3iny some news regarding this issue?

BR

florie1706 commented 2 years ago

+1

st3iny commented 2 years ago

Keep in mind, that this setting only affects previews which are (pre-)generated by the app. If a generation is triggered by any other source, this setting will be ignored. E.g. a larger preview will be generated upon viewing the file in the files app.

Please refer to https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#previews for more information about configuring previews globally.

st3iny commented 2 years ago

PS: I just looked at the code and realized that the sizes have to be separated by a space.

E.g. occ config:app:set --value="32 64" previewgenerator squareSizes

horphi0815 commented 2 years ago

But if i set the values separated by space, the error appears Too many arguments, expected arguments "command" "app" "name". config:app:set [--output [OUTPUT]] [--value VALUE] [--update-only] [--]

the resolution of the parameters result to the issue

horphi0815 commented 2 years ago

root@7275c2e8b0f7:/# occ config:app:set --value='32 64 1024' previewgenerator squareSizes Too many arguments, expected arguments "command" "app" "name".
config:app:set [--output [OUTPUT]] [--value VALUE] [--update-only] [--]

root@7275c2e8b0f7:/# occ config:app:set --value='32,64,1024' previewgenerator squareSizes Config value squareSizes for app previewgenerator set to 32,64,1024

st3iny commented 2 years ago

This could be a problem with the quoting of the argument. I'll give this a try later.

Rakhmanov commented 2 years ago

Related https://github.com/linuxserver/docker-nextcloud/issues/179. Solved by escaping quotes. Like : occ config:app:set --value=\"32 64\" previewgenerator squareSizes