Features: - Dual-AVPlayer Smart DJ crossfade with LUFS normalization - Mitsuha-style FFT visualizer (real-time + offline pre-computed) - Companion API integration (Smart DJ, tag editing, vis frames) - Offline-first SyncEngine with delta sync and album detail pre-caching - Audio pre-fetcher for gapless queue playback - Optimistic action queue (star/unstar with background retry) - ShazamKit recognition with MusicKit preview playback - Radio streaming with HLS/PLS/M3U support and buffer seek - Watch app with Crown Sequencer and Ultra speaker support - Batch metadata editing with album_artist fix for split albums - Cache-first UI pattern across all views - NWPathMonitor offline detection with reactive song greying
32 lines
885 B
Swift
32 lines
885 B
Swift
import SwiftUI
|
|
import WatchConnectivity
|
|
|
|
@main
|
|
struct NavidromeWatchApp: App {
|
|
|
|
@StateObject private var watchManager = WatchSessionManager.shared
|
|
@StateObject private var audioPlayer = WatchAudioPlayer.shared
|
|
@StateObject private var offlineStore = WatchOfflineStore.shared
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
WatchRootView()
|
|
.environmentObject(watchManager)
|
|
.environmentObject(audioPlayer)
|
|
.environmentObject(offlineStore)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct WatchRootView: View {
|
|
@EnvironmentObject var watchManager: WatchSessionManager
|
|
@EnvironmentObject var offlineStore: WatchOfflineStore
|
|
|
|
var body: some View {
|
|
if offlineStore.songs.isEmpty && watchManager.servers.isEmpty {
|
|
WatchSetupView()
|
|
} else {
|
|
WatchLibraryView()
|
|
}
|
|
}
|
|
}
|