diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 07:52:13 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 07:52:13 +0900 |
| commit | 2a5c19cd0133451b8279843024e2316053ca55c7 (patch) | |
| tree | ed565caa2d17ad8a8072ec3396b99a00895343c0 /src/models | |
| parent | :art: (diff) | |
| download | sharkey-2a5c19cd0133451b8279843024e2316053ca55c7.tar.gz sharkey-2a5c19cd0133451b8279843024e2316053ca55c7.tar.bz2 sharkey-2a5c19cd0133451b8279843024e2316053ca55c7.zip | |
リモートのファイルをキャッシュするかどうかの設定をDBに保存するように
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/meta.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/models/meta.ts b/src/models/meta.ts index 7caf41f19c..073be7de82 100644 --- a/src/models/meta.ts +++ b/src/models/meta.ts @@ -50,6 +50,17 @@ if ((config as any).remoteDriveCapacityMb) { } }); } +if ((config as any).preventCacheRemoteFiles) { + Meta.findOne({}).then(m => { + if (m != null && m.cacheRemoteFiles == null) { + Meta.update({}, { + $set: { + cacheRemoteFiles: !(config as any).preventCacheRemoteFiles + } + }); + } + }); +} export type IMeta = { name?: string; @@ -66,6 +77,8 @@ export type IMeta = { hidedTags?: string[]; bannerUrl?: string; + cacheRemoteFiles?: boolean; + /** * Drive capacity of a local user (MB) */ |