aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2021-11-19 12:13:45 -0500
committerMax Isom <[email protected]>2021-11-19 12:13:45 -0500
commitf5149dfaba64c62f0a9ea6deab600b3d4d9b0f39 (patch)
tree8bec60ce93ca8926a28414f972007e2e22a75bdd /src/index.ts
parent04d8f8d39000b711ec862043b687b8f47e454957 (diff)
downloadmuse-f5149dfaba64c62f0a9ea6deab600b3d4d9b0f39.tar.xz
muse-f5149dfaba64c62f0a9ea6deab600b3d4d9b0f39.zip
Move file caching logic to new FileCache service
Also: removes the -re ffmpeg option. If this option is passed, ffmpeg won't write to fs-capacitor (and the cache file) as fast as possible. In other words, the cache file won't finish writing until the entire stream has been played.
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts
index 5bf5bab..383faef 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -5,6 +5,7 @@ import {TYPES} from './types.js';
import Bot from './bot.js';
import {sequelize} from './utils/db.js';
import Config from './services/config.js';
+import FileCacheProvider from './services/file-cache.js';
const bot = container.get<Bot>(TYPES.Bot);
@@ -18,5 +19,7 @@ const bot = container.get<Bot>(TYPES.Bot);
await sequelize.sync({alter: true});
+ await container.get<FileCacheProvider>(TYPES.FileCache).cleanup();
+
await bot.listen();
})();