From c49ae6c6a65e59a66937cd29a5f1a45574ed60b2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 14 May 2026 19:38:13 +0200 Subject: [PATCH] Capture player weakly in outer Task to fix mismatched ownership warning --- Yattee/Core/AppEnvironment.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yattee/Core/AppEnvironment.swift b/Yattee/Core/AppEnvironment.swift index 8f00049e..7aeffd2c 100644 --- a/Yattee/Core/AppEnvironment.swift +++ b/Yattee/Core/AppEnvironment.swift @@ -229,7 +229,7 @@ final class AppEnvironment { // Wire up SMB client to check if SMB playback is active // This prevents crashes from concurrent libsmbclient usage let smbClientRef = self.smbClient - Task { + Task { [weak player] in await smbClientRef.setPlaybackActiveCallback { [weak player] in player?.state.isSMBPlaybackActive ?? false }