feat: add debug logging for default root settings in DownloadManager

This commit is contained in:
Will Miao
2025-08-07 14:42:05 +08:00
parent e6b94c7b21
commit 854e467c12

View File

@@ -297,7 +297,10 @@ export class DownloadManager {
// Set default root if available
const defaultRootKey = `default_${this.apiClient.modelType}_root`;
const defaultRoot = getStorageItem('settings', {})[defaultRootKey];
console.log(`Default root for ${this.apiClient.modelType}:`, defaultRoot);
console.log('Available roots:', rootsData.roots);
if (defaultRoot && rootsData.roots.includes(defaultRoot)) {
console.log(`Setting default root: ${defaultRoot}`);
modelRoot.value = defaultRoot;
}