This commit is contained in:
Dallas Groot 2026-04-04 17:56:58 -07:00
parent 7094ffab16
commit 7a05e3b93c

View file

@ -322,7 +322,7 @@ class WatchConnectivityManager: NSObject, ObservableObject {
self?.wcLog("Watch deleted: \(songId)")
}
}, errorHandler: { error in
wlog("Delete song failed: \(error)")
wcLog("Delete song failed: \(error)")
})
}
@ -401,7 +401,7 @@ class WatchConnectivityManager: NSObject, ObservableObject {
"songCount": songs.count
])
} catch {
wlog("Failed to send catalog: \(error)")
wcLog("Failed to send catalog: \(error)")
}
for downloaded in songs {
@ -566,7 +566,7 @@ extension WatchConnectivityManager: WCSessionDelegate {
guard let metadata = file.metadata,
let songId = metadata["id"] as? String,
let suffix = metadata["suffix"] as? String else {
wlog("Received file without proper metadata")
wcLog("Received file without proper metadata")
return
}
@ -582,14 +582,14 @@ extension WatchConnectivityManager: WCSessionDelegate {
do {
try fm.moveItem(at: file.fileURL, to: destURL)
wlog("Saved offline song: \(songId) to \(destURL.lastPathComponent)")
wcLog("Saved offline song: \(songId) to \(destURL.lastPathComponent)")
// Save metadata catalog
var catalog = loadWatchCatalog()
catalog[songId] = metadata
saveWatchCatalog(catalog)
} catch {
wlog("Failed to save transferred file: \(error)")
wcLog("Failed to save transferred file: \(error)")
}
#endif
}