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:
1 parent
84a2164079
commit
6d5d264778
15 files changed
+348
-343
No files matched your search
@@ -461,8 +461,8 @@
|
||||
// Detect if running in Flatpak
|
||||
loadFlatpakStatus();
|
||||
|
||||
// Check for legacy downloads
|
||||
checkLegacyDownloads();
|
||||
// Check for legacy cached files
|
||||
checkLegacyCachedFiles();
|
||||
|
||||
// Subscribe to offline state changes
|
||||
const unsubscribeOffline = subscribeOffline(() => {
|
||||
@@ -1218,15 +1218,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function checkLegacyDownloads() {
|
||||
async function checkLegacyCachedFiles() {
|
||||
try {
|
||||
const result = await invoke<{has_legacy_files: boolean, total_tracks: number}>('detect_legacy_downloads');
|
||||
const result = await invoke<{has_legacy_files: boolean, total_tracks: number}>('detect_legacy_cached_files');
|
||||
if (result.has_legacy_files && result.total_tracks > 0) {
|
||||
legacyTracksCount = result.total_tracks;
|
||||
showMigrationModal = true;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Failed to check for legacy downloads:', err);
|
||||
console.error('Failed to check for legacy cached files:', err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user