Update to new_checkshums.md5

new_checksums.md5 enables audio file naming and other audio related features.
This commit is contained in:
NeilClack
2026-08-21 10:03:31 -05:00
parent 3c9de0bee2
commit 39eb6d7bf7
+10 -6
View File
@@ -37,7 +37,7 @@ struct AudioManifestEntry {
// and keeps the database's audio_files table in sync with what is actually
// on disk.
//
// Fetches checksums.md5, compares each entry against the local file's MD5,
// Fetches new_checksums.md5, compares each entry against the local file's MD5,
// and re-downloads anything that is missing or whose checksum differs.
// Files present on disk but absent from the manifest are deleted, and the
// audio_files table is reconciled on every pass (and after each individual
@@ -66,13 +66,16 @@ public:
// Returns the current human-readable status for display (e.g. footer).
std::string statusString() const;
static constexpr const char* AUDIO_BASE_URL = "https://files.radiantwavetech.com/audio/";
static constexpr const char* MANIFEST_FILENAME = "checksums.md5";
static constexpr const char *AUDIO_BASE_URL =
"https://files.radiantwavetech.com/audio/";
static constexpr const char *MANIFEST_FILENAME = "new_checksums.md5";
private:
void run();
bool fetchManifest(std::vector<AudioManifestEntry> &out);
bool downloadAndVerify(const std::string& filename, const std::string& expectedMd5, const std::string& displayName);
bool downloadAndVerify(const std::string &filename,
const std::string &expectedMd5,
const std::string &displayName);
void setStatus(const std::string &msg);
void wait(std::chrono::seconds seconds);
@@ -85,10 +88,11 @@ private:
db::DatabaseManager *db_ = nullptr;
};
// Parses checksums.md5 manifest text into entries. Blank lines and lines
// Parses new_checksums.md5 manifest text into entries. Blank lines and lines
// starting with '#' are ignored. Lines that don't match a known format are
// skipped. Returns false if no valid entries were found.
bool parseManifest(const std::string& text, std::vector<AudioManifestEntry>& out);
bool parseManifest(const std::string &text,
std::vector<AudioManifestEntry> &out);
// Maps a frequency value in Hz to its internal solfeggio frequency id using
// the same table the color palettes are seeded from (174/285->1, 396->2,