toniebox-reverse-engineering / teddycloud

teddyCloud is an open source server replacement for the Boxine Cloud
https://toniebox-reverse-engineering.github.io/docs/tools/teddycloud/
GNU General Public License v2.0
478 stars 36 forks source link

extend fileInfoV2-API with hide flag #234

Open henryk86 opened 3 weeks ago

henryk86 commented 3 weeks ago

I would like to display a hint in the filebrowser, that a tag/taf is actually marked as hidden. The hide information is stored within the json file. Can this information be also provided in the fileInfoV2-API result per entry?

Default for that flag would be false.

SciLor commented 1 week ago

only tags can be hidden, not TAFs

henryk86 commented 1 week ago

Then only for the tags ;) in the content folder

henryk86 commented 1 week ago
src/handler_api.c: In function ‘handleApiFileIndexV2’: src/handler_api.c:703:71: error: passing argument 3 of ‘cJSON_AddStringToObject’ makes pointer from integer without a cast [-Werror=int-conversion] 703 cJSON_AddStringToObject(jsonEntry, "hide", contentJson.hide); ~~~^~~~~
bool_t {aka int}

In file included from src/handler_api.c:19: cJSON/cJSON.h:269:112: note: expected ‘const char const’ but argument is of type ‘bool_t’ {aka ‘int’} 269 | CJSON_PUBLIC(cJSON) cJSON_AddStringToObject(cJSON const object, const char const name, const char * const string); | ~~~~~^~~~ cc1: all warnings being treated as errors make: *** [Makefile:506: obj/src/handler_api.o] Error 1

henryk86 commented 1 week ago

thats the goal of this addition:

image

if i saw it correctly, the flag is added only in the json file case, Would it be possible to also add it in the parent level like the tonieinfo is already? right after on same level as "isDir"?

image