リモートのファイルをキャッシュするかどうかの設定をDBに保存するように

This commit is contained in:
syuilo
2018-11-06 07:52:13 +09:00
parent 42e007ddb7
commit 2a5c19cd01
9 changed files with 36 additions and 12 deletions

View File

@ -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)
*/