Added a way to manually compact and/or optimize the db

This commit is contained in:
emeric
2024-04-20 23:57:01 +02:00
parent 8cde7ddf43
commit 0780d1ab21
24 changed files with 341 additions and 162 deletions
@@ -46,12 +46,13 @@ namespace lms::scanner
ScannerService(db::Db& db);
~ScannerService();
private:
ScannerService(const ScannerService&) = delete;
ScannerService& operator=(const ScannerService&) = delete;
private:
void requestStop() override;
void requestReload() override;
void requestImmediateScan(bool force) override;
void requestImmediateScan(const ScanOptions& scanOptions) override;
Status getStatus() const override;
Events& getEvents() override { return _events; }
@@ -62,12 +63,12 @@ namespace lms::scanner
// Job handling
void scheduleNextScan();
void scheduleScan(bool force, const Wt::WDateTime& dateTime = {});
void scheduleScan(const ScanOptions& scanOptions, const Wt::WDateTime& dateTime = {});
void abortScan();
// Update database (scheduled callback)
void scan(bool force);
void scan(const ScanOptions& scanOptions);
void scanMediaDirectory(const std::filesystem::path& mediaDirectory, bool forceScan, ScanStats& stats);