mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42:01 -03:30
nc-previews: improvements
This commit is contained in:
parent
ccb6fc12e5
commit
e03b095325
@ -11,7 +11,21 @@
|
||||
|
||||
configure()
|
||||
{
|
||||
sudo -u www-data php /var/www/nextcloud/occ preview:generate-all
|
||||
[[ "$CLEAN" == "yes" ]] && {
|
||||
local datadir
|
||||
datadir=$( ncc config:system:get datadirectory ) || {
|
||||
echo "data dir not found";
|
||||
return 1;
|
||||
}
|
||||
|
||||
rm -r "$datadir"/appdata_*/preview/* &>/dev/null
|
||||
mysql nextcloud <<<"delete from oc_filecache where path like \"appdata_%/preview/%\""
|
||||
ncc files:scan-app-data -n
|
||||
}
|
||||
|
||||
[[ "$INCREMENTAL" == "yes" ]] && { ncc preview:pre-generate -n -vvv; return $?; }
|
||||
|
||||
ncc preview:generate-all -n -v -p "$PATH1"
|
||||
}
|
||||
|
||||
install() { :; }
|
||||
|
||||
@ -3,7 +3,26 @@
|
||||
"name": "Nc-previews",
|
||||
"title": "nc-previews",
|
||||
"description": "Generate previews for the gallery",
|
||||
"info": "This will make browsing the gallery much more smooth.\nFor big collections, this can take a LONG time, depending on your hardware",
|
||||
"info": "This will make browsing the gallery much more smooth.\nFor big collections, this can take a LONG time, depending on your hardware\nOptionally, include a path in the form '/_user_/files/_path_' (incremental only)",
|
||||
"infotitle": "",
|
||||
"params": []
|
||||
"params": [
|
||||
{
|
||||
"id": "CLEAN",
|
||||
"name": "Clean first",
|
||||
"value": "no",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"id": "INCREMENTAL",
|
||||
"name": "Incremental",
|
||||
"value": "yes",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"id": "PATH1",
|
||||
"name": "Path",
|
||||
"value": "",
|
||||
"suggest": "/ncp/files/Documents"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user