Skip to content

Commit

Permalink
Do not use mainactor task for download state change during song eviction
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Sep 29, 2024
1 parent 3f4c2fe commit 44e2e9c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions HarmonyKit/Backend/Nextcloud/NextcloudBackend.swift
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,7 @@ public class NextcloudBackend: NSObject, Backend, NKCommonDelegate, URLSessionWe

do {
try FileManager.default.removeItem(at: localUrl)
Task { @MainActor in
song.downloadState = DownloadState.notDownloaded.rawValue
}
song.downloadState = DownloadState.notDownloaded.rawValue
} catch let error {
Logger.ncBackend.error("Could not delete song \(song.url) at \(localUrl): \(error)")
}
Expand Down

0 comments on commit 44e2e9c

Please sign in to comment.