Closed gnattu closed 3 months ago
Closed as the migration issue is still not resolved.
The migration issue is more severe than I previously thought. It seems like any change to the schema used in persistence manager would cause this error and I have not find any way to solve this yet.
This will save file mime-type on download into the offlineTrack model, and infer the file url from that key.
To keep backward compatibility it will use flac when this key is missing which is the same as the old behavior, so that media is playable in the old version will continue to work.
To workaround a SwiftData migration bug, it renamed the ReducedAlbum's
name
key toalbumName
, because SwiftData will attempt to create twoZNAME
column if we don't rename this. Ask Apple for why, but to make it work we have to perform such rename for now.This also contains a small fix for the container matching. For aiff, it should be
aiff,aif
, and notaiff, aif|aiff
as the aiff encoding is treated as PCM on server, so we only need to match the container not the encoding.