Report more platform names, and clean up blobs on default on iOS like on Android.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4578 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2023-10-25 16:41:39 +00:00
parent d8551ab732
commit c299c1432c
2 changed files with 9 additions and 2 deletions

View File

@ -74,12 +74,12 @@ const k_global_settings = {
}, },
blob_fetch_age_seconds: { blob_fetch_age_seconds: {
type: 'integer', type: 'integer',
default_value: (platform() == 'android' ? 0.5 * 365 * 24 * 60 * 60 : undefined), default_value: (platform() == 'android' || platform() == 'iphone' ? 0.5 * 365 * 24 * 60 * 60 : undefined),
description: 'Only blobs mentioned more recently than this age will be automatically fetched.', description: 'Only blobs mentioned more recently than this age will be automatically fetched.',
}, },
blob_expire_age_seconds: { blob_expire_age_seconds: {
type: 'integer', type: 'integer',
default_value: (platform() == 'android' ? 1.0 * 365 * 24 * 60 * 60 : undefined), default_value: (platform() == 'android' || platform() == 'iphone' ? 1.0 * 365 * 24 * 60 * 60 : undefined),
description: 'Blobs older than this will be automatically deleted.', description: 'Blobs older than this will be automatically deleted.',
}, },
}; };

View File

@ -706,6 +706,13 @@ static JSValue _tf_task_platform(JSContext* context, JSValueConst this_val, int
return JS_NewString(context, "windows"); return JS_NewString(context, "windows");
#elif defined(__ANDROID__) #elif defined(__ANDROID__)
return JS_NewString(context, "android"); return JS_NewString(context, "android");
#elif defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_OS_IPHONE
return JS_NewString(context, "iphone");
#else
return JS_NewString(context, "macos");
#endif
#elif defined(__linux__) #elif defined(__linux__)
return JS_NewString(context, "linux"); return JS_NewString(context, "linux");
#else #else