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.
This commit is contained in:
Max Isom 2021-11-19 12:13:45 -05:00
parent 04d8f8d390
commit f5149dfaba
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
12 changed files with 154 additions and 52 deletions

View file

@ -28,6 +28,7 @@ import Shuffle from './commands/shuffle.js';
import Skip from './commands/skip.js';
import Unskip from './commands/unskip.js';
import ThirdParty from './services/third-party.js';
import FileCacheProvider from './services/file-cache.js';
import KeyValueCacheProvider from './services/key-value-cache.js';
const container = new Container();
@ -76,6 +77,7 @@ container.bind(TYPES.Config).toConstantValue(new ConfigProvider());
// Static libraries
container.bind(TYPES.ThirdParty).to(ThirdParty);
container.bind(TYPES.FileCache).to(FileCacheProvider);
container.bind(TYPES.KeyValueCache).to(KeyValueCacheProvider);
export default container;