pleasseeeee

This commit is contained in:
delli 2026-04-22 23:02:31 +02:00
commit 531340ae92
2 changed files with 4 additions and 3 deletions

View file

@ -208,8 +208,6 @@ class SpotifyController: MediaControllerProtocol {
} }
} }
// MARK: - Private Methods
private func scheduleCanvasFetchIfNeeded(for trackURI: String) { private func scheduleCanvasFetchIfNeeded(for trackURI: String) {
guard !trackURI.isEmpty else { return } guard !trackURI.isEmpty else { return }
guard playbackState.liveArtworkURL == nil else { return } guard playbackState.liveArtworkURL == nil else { return }
@ -243,7 +241,6 @@ class SpotifyController: MediaControllerProtocol {
} }
} }
} }
private func executeCommand(_ command: String) async { private func executeCommand(_ command: String) async {
let script = "tell application \"Spotify\" to \(command)" let script = "tell application \"Spotify\" to \(command)"
try? await AppleScriptHelper.executeVoid(script) try? await AppleScriptHelper.executeVoid(script)

View file

@ -703,6 +703,7 @@ class MusicManager: ObservableObject {
// Check for artwork changes // Check for artwork changes
let artworkChanged = state.artwork != nil && state.artwork != self.artworkData let artworkChanged = state.artwork != nil && state.artwork != self.artworkData
let hasContentChange = let hasContentChange =
titleChanged titleChanged
|| artistChanged || artistChanged
@ -751,6 +752,7 @@ class MusicManager: ObservableObject {
self.refreshExplicitFlag(for: state) self.refreshExplicitFlag(for: state)
// Only update sneak peek if there's actual content and something changed // Only update sneak peek if there's actual content and something changed
if shouldAutoPeekOnTrackChange && !state.title.isEmpty && !state.artist.isEmpty && state.isPlaying { if shouldAutoPeekOnTrackChange && !state.title.isEmpty && !state.artist.isEmpty && state.isPlaying {
self.updateSneakPeek() self.updateSneakPeek()
@ -1443,6 +1445,8 @@ class MusicManager: ObservableObject {
videoArtworkURL = nil videoArtworkURL = nil
return return
} }
// Se il player non è Apple Music, non toccare videoArtworkURL:
// SpotifyController gestisce il canvas in modo autonomo tramite liveArtworkURL.
guard bundleIdentifier == "com.apple.Music" else { guard bundleIdentifier == "com.apple.Music" else {
return return
} }