Update from NavidromePlayer.zip (2026-04-03 19:24)
This commit is contained in:
parent
16097f5ff2
commit
cab5273310
2 changed files with 1 additions and 9 deletions
|
|
@ -26,7 +26,7 @@ class WatchOfflineStore: NSObject, ObservableObject, URLSessionDownloadDelegate
|
|||
private let catalogKey = "watch_offline_songs"
|
||||
private let fileManager = FileManager.default
|
||||
private var pendingSongs: [String: Song] = [:] // taskId → Song
|
||||
private var taskToSongId: [Int: String] = [] // URLSession task ID → songId
|
||||
private var taskToSongId: [Int: String] = [:] // URLSession task ID → songId
|
||||
|
||||
private lazy var backgroundSession: URLSession = {
|
||||
let config = URLSessionConfiguration.background(withIdentifier: "com.navidromeplayer.watch.download")
|
||||
|
|
|
|||
|
|
@ -358,14 +358,6 @@ extension WatchSessionManager: WCSessionDelegate {
|
|||
self.saveLocalServers()
|
||||
}
|
||||
}
|
||||
|
||||
if let catalogData = applicationContext["offlineCatalog"] as? Data,
|
||||
let songs = try? JSONDecoder().decode([Song].self, from: catalogData) {
|
||||
DispatchQueue.main.async {
|
||||
// Update offline store with catalog
|
||||
WatchOfflineStore.shared.updateCatalog(songs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Receive messages (now playing info + download commands from iPhone)
|
||||
|
|
|
|||
Loading…
Reference in a new issue