refactor(backend): rename module and APIs for compliance

- Renamed download_cache module to offline_cache
- Updated Tauri command names (e.g., cache_track_for_offline)
- Updated event names (offline:caching_started, etc.)
- Updated library database function names
- Updated frontend invoke calls to use new command names
This commit is contained in:
vicrodh committed 2026-01-23 12:14:39 -06:00
1 parent 84a2164079
commit 6d5d264778
15 files changed
+348 -343

No files matched your search

+2 -2
View File
@@ -112,7 +112,7 @@ impl SubscriptionStateStore {
Ok(())
}
pub fn mark_downloads_purged(&self, now: i64) -> Result<(), String> {
pub fn mark_offline_cache_purged(&self, now: i64) -> Result<(), String> {
self.conn
.execute(
"UPDATE subscription_state SET downloads_purged_at = ?1 WHERE id = 1",
@@ -122,7 +122,7 @@ impl SubscriptionStateStore {
Ok(())
}
pub fn should_purge_downloads(&self, now: i64) -> Result<bool, String> {
pub fn should_purge_offline_cache(&self, now: i64) -> Result<bool, String> {
let state = self.get_state()?;
let Some(invalid_since) = state.invalid_since else { return Ok(false); };
if now - invalid_since < GRACE_PERIOD_SECS {