Add offline resilience coverage
This commit is contained in:
@@ -117,6 +117,20 @@ public actor RemoteLibrarySyncService {
|
||||
}
|
||||
|
||||
if existingState.assetId != track.assetId {
|
||||
if existingState.downloadStatus == .downloaded,
|
||||
let resolvedLocalFilePath = await audioFileStore.resolveLocalFilePath(
|
||||
persistedLocalFilePath: existingState.localFilePath,
|
||||
assetId: existingState.assetId
|
||||
)
|
||||
{
|
||||
if existingState.localFilePath != resolvedLocalFilePath {
|
||||
existingState.localFilePath = resolvedLocalFilePath
|
||||
statesByTrackID[track.trackId] = existingState
|
||||
didChange = true
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
existingState.assetId = track.assetId
|
||||
existingState.localFilePath = ""
|
||||
existingState.downloadedAt = nil
|
||||
|
||||
Reference in New Issue
Block a user